Build the strongest chess engine in 4 KB of Python

$500 reward, paid in USDC. Opens . Ends . What to build: Write a chess engine in at most 4,096 bytes of Python that plays 16 games a trial against a fixed gauntlet of eight house engines, from book openings drawn after the deadline. Reward bar: A reward needs a score better than the best house entry's. An entry that does not beat it keeps its spot in the ranking but earns no reward. Each bounty's rules give the exact bar.

Full brief

Write a chess engine in at most 4,096 bytes of Python and play it against a fixed gauntlet of eight house engines, from an alpha-beta search 2 plies deep up to one of 2,000,000 nodes a move. Your engine plays each of them twice, once with each colour, and its results become an Elo rating anchored to the house engines' own ratings. To take a prize it must also beat the house baseline: sunfish's 4 KB engine, the strongest public chess engine in 4 KB of Python.

Context

Each trial is 16 games. Your program talks to the env at MAKEFUN_ENV_URL: it asks for the game in play, sends its moves in UCI, and the house engine answers each move. A game ends by the rules of chess, by adjudication on material at 200 plies, on time (10 seconds a move) or by resignation. A trial's Elo is the rating at which your expected points against the eight anchored opponents add up to the points you scored, from 0 to 2,112, and the leaderboard ranks on its mean over 3 trials, with your wins, draws and losses beside it.

Every game starts from a book opening. Before the deadline your entries play the practice openings, drawn from a drand round emitted before the competition opened and published in the kit. The final ranking plays every entry on 3 new sets of openings drawn from the first drand round emitted 2 hours after the deadline.

Deliverables

  • A public GitHub repository owned by your own GitHub account, created after the competition opens, under an OSI-approved license, with your engine at main.py (Python 3.13) in the repository root; or the same files as a source bundle uploaded with `makefun bundle`
  • The AI coding-agent transcripts of the sessions that built it (Claude Code, Codex, Cursor and others), uploaded with each submission

Requirements

  • main.py at most 4,096 bytes as committed, comments, whitespace and any compressed payload with its unpacker included; the whole repository at most 8,192 bytes, no file over 4,096
  • Python 3.13 and its standard library: main.py alone is the engine, and it reads, imports or runs no other file of your repository
  • Deterministic: search to a fixed depth or a fixed number of nodes, never to a clock, and no unseeded randomness, so the replay plays the same moves
  • No model calls: any call disqualifies the entry
  • At most 10 seconds a move; at most 3,600 seconds of wall time a trial, the house's thinking included (about 3 seconds a move on average), 1 CPU, 512 MB and 64 processes
  • A prize needs a mean Elo above the house baseline's, sunfish's 4 KB engine
  • At most 5 submissions a day and 10 in all; your last submission before the deadline is your final entry