This project implements a simplified version of the Settlers of Catan board game with AI agents that use Minimax and Expectimax search algorithms to make decisions. The game can be played in GUI mode for visualization or headless mode for faster evaluation and comparison of agent performance.
To run the game with a graphical interface where you can watch AI agents play against each other:
python main.pyThis will launch a pygame window showing the game board, with Minimax and Expectimax agents competing against each other.
To run the game without a graphical interface (much faster):
python headlessGameManager.pyThis will run a single game between AI agents and output the results to the console.
To run multiple games and evaluate agent performance:
python eval.pyBy default, this runs 100 games between the agents and provides statistics including:
- Win counts for each agent
- Average turns to win
- Average stats for settlements, cities, roads, and points
You can modify the number of evaluation games by changing the number of runs in the file.
agent.py: Implementation of AI agents (Minimax and Expectimax)game.py: Core game logic and state managementboard.py: Board representation and setupguiGameManager.py: Graphical interface for the gameheadlessGameManager.py: Console-based game manager for fast simulationseval.py: Evaluation script to compare agent performance