Skip to content

About

Tiny Chess — the strongest chess engine in 4 KB of Python (make.fun bounty tiny-chess-01)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Tiny Chess — strongest chess engine in 4 KB of Python

make.fun rank reward

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.

How it plays

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.

License

MIT — see LICENSE.

About

Tiny Chess — the strongest chess engine in 4 KB of Python (make.fun bounty tiny-chess-01)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages