What it does
The engine itself uses minimax and alpha-beta pruning to implement a difficulty system for beginner, intermediate and more experienced players. This is done through the use of tier management, knowing at which tier of the search to stop computing and giving the next move to the player. Stoping at second tier would mean that the bot only can see 2 moves in the future, 3rd tier 3 moves, etc. With checking every move possibility, the bot can make educated guesses on where they should put their pieces, to get the highest point advantage, i.e. being able to capture the piece worth the most points on the board.
How we built it
We used an existing chess engine built by ScierKnave that uses minimax and alpha-beta pruning algorithms as our base. We then used Python to implement the three difficulties. For each difficulty, the tier management system changes tiers throughout the game based off of factors like the number of remaining pieces and the number of possible moves at any given position. Initially, the games were ran through the Python Console. We then tried to transition to a frontend display by using Flask, Javascript, HTML, and CSS, but we decided to use the pygame library in order to generate a board with moving pieces.
Challenges we ran into
The javascript library we wanted to use, chessboard.js, had issues with their imports and was a major blocking issue to get our frontend going as we could not get the board to show up. As for the pygame board, we were able to generate a board and working pieces but it was a challenge to connect the engine itself to the this interface.
Accomplishments that we are proud of
We are proud to have been able to work on a project that we created as a group, and to have implemented a sort of algorithm bot with difficulties to the game of chess. We are also proud to have been able to work with pygame to create a working interface.
What we learned
We learned a lot about the difficulties of implementing the backend of a code to its corresponding front end. We tried at first to make it work with flask and javascript but as said in the difficulties we were not able to implement the full project to it. Though this challenge wasn’t easy, it still made us learn a lot about the complexity of a frontend code.
What's next for PythonChessEngine
In the future it would be very easy to see the implementation of GamBit to the pygame frontend, making the pieces have their corresponding legal moves and making the bot move for itself without having the program crash.
ScierKnave: https://github.com/ScierKnave/chess_bot

Log in or sign up for Devpost to join the conversation.