This Go game AI agent is implemented in Python using the Minimax algorithm to play the game of Go. The agent considers various game states and employs strategic decision-making. This is a homework assigment for CSCI561 Foundation of Artificial Intelligence
Ensure you have Python installed. No additional installations are required, as the algorithm uses standard libraries.
Provide the input coordinates in the input.txt
file. The format should be:
<player>
<prev_state>
<curr_state>
Execute the following command to run the AI agent:
python little_go.py
The algorithm generates an output.txt
file containing the next move for the player.
- Black Piece: 1
- White Piece: 2
- The board is a 5x5 grid.
- Coordinates for moves are represented as (x, y) on the grid.
The AI agent uses the Minimax algorithm with alpha-beta pruning to search for the best move. It considers factors such as player pieces count, liberty count, and edge counts for evaluation.
input.txt
: Contains input coordinates and game states.
output.txt
: Contains the AI agent's next move.
step_num.txt
: Keeps track of the steps.
Explore and modify algorithm parameters for different game instances. Adjust the search depth and branching factor (search_max_depth
and b_factor
in the code) based on preferences.
This AI agent is designed for educational purposes and can be enhanced for more sophisticated gameplay.
Happy coding and enjoy playing Go with the AI agent!