You are browsing as a guest. Sign up (or log in) to start making projects!

Chess Bot

  • 5 Devlogs
  • 21 Total hours

I am building a chess bot that uses an algorithm to find a good move to play. the board and the rules are managed by chessboard.js and chess.js libraries

Open comments for this post

3h 47m 28s logged

Devlog 5

I finished implementing a new bitboard engine, since the old chess.js library was really slow, and it froze the screen.
ALSO, the github link was not displaying the chessboard, and i spent well over 2 hours trying to debug this. But in the end, the chess bot would not work correctly if the board appears in the github website. So, for now, if you want to test the chess bot, you can click releases in the github and download & run the HTML file.
I plan to let the player play the black side too, instead of only white.

(I will update the github repo soon so there is an option to download)
P.S. You can change the background image in the code, and I might make an option to change the image in the website soon)

0
0
6
Open comments for this post

6h 35m 47s logged

Devlog #4

It’s been a while, but I’ve finally (mostly) finished with coding the chess bot. I might go back to it soon, but I want to focus more on the visuals, so I made a simple UI based on the chess.com/lichess layout. I also made it so you can customize the background by entering the image URL.

I also implemented an evaluation engine (with a low depth) for a numerical value of the position on board. I wanted a higher evaluation depth, but it lags whenever it calculates the score. So, it should be either depth 2 or 3, even if the actual bot is thinking deeper.

If you have any suggestions, you can comment them, and I will try to add them.

0
0
23
Open comments for this post

3h 13m 57s logged

Devlog 3:

By now, I’ve realized that the github pages doesn’t work. :( But, I’m trying to fix it as of now. (You can download the github project and it works that way though)

As for the actual game, I have improved it so that instead of a set depth, it searches for the best move for a set amount of time, and if there is still time left over from the search, it increases its depth by 1, and searches one more move deep. It normally searches 3-5 moves deep on my PC and ~3 moves on my chromebook.

I tested it against the chess.com bots, and it beats the beginner and intermediate bots pretty consistently. I also played it against Wendy bot (1500 elo) and it won! (I did not expect it to win)

Here’s the game, if anyone wants to analyze it themselves:

[Event “Play vs Bot”]
[Site “Chess.com”]
[Date “2026.08.06”]
[Round “-”]
[White “Wendy-BOT”]
[Black “Chess-Bot(Stardance)”]
[Result “0-1”]
[CurrentPosition “5k2/pp4R1/6P1/3pB3/4b2P/7K/1P4q1/8 w - - 11 52”]
[Timezone “UTC”]
[ECO “C61”]
[ECOUrl “https://www.chess.com/openings/Ruy-Lopez-Opening-Birds-Defense-4.Nxd4-exd4-5.O-O”]
[UTCDate “2026.08.06”]
[UTCTime “21:56:10”]
[WhiteElo “1500”]
[BlackElo “172”]
[TimeControl “?”]
[Termination “Akshay Kommoju won by checkmate”]
[StartTime “21:56:10”]
[EndDate “2026.08.06”]
[EndTime “22:16:01”]
[Link “https://www.chess.com/analysis/game/computer/1894651872/review?move=27”]
[WhiteUrl “https://images.chesscomfiles.com/uploads/v1/user/66746050.adfcf725.50x50o.d52666e0e879.png”]
[WhiteCountry “3”]
[WhiteTitle “”]
[BlackUrl “https://www.chess.com/bundles/web/images/noavatar_l.84a92436.gif”]
[BlackCountry “69”]
[BlackTitle “”]

e4 e5 2. Nf3 Nc6 3. Bb5 Nd4 4. Nxd4 exd4 5. O-O Qg5 6. Bd3 Nf6 7. f4 Qh4 8. e5 Nd5 9. Qf3 Nb6 10. c3 dxc3 11. Nxc3 Bc5+ 12. Kh1 O-O 13. Ne4 Bd4 14. g3 Qe7 15. Ng5 h6 16. Qe4 f5 17. Qxd4 hxg5 18. fxg5 c5 19. Qf4 Nd5 20. Bc4 Qe6 21. Bxd5 Qxd5+ 22. Rf3 Re8 23. d4 cxd4 24. Qxf5 d6 25. e6 Bxe6 26. Qd3 Bg4 27. Kg2 Bxf3+ 28. Kf2 Bh1 29. Qb3 Qxb3 30. axb3 d5 31. Bf4 Be4 32. Rd1 d3 33. h4 Re6 34. Rc1 Rb6 35. Ke3 Rxb3 36. Be5 Rf8 37. Rc7 Rf3+ 38. Kd2 Rf2+ 39. Ke1 d2+ 40. Kxf2 d1=Q 41. Rxg7+ Kf8 42. g6 Rf3+ 43. Kg2 Rf4+ 44. Kh3 Qf1+ 45. Kh2 Rxh4+ 46. gxh4 Qh1+ 47. Kg3 Qf3+ 48. Kh2 Qh1+ 49. Kg3 Qf3+ 50. Kh2 Qf2+ 51. Kh3 Qg2# 0-1

0
0
12
Open comments for this post

4h 47m 52s logged

I finally coding a basic bot that plays against you. This plays legal moves, and has a move depth of 3. I implemented minimax and piece square tables, so it would play better moves quickly.

There is also an option to export the game as a pgn or fen, so you can evaluate the chess bot as well as your accuracy.

currently, even with move depth 3, it is slow, especially when there are a lot of moves it has to sort through, and I want to make it so the algorithm works faster, even on lower end devices. Also, the algorithm is pretty bad, (it got about 75% accuracy on chess.com analysis) so I also plan on improving it in the future.

0
0
17
Open comments for this post

2h 4m 59s logged

Devlog #1

My first goal in building a chess bot is to code the board and defining the rules. I used chessboard.js to make the board, and I will later implement rules, so both sides can only play legal moves, and also castling, en passant, etc.

0
0
3

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…