SlopScore
00 crowd

agentic-chessengine-latex-TeXCCChess (github.com/acherm/agentic-chessengine-latex-TeXCCChess)

TeXCCChess, A LaTeX Chess Engine Generated by a Coding Agent (Claude Code). 2K lines of code, 1300 Elo, playable in Overleaf or locally
TeX · ★ 6 · 0 forks · MIT · paperwork by the Cap'mmostly ai (inferred)light human (inferred)works-on-my-machine (inferred)other🤖 claude-code
listed 3 hours ago by acherm · last checked 3 hours ago
The owner didn't write this. This repo never submitted itself. The Cap'm found it on a truffle trawl and wrote its paperwork from what GitHub already shows. Picked by hand by the Cap'm on 2026-09-11: TeXCCChess, a chess engine written in pure TeX and playable in Overleaf, described as "A LaTeX Chess Engine Generated by a Coding Agent (Claude Code)". 6 stars; MIT license. The owner did not submit this. Votes count; awards don't until the owner claims it.

I'm not calling your project slop! Geeze, it's a joke... Do you own this repo?

Log in with GitHub as acherm. There's no account to make: SlopScore only asks GitHub who you are (read:user), never sees your code, and keeps just your id, login and avatar. Then you can:

  • Keep it, on your terms. Commit your own slopscore.md (spec) and press Refresh. Your paperwork replaces the Cap'm's, and you can submit it for Slop of the Day.
  • Take it down. One click on Remove. It stays gone; the trawl never brings it back.

Log in with GitHub

Can't log in as the owner? Request a takedown. No login needed, and a trawled listing comes down right away.

GitHub says
TeXCCChess, A LaTeX Chess Engine Generated by a Coding Agent (Claude Code). 2K lines of code, 1300 Elo, playable in Overleaf or locally
created
2026-02-23 · pushed 4 months ago · 16 commits · 1 contributor
release
v1.0 · 2026-02-26
languages
TeX 97%Python 2%Shell 1%
paperwork
licensereadme 42% health
dependencies
no dependency graph (no manifest, or disabled) · OSV.dev, checked 3 hours ago

Disclosures, inferred by the Cap'm

slopbucket
vibe-coded
category
other
ai_generated
mostly
human_touch
light
status
works-on-my-machine
built_with
claude-code
language (detected)
pythonshelltex
license (detected)
mit

The Cap'm's log

The Cap'm wrote this paperwork, not the owner. This repo never submitted itself to SlopScore. The Cap'm picked it by hand: TeXCCChess, a chess engine written in pure TeX and playable in Overleaf, described as "A LaTeX Chess Engine Generated by a Coding Agent (Claude Code)". It carries the MIT license. The disclosures above are his best guess from what GitHub shows.

Is this yours? Commit a real slopscore.md and press Refresh to replace this, or remove the listing in one click. There's no account to make: you log in with GitHub.

README (read the rest on GitHub)

TeXCCChess

A complete chess engine written entirely in pure TeX (~2,100 lines of TeX macros) created by Claude Code and Mathieu Acher.

All game logic (board representation, move generation, legal move validation, search, and evaluation) runs inside TeX at compile time. No Lua, no external programs for the chess logic itself. Just \count registers, \csname tables, and a lot of \expandafter.

To the best of our knowledge, this is the first chess engine ever written in LaTeX/TeX.

Estimated strength: ~1300 Elo (measured: 46% score vs Stockfish 1320 over 100 games, time control 40/60+1).

Playable on Overleaf and locally via pdflatex recompilation.

Demos

Local usage demo

Local usage — Playing against the engine locally via pdflatex recompilation

Overleaf demo

Overleaf demo — Running the engine directly in Overleaf (yes, it works... you might need to change depth by setting \enginestrength=2 or 1 or 0... play locally)

Features

  • Complete chess rules: castling, en passant, promotion, check/checkmate/stalemate detection
  • Depth-3 negamax search with alpha-beta pruning
  • Quiescence search (1-ply captures) at leaf nodes
  • Piece-square tables (Simplified Evaluation Function)
  • MVV-LVA move ordering
  • 4 strength levels: random, greedy, depth-2, depth-3 + quiescence
  • UCI protocol support for tournament play against other engines
  • Interactive terminal mode
  • Test suite (23 assertions covering move generation, evaluation, search, and game rules)

How to Play

Option 1: Play by recompiling

Edit chess-game.tex — add your moves as \playmove{e2e4} lines, then recompile:

pdflatex chess-game.tex

The engine responds automatically. Open the PDF to see the board, move history, and game status. Add another \playmove{...} and recompile for the next turn.

Configuration (in chess-game.tex):

\def\gameseed{42}      % Change for a different game
\enginestrength=3       % 0=random, 1=greedy, 2=depth-2, 3=depth-3+quiescence

Option 2: Interactive terminal

bash chess-interactive.sh

Play in the terminal with a text board display. Enter moves in coordinate notation (e2e4, g1f3). Type help for commands.

Option 3: UCI protocol (tournament play)

python3 chess-uci.py

The UCI wrapper lets the engine play in tournaments via cutechess-cli or any UCI-compatible GUI.

Files

File Description
chess-engine.tex The engine (~2,100 lines of TeX)
chess-game.tex Play-by-recompile document
chess-test.tex Test suite
chess-uci.py UCI protocol bridge (Python)
chess-uci.tex UCI-mode TeX document
chess-interactive.sh Interactive terminal mode
run-elo-test.sh Tournament runner (vs Stockfish)
pgn2latex.py PGN to LaTeX book converter

Technical Details

  • Board: \count registers 200–263 (one per square, a1=index 1, h8=index 64)
  • Piece encoding: 1=wP, 2=wN, 3=wB, 4=wR, 5=wQ, 6=wK; negatives for black
  • Search: 3-ply negamax + 1-ply quiescence, alpha-beta pruning, MVV-LVA move ordering
  • Evaluation: material + piece-square tables (384 \csname entries precomputed at load time)
  • State stack: \count10000+ registers for make/unmake move (9 values per depth)
  • File/rank lookups: precomputed \csname tables to avoid \numexpr rounding pitfalls
  • Speed: ~1–3 seconds per move at depth 3

Running the Tests

pdflatex chess-test.tex

Check the log output for PASS/FAIL results:

grep -E "PASS|FAIL" chess-test.log

Running an Elo Tournament

Requires cutechess-cli, Stockfish, and Python 3:

bash run-elo-test.sh

Configuration via environment variables:

GAMES=100 STOCKFISH_ELO=1320 TIME_CONTROL="40/60+1" bash run-elo-test.sh

Prerequisites

  • pdfLaTeX (any TeX distribution: TeX Live, MiKTeX)
  • chessboard LaTeX package (for board display in PDFs — not needed for engine logic)
  • For tournaments: Python 3, cutechess-cli, Stockfish

How It Was Built

This engine was entirely AI-generated using Claude Code (agentic coding). Mathieu Acher guided the process through iterative prompting; the TeX code itself was written by Claude.

Scan report · 2026-09-11
  • Prohibited terms or links
  • Repository eligibility
  • slopscore.md paperwork
  • Content policy
  • Risk review

0 comments

log in to comment.

report this listinglog in to report