- Home
- Skills
- Game Development
- Tiny Chess - A Complete Chess Engine in 4 KB of Python
Works with the AI Agents you already use
Tiny Chess - A Complete Chess Engine in 4 KB of Python
A real chess engine in one 4 KB Python file: best move for any FEN, legal move lists, mate and stalemate detection. Deterministic, zero dependencies.
$3
About this skill
A complete chess engine that fits in 4 KB of Python - small enough to read in one sitting, strong enough to find mate in one.
Ask it for the best move in any position (FEN in, UCI move out), every legal move, or whether a position is checkmate or stalemate. Inside: negamax search with alpha-beta pruning, a Zobrist transposition table with bound flags, check extensions, capture quiescence, and MVV-LVA move ordering. It plays under a fixed 200,000-node budget instead of a clock, so it is fully deterministic - the same position always gets the same move.
Verified behaviour: exactly 20 legal moves from the starting position, finds the back-rank mate in one (a1a8) and Scholar's mate (h5f7).
Honest simplifications from the size budget, stated up front: no en passant, promotions are always to a queen, castling rights are honoured as given in the FEN.
Written from scratch for the make.fun tiny-chess bounty and strengthened through self-play testing (70% score against its own predecessor). Python 3.9+, standard library only.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 12 days ago
- Software
Python 3.9+AI agent with shell access
Permissions
What's inside
Frequently Asked Questions
New in Game Development
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Game Development.