RL-ChessMaster is a Gomoku AI agent project based on rule-based and reinforcement learning approaches, aiming to explore different game strategies and intelligent decision-making methods.
The rule-based agent's core logic is based on fine-grained board position assessment, primarily involving the following key steps:
graph TD
A[Cell Evaluation] --> B{Is Empty Cell?}
B -->|Yes| C[Calculate Offense Score]
B -->|No| D[Skip]
C --> E[Calculate Defense Score]
E --> F[Weighted Comprehensive Score]
F --> G[Select Best Position]
-
Offense Score
- Analyze continuous chess piece count
- Identify critical patterns (alive three, alive four, etc.)
- Consider jump strategies
- Reward advanced patterns like "double alive three"
-
Defense Score
- Assess opponent's potential threats
- Calculate possible opponent patterns
- Reduce opponent's winning probability
-
Comprehensive Score
- Combine offense and defense scores
- Adjustable weights for balance
- Five in a Row: 100,000 points
- Alive Four: 10,000 points
- Double Alive Three: 5,000 points
- Dead Four: 1,000 points
- Alive Three: 500 points
- Multi-dimensional board evaluation
- Flexible weight configuration
- Center position preference
- Jump strategy support
git clone https://github.com/your-repo/RL-ChessMaster.git
cd RL-ChessMaster
pip install -r requirements.txt
- Fork the project
- Create a feature branch
- Commit your code
- Create a Pull Request
MIT License