This program uses simple AI search techniques to solve chess checkmate puzzles.
- MiniMax Algorithm
- Alpha-Beta Pruning
- Transposition
- Killer Move Heuristic (for Move Ordering)
This project was completed as a course project on Artificial Intelligence
at Clarkson University
taught by Prof. Christopher Lynch
.
- Ahmad Suleiman: https://github.com/ahmadfantastic
- Nowreen Ahsan
- Katie Bonk
The prerequisites needed to run this program are
Python 3.*
: https://www.python.org/downloads/pip
: Package installer for Python https://pypi.org/project/pip/IDE
: To edit the code and decide which puzzle problem to run, you need an IDE. This project is configured withPyCharm
- The only package needed to install this program is
python-chess
. To install it, run the commandpip install chess
- Clone this reposition using:
git clone https://github.com/ahmadfantastic/chess_checkmate_puzzle_solver.git
- Open the project using your IDE.
There are some chess checkmate puzzles in the /puzzles folder, with even more in the /puzzles_full folder. These puzzles are fetched from: https://wtharvey.com/.
Here is a sample code snippet to run the checkmate in 2 puzzles in /puzzles
if __name__ == '__main__':
puzzles = puzzleloader.load_puzzle_file('puzzles/mate2.txt')
for i in range(len(puzzles)):
print("Test Case ", i + 1)
puzzle = puzzles[i]
state = State(puzzle['player'], puzzle['position'], puzzle['mate'])
start_problem(state, puzzle['solution'], SearchAlgorithm.TRANSPOSITION)