This project was inspired by the idea of organizing a chess tournament at my school. Since We run a tech-based university club, we decided to make it more exciting by creating our own chess engine and joining the tournament as a BOT. Fun, right? (It's not cheating :D I change the scores, so AI can't find the best move) so I come up with this:
This program is a fully functional chess engine that I built by applying countless hours of learning from the brilliant minds of Eddie Sharick and Sebastian Lague. To add more fun and historical meaning, I named the program, The Turk. If you are interested to learn more about The Mechanical Turk, just click the name.
While many of the comments in the code are written in Turkish, the core structure is heavily influenced by Eddie Sharick's project as I followed his video series extensively. It’s a blend of learning, practice, and passion for coding.
Edit: After testing the engine in our tournament, I think its ELO is between 800 and 1200. It's not a highly advanced chess engine, but it's open to development. It was a really fun experience.
To run this chess engine project successfully, you will need the following installed on your system:
JDK (Java Development Kit) - Ensure that you have a JDK installed on your system. Compiler should suggest you to the direct download link.
Python and Pygame - Make sure Python is installed. Then, install the Pygame library by running the following command in your terminal or command prompt: pip install pygame
- Select whether you want to play against the computer, another player locally, or watch the engine play against itself by setting the appropriate flags in lines 52 and 53 of ChessMain.py.
player_one = True # if a human is playing white, then this will be True, else False
player_two = False # if a hyman is playing white, then this will be True, else False
- Run ChessMain.py. and enjoy.
- z is for undo a move
- r to reset the game
Here is Eddie Sharick's channel: https://www.youtube.com/@eddiesharick6649 His detailed explanations and practical approach helped me understand and implement key chess engine concepts. Huge thanks to Eddie for this massive upload to the internet.
Here is Sebastian Lague's video: https://www.youtube.com/watch?v=U4ogK0MIzqk The idea for this project popped up my head after watching Sebastian's video. If you want to write in C#, deffinetly check his videos.