Nemobot: A Classroom Platform for Building LLM Game Agents
Researchers in Singapore and Hong Kong describe Nemobot, a chatbot platform where students program game agents with LLM calls, organized around Claude Shannon's four types of game-playing machines.
TL;DR
- Nemobot is a chatbot-based programming environment where users build agents for games like tic-tac-toe, Nim and Mancala, calling LLMs as modular "LLM functions" [^1].
- The team used it in courses with 251 students in Hong Kong and over 80 in Singapore, but reports no measured learning outcomes [^1].
Background
In work from the 1950s, Claude Shannon sorted game-playing machines into four types: dictionary machines that store a move for every position, machines that compute perfect play from a formula, machines that follow general principles of play, and learning machines that improve by trial and error [^1]. Shannon also asked whether a computer could eventually write 99 percent of its own orders [^1]. Authors from Nanyang Technological University and Nautilus Software Technologies in Hong Kong revisit that taxonomy with LLMs [^1].
What happened
Nemobot has three parts: a coding pad for the game logic and the agent's heuristics, a chat playground for playing and testing, and an analysis portal for evaluating the agent's performance [^1]. Games run as chatbots on platforms such as Facebook Messenger and Telegram [^1]. Users write a two-player game in a NodeJS template, defining the start state, the transitions and the end state, and then give the agent an initial heuristic, which they can describe in pseudo-code or natural language for the LLM to turn into code [^1]. The platform is model-agnostic: users bring their own API key for models such as GPT-4 or GPT-3.5, and the LLM is only called when the program triggers an LLM function, while the game state stays in memory locally [^1].
The paper walks through one game per Shannon type. For tic-tac-toe, with 19,683 board configurations, the board is sent to the LLM as text with cells numbered 0 to 8, and the model answers with a move instead of the program looking one up in a stored table [^1]. In Nim, where the player forced to take the last object loses, the program computes the Nim-sum and the LLM explains the resulting move in plain language [^1]. For Mancala, the LLM queries strategies while a minimax game tree stays the basis of the decisions, and human players compete on a leaderboard against minimax at three search depths for easy, medium and hard [^1]. For learning machines, agents use Donald Michie's Boxes algorithm in self-play, where winning moves become more likely to be picked again. In the paper's Nim simulation, a 21-stone pile with up to 3 stones per turn took 37 training rounds; a 22-stone pile with up to 6 took 90 [^1].
The platform was used at City University of Hong Kong in 2020 to 2021 with 251 students, at Nanyang Technological University in 2022 to 2023 with over 80, and in a remote internship with around 30 Princeton undergraduates [^1]. Students started with the OpenAI Playground and Codex and moved to ChatGPT and the OpenAI API in late 2022 [^1]. The authors say the source code, game implementations and example prompts are public [^1].
Why it matters
The authors' main argument is about reproducibility. Prompting an LLM directly to play a game, they write, yields non-deterministic, often non-reproducible behavior that is opaque to the user and hard to debug [^1]. Nemobot instead treats each LLM call as an inspectable component, comparable to a subroutine, that users can design, test, refine and share [^1]. They contrast this with systems such as Voyager, which in their description gives human developers no way to inspect, modify or share the strategies it discovers [^1].
The evidence is thin, though. The paper describes deployments and worked examples but reports no win rates against baselines and no measured effect on learning. It also asserts that the tic-tac-toe agent's moves align with optimal strategy without reporting how often that held [^1]. The authors list open problems themselves: LLMs do well at short-term decisions but struggle with long-term strategy in games like chess and Mancala, crowdsourced feedback is hard to keep consistent, and LLMs are expensive to run at scale [^1].
Practical example
Say Tomás teaches an introductory AI course and wants students to see why classic game AI works before adding an LLM. In week one, each student builds a dictionary-type tic-tac-toe agent by defining an action for each state, which shows how a heuristic shapes play [^1].
Next comes Nim. A student named Aiko describes the strategy in plain language, and Nemobot's LLM function turns it into code [^1]. When Aiko plays against the bot in the chat playground, it explains each move in terms of the Nim-sum [^1]. For the learning module, Aiko switches to Michie's Boxes algorithm and watches self-play push winning moves up. On a 21-stone pile with at most 3 stones per turn, the paper's simulation needed 37 rounds [^1].
For Mancala, the class plays against a minimax bot at easy, medium and hard depth on a shared leaderboard, and the LLM points out weak moves [^1]. Tomás keeps the game rules and the minimax search in code and uses the LLM only where it helps, because direct prompting gives results the authors call hard to reproduce [^1]. When a team proposes a chess bot, Tomás points to the paper's own warning that LLMs struggle with long-term strategy [^1].
Related gear
We recommend this book because it covers game-tree search with minimax and reinforcement learning, the classic techniques Nemobot's students build on.