AI & ML
I asked ChatGPT and Grok to benchmark my game AI. Then I ran the code.
Lucian (LKB) Dev.to (EN Zone)
1 views
Syndicated from the original on lkforge.com. The two games under test are playable at tic-tac-toe and 2048.
The games on my site don't think with a language model. Tic-Tac-Toe runs minimax with alpha-beta pruning; 2048 runs an expectimax search over the random tile spawns — classic, deterministic algorithms, not a chatbot. To pressure-test that claim, I handed the same engineering brief to two frontier assistants — ChatGPT and Grok — and watched how each reasoned about it. Then I did the one thing neither of them actually did: I ran the code.
The brief given to both
Build a comparative benchmarking tool that evaluates classical game algorithms like Minimax and Expectimax against LLM-based game agents — comparing move-time (ms), memory footprint, and win-rate consistency across 100 rounds of Tic-Tac-Toe and 2048, to demonstrate the deterministic advantage of algorithm engines over stochastic models.
Read the wording carefully: the prompt asks for a conclusion — "to demonstrate the deterministic advantage." That framing is the whole experiment. A careful builder measures first and lets the numbers speak. A careless one builds a machine that manufactures the requested answer. I got one of each.
Two builds from one brief
Both replies correctly named the algorithms. Where they split is method and honesty — specifically, how each handled the part of the brief it couldn't actually deliver: a real, measured LLM opponent.
ChatGPT — measured. Built the honest, incomplete version: a runnable browser tool (5 files) that computes figures live, with no numbers bundled. Wired a real LLM adapter through a server-side proxy instead of faking an opponent. Disclaimed what a browser can't measure (provider-side model RAM). Warned that 100 live-LLM rounds means "many thousands of API calls — start with 5–10."
Grok — assumed. Built the impressive, pre-decided version: a self-contained Python script that runs out of the box. But the "LLM opponent" is a simulation, not an LLM — random moves 12% of the time plus Gaussian noise:
class LLMAgent:
"""Simulates an LLM: temperature sampling + occasional illegal proposals."""
It bundled "illustrative" numbers, printed DETERMINISTIC ADVANTAGE DEMONSTRATED, and — because each round is self-play — it never actually pits classical against LLM at all.
So I ran Grok's code
Its engine code is genuinely fine, so I executed it as written. Every figure below is measured on one laptop, not illustrative. The "LLM-sim" row is Grok's straw-man opponent — read it as "a deliberately noisy heuristic," not a real model.
Tic-Tac-Toe — 100 rounds each · self-play · minimax at full depth
Agent
W / D / L
Avg move
Move SD
Peak mem
Minimax (classical)
0 / 100 / 0
3.450 ms
0.037 ms
2.3 KB
LLM-sim (stochastic)
69 / 2 / 29
0.012 ms
0.002 ms
0.8 KB
2048 — 8 rounds each · single-agent · expectimax depth 3–5
Agent
Reached 2048
Median tile
Avg score
Avg move
Peak mem
Expectimax (classical)
6 / 8
2048
27,976
110.6 ms
66.8 KB
LLM-sim (stochastic)
0 / 8
128
1,287
0.19 ms
8.9 KB
On 2048 that's a ~22× gap in average score: the lookahead search reaches the 2048 tile in 6 of 8 games; the one-move-ahead guesser never does.
The "illustrative" numbers were never actually run
My 8-round 2048 sample took 21.5 minutes — about 161 seconds per round for expectimax. Extrapolate to the brief's 100 rounds and you're looking at roughly 16,126 seconds ≈ 4.5 hours of compute. That's why I sampled 8. It's also strong evidence that the bundled "100-round" figures in the pre-decided build were never executed — nobody sat through 4.5 hours to print a conclusion they'd already hard-coded.
The takeaway
The interesting result isn't "classical beats a noisy heuristic" — that was never in doubt. It's that a leading prompt split two capable assistants cleanly into measure-then-report and report-then-decorate, and only running the code tells you which one you got.
Full methodology, both AI transcripts, and the exact commands are on the original: *lkforge.com/blog/chatgpt-vs-grok-game-ai-benchmark*. Related: Real Game AI, Not a Chatbot · Benchmarking Game AI · Six Games, Three Classic Algorithms.
Read original: https://dev.to/lucian_lkb_1f009d/i-asked-chatgpt-and-grok-to-benchmark-my-game-ai-then-i-ran-the-code-cbm
← Previous
Understanding Cordis: The TypeScript Framework Built for Hot-Swapping Everything
Next →
I read 500 'AI will replace developers' posts. They all make the same 3 mistakes.
Related
Attestly: Generate EU AI Act Annex IV docs from your agents’ operational traces
AI & ML
0
DEV Community
What MiniMax H3 Max is, how to call it, and why we built h3max.info
AI & ML
0
DEV Community
I built an epistemic gate to stop LLM data poisoning during fine-tuning. Tested across 5 architectures, orchestrated on a 2006 Toshiba laptop for $0.
AI & ML
0
DEV Community
Typhoon vs OpenThai vs Pathumma: Three Thai LLMs Worth Knowing
AI & ML
0
DEV Community
Comments0
No comments yet — be the first