Loading repository data…
Loading repository data…
thomhasito / repository
This GitHub repository hosts a Python implementation of the classic game of checkers (also known as draughts) with an artificial intelligence opponent. The AI player is powered by the minimax algorithm with alpha-beta pruning, making it a formidable adversary for players looking to challenge their skills.
To install the project, simply clone the repository to your machine.
git clone https://github.com/thomhasito/checkersAI.git
This project is a Python implementation of the classic game of Checkers (Draughts). Challenge yourself to play and defeat the AI opponent. The AI is powered by the MinMax algorithm with Alpha-Beta pruning.
The game follows the standard rules of Checkers. You can find the complete rules on this website: http://www.ffjd.fr/Web/index.php?page=reglesdujeu
This project is designed to run with Python 3.8 or later. To play the game, simply execute the following command:
python3 main.py
The project is organized with the following directory structure:
main.py: The main Python script to start and run the game. (python3.8 or later required)last_move.json: Contains the last move made by the player. Used for the AI and ensure there is attacks or pawn movements.start_grid.txt: Contains the starting grid of the game. Used for board initialisation.grids.txt: Contains the grids of the game. Used for detect repetitive positions.const.py: Contains all the game's constants for better readability and robustness.board.py: Manages the game board and its state.case.py: Manages the game board's cases and its state.piece.py: Manages the game board's pieces and its state.player.py: Initilaize player and ai attributes.button.py: Class for the game's buttons.legende.py: Class for the game's legend.menu.py: Class for the game's menu. Selection of the player name and the ai difficulty.game.py: Class for the game's main loop.end.py: Class for the game's end screen.ai.py: Contains the AI implementation using the MinMax algorithm with Alpha-Beta pruning.movement.py: Functions for the game's attacks and movements.file_manager.py: Class for the game's file manager. Save and load the game in txt or json format.event_manager.py: Handles the game's events due to mouse or keyboard inputs.Feel free to explore and modify the code in these files to better understand or enhance the game's functionality.
The project is currently in a completed state, but I am open to receiving pull requests from contributors who may want to enhance the AI algorithm further. Your contributions are welcome and will help make the game even better!
You can reach me via email at thomas.balsalobre@edu.ece.fr
Feel free to replace https://github.com/thomhasito/checkersAI.git with the actual URL of your Git repository when sharing this Markdown file. This Markdown document is written in English and includes sections for installation, project description, game rules, usage instructions, project status, and contact information.