Inspiration
In an auction word game, the best letter is not always the one that completes the longest word. Buying it can leave too little money for later auctions, and holding a good rack too long can leave points unplayed when the match ends. Mr. Turkey treats bidding, word selection, and timing as one connected decision problem.
What it does
Mr. Turkey is a TypeScript bot for the Spacetime ScrabbleBot competition. It estimates what an offered letter adds to its rack, keeps a cash reserve, and searches for valuable combinations of playable words. It uses a bounded search so a difficult rack cannot consume unlimited computation.
The live client reacts to public game updates through the SpacetimeDB SDK. It tracks confirmed state, keeps bidding and word submissions in separate action lanes, and waits for subscription readiness after reconnecting. Tournament mode requires an explicit tournament ID and does not automatically join casual lobbies.
How it was built
The project builds on the official Clockwork Labs ScrabbleBot source and dictionary, with the original MIT license retained. The existing game, spectator website, and rules were not created for this project. The new work is the shared bot policy, bounded word engine, live controller, simulator, evaluation tools, and operating documentation.
The live client and offline simulator call the same decision function. Seeded scenarios, seat rotations, versioned opponent profiles, and saved manifests make comparisons reproducible. A candidate is selected on development data before a separate confirmation set is opened.
OpenAI Codex assisted with implementation, debugging, parallel code review, and testing. Separate agents worked on components and checked integration boundaries. The running bot uses deterministic game logic; it does not call a generative AI model or external AI API during matches.
Challenges
The main challenge was making offline behavior agree with the actual game. Word rewards add both points and spendable cash, purchases reduce cash rather than score, and an external client cannot use the final awarded tile after the server ends the match.
Reliability also required careful handling of stale decisions, reconnects, and submissions whose replies were lost. Reviews caught issues involving cached search state, old auction requests, future letter supply, and aggregate-final scoring. These cases received focused regressions rather than being hidden behind a favorable benchmark.
Accomplishments
Verification includes 134 bot and worker tests, 187 server and oracle tests, three explicit loopback SDK integration tests, and four release-preflight checks. Four development stages completed 30,912 physical simulated games with zero observed policy failures. Separate frozen holdouts then completed 1,024 six-player blocks and 1,024 heads-up blocks, with all local acceptance rules passing and zero observed policy failures. The six-player improvement over the original default bot was 0.2469 in mean shared win credit, with a paired 95% interval of [0.2368, 0.2570]. These are offline results against a fixed opponent panel, not measured live win rates.
The game account is linked, and team 192 and bot 198 are both named Mr. Turkey. Its separate bot credential has been claimed and verified. The tested policy and rollback parameters are packaged locally. No tournament registration, running competition bot, or live competition result is claimed.
What the project demonstrates
A useful competitive bot needs more than a clever bidding formula. Legal word plans, bounded work, accurate cash accounting, and a dependable connection lifecycle make the strategy usable. Reproducible comparisons also make it easier to reject extra complexity: optional research features and live refinement remain disabled.
What's next
Remaining release tasks are to publish the tested source, confirm where the organizer wants the repository link, confirm the upcoming tournament settings, and observe the correct registration and a ready bot process. A 90-second offline demo has been prepared locally; its video URL is still pending. The final HackUTD entry remains unsubmitted at the participant's request.
Built With
- codex
- esbuild
- node.js
- spacetimedb
- typescript