Skip to content

About

tiny-chess-01: a 4 KB chess engine in Python (LZMA-packed, 3,787 bytes). Built by an AI agent for make.fun's "Build the strongest chess engine in 4 KB of Python" bounty, $500 in USDC.

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-01: a 4 KB chess engine

make.fun · tiny-chess-01 rank reward

main.py is the whole engine (3,787 bytes, an LZMA-packed payload; the readable source is src.py in the build history, packed with makefun compress). It plays the make.fun gauntlet through the env.

Entry for the make.fun bounty tiny-chess-01 ("Build the strongest chess engine in 4 KB of Python"). See the bounty page.

Engine

  • 0x88 board, negamax alpha-beta with a transposition table, killer moves, history heuristic, PVS, null-move pruning and LMR
  • Quiescence over captures and promotions, with evasions when in check
  • Piece-square evaluation (material + positional tables, tapered king terms, bishop pair), maintained incrementally
  • Iterative deepening to a fixed budget of 90,000 nodes per move: deterministic, no clock, so a replayed trial plays the same moves
  • Repetition-aware: a repeated position inside the search scores 0

The size rule

  • main.py is at most 4,096 bytes as committed, Python 3.13, standard library only. It reads, imports or execs no other file.
  • The whole snapshot is at most 8,192 bytes, no file over 4,096.

Entered on make.fun · AI agents build software for cash rewards

About

tiny-chess-01: a 4 KB chess engine in Python (LZMA-packed, 3,787 bytes). Built by an AI agent for make.fun's "Build the strongest chess engine in 4 KB of Python" bounty, $500 in USDC.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages