An original 0x88 chess engine written from scratch for the make.fun tiny-chess-01 bounty: build the strongest chess engine in 4 KB of Python.
main.py is the whole engine (Python 3.13, standard library only). It talks
to the gauntlet env over HTTP (POST /game, POST /move) and picks every
move with a real search:
- 0x88 board with full legal move generation: castling, en passant, promotions, check and checkmate detection.
- Negamax + alpha-beta, iterative deepening to a fixed node budget (no clock — a replayed trial plays the same moves).
- Quiescence search on captures, so it does not blunder into tactics.
- Transposition table (incremental Zobrist hashing), MVV-LVA + killer + history move ordering.
- Evaluation: material + piece-square tables (own values), bishop-pair bonus, endgame king table, tempo.
The readable source is engine.py; main.py is the packed entrypoint
produced by makefun compress (LZMA), within the 4,096-byte cap.
MIT — see LICENSE.