I'm learning to build a chess engine. Starting with basics, then trying mcts and Lc0. Cutechess ready soon.

About imli


This project is a exploration of chess engine development, starting from foundational techniques like negamax and alpha-beta pruning, and progressively evolving into more advanced methodologies such as MCTS and LCZero. The goal is to build a modular engine that supports the UCI (Universal Chess Interface) and can be tested and played via CuteChess. Along the way, I’ll integrate some tools to compare engines, analyze games from move quality to momentum shifts.

Read more
Filters

Recent Activity

v 0.2
Removed the illegal move bug, cleaned up the redundant, piece-square table definitions. For alpha-beata pruning enhancements, I'm storing previously eal positions to avoid re-computation, using iterative deepening to search progressively deeper (aspiring window - maybe in later stages).

Added Quiescence search to continue search in tactical position to avoid horizontal affect and added MVV-LVA move ordering for captures. Lol, im just happy that this tiny engine survived more than 20 moves against Stockfish and Leorik.

The first version of my chess engine uses a fixed depth (upto 3 ply) Negamax search that uses alpha-beta pruning. Move ordering is done by randomly shuffling the legal moves at the root of the search. It's eval function is based on sum of piece material values and piece-square tables. It had a weird bug that gave an illegal move.

Move 15 :(

[Event "?"]
[Site "?"]
[Date "2025.08.24"]
[Round "?"]
[White "Leorik"]
[Black "MyPythonChess"]
[Result "1-0"]
[ECO "B02"]
[GameDuration "00:02:08"]
[Opening "Alekhine's defense"]
[PlyCount "29"]
[Termination "illegal move"]
[TimeControl "40/300"]
[Variation "Mokele Mbembe (Buecker) variation"]

1. e4 {+0.17/19 4.6s} Nf6 2. e5 {+0.35/21 4.7s} Ne4 {0.52s}
3. d4 {+0.94/18 5.8s} Nc6 {1.6s} 4. f3 {+2.80/20 4.7s} Nxd4 {1.2s}
5. Qxd4 {+5.43/22 5.6s} Nd6 {1.6s} 6. exd6 {+6.49/21 4.7s} exd6
7. Bd3 {+7.19/20 4.3s} Qe7+ {0.94s} 8. Kf2 {+7.57/19 4.3s} Qe6 {2.0s}
9. Nh3 {+9.01/20 5.5s} c5 {4.6s} 10. Qa4 {+9.90/21 10s} c4 {4.8s}
11. Qxc4 {+10.11/22 5.4s} d5 {2.0s} 12. Qc3 {+10.36/22 7.0s} d4 {4.1s}
13. Qxd4 {+11.79/22 6.0s} Bd6 {5.9s} 14. Re1 {+15.99/22 5.2s} Be5 {15s}
15. Rxe5 {+20.48/21 4.6s, Black makes an illegal move: e6f6} 1-0