Show HN: How to beat Pac-Man with a text classifier A developer built a Pac-Man agent that reaches an average of 9.8 ghost kills per game using Jeffy, an open-source CPU text classifier, instead of an LLM, according to the Jevman benchmark project on GitHub. The agent parses the game's structured junction descriptions — roughly 37 unique patterns containing pellet distances, ghost positions, traps and danger flags — into numeric features with regex, then trains a logistic regression head on thousands of junctions labeled by a hand-tuned scoring function. Training takes under a second and the trained model returns a direction in 3ms via Jeffy's predict_features() endpoint. Jevman https://github.com/opper-ai/jevman-benchmark is a Pac-Man benchmark where AI agents play through structured text descriptions. At each junction, the game tells you what's in each direction pellet distances, ghost positions, traps and you pick which way to go. The top entries use LLMs. I used Jeffy https://github.com/nicobrenner/jeffy , an open-source text classifier that runs on CPU. At every junction, the game sends one text description per available direction: Go left: nearest pellet 3 steps away; 5 pellets in the next corridor; nearest dangerous ghost 12 steps away, moving away; you reach the next junction in 4 steps, 6 steps before any ghost Go right: nearest pellet 1 step away; 2 pellets in the next corridor; DANGER: Blinky in this corridor Go up: nearest pellet 8 steps away; 0 pellets in the next corridor; TRAP: Pinky can reach the next junction in 3 steps, you need 5 There are about 37 unique patterns in these descriptions. All of them contain numbers. All of them are parseable with regex. The game descriptions are structured text, so I parse them into numeric features with regex. python def parse features description : f = {"pellet dist": 99, "ghost dist": 99, "ghost approaching": 0, "has trap": 0, "has danger": 0, ...} for part in description.split ";" : m = re.search r"nearest pellet \d+ steps? away", part if m: f "pellet dist" = int m.group 1 m = re.search r"nearest dangerous ghost \d+ steps? away", part if m: f "ghost dist" = int m.group 1 if "TRAP:" in part: f "has trap" = 1 if "DANGER:" in part: f "has danger" = 1 return f To train a classifier you need labeled examples. I wrote a scoring function with hand-tuned weights and played a few hundred games with it. Each junction becomes one training example: the parsed features are the input, the direction the scorer picked is the label. python def score direction description : f = parse features description score = 0.0 Survival: avoid ghosts, traps, danger corridors if f "has danger" : score -= 100 if f "has trap" : score -= 80 if f "ghost dist" < 99: threat = max 0, 20 - f "ghost dist" 3 if f "ghost approaching" : threat = 2.5 score -= threat Pellet collection score += max 0, 12 - f "pellet dist" Hunt frightened ghosts 200-1600 points each if f "has frightened ghost" : score += 40 + max 0, 15 - f "frightened ghost dist" 3 return score A few hundred games produce thousands of labeled junctions, enough to train on. Jeffy https://github.com/nicobrenner/jeffy is a text classifier that runs on CPU. It supports feature-based classifiers, which is exactly what we need here: the features are already numbers, no embeddings required. Train a classifier on the collected game data jeffy train --task pacman --features pellet dist,ghost dist,ghost approaching,has trap,has danger,... \ --data training games.jsonl Test accuracy on held-out games jeffy eval --task pacman --data test games.jsonl Training takes under a second. The trained model is a logistic regression head over the numeric features. At game time, Jeffy's predict features endpoint takes the parsed feature vector and returns a direction in 3ms. When a power pellet activates, frightened ghosts are worth 200, 400, 800, and 1600 points in sequence. The scoring function shifts from pellet-chasing to ghost-hunting: +40 base plus a distance bonus for nearby frightened ghosts. Average 9.8 ghost kills per game. Install Jeffy pip install jeffy Start the Jeffy endpoint serves the trained pacman classifier python3 jevman-endpoint.py 8787 Clone the benchmark and run 24 games git clone https://github.com/opper-ai/jevman-benchmark cd jevman-benchmark && npm install npm run submissions -- --model jeffy --endpoint http://localhost:8787 Each game takes 2-5 seconds. Total run: ~90 seconds for all 24 games. The endpoint parses each junction's text into features, feeds them to the Jeffy classifier, and returns a direction. An LLM reading "nearest dangerous ghost 5 steps away, coming toward you" does the same thing the regex does: extracts the number 5 and the flag "coming toward." It just does it with 7 billion parameters instead of one regular expression, and takes 650ms instead of 3ms. The Jeffy classifier learns the same decision boundaries as the hand-tuned scoring function, but from examples instead of manually chosen weights. Once trained, it generalizes to junction configurations it hasn't seen before. And because it's logistic regression over a handful of numeric features, it runs on any CPU in 3ms. This is the classifier sweet spot: when the answer is a pattern in the text, not reasoning about the text. Pac-Man with structured descriptions is a classification problem. The PR is open https://github.com/opper-ai/jevman-benchmark/pull/18 , the CI will verify the results.