packages/examples/tic-tac-toe/README.md
A tic-tac-toe game demonstrating elizaOS's ability to run agents without an LLM.
Agent-N)TEXT_LARGE and TEXT_SMALL to return optimal movesTypeScript entry: game.ts.
Instead of calling an LLM, this agent registers custom model handlers that:
The agent never loses - it will always win or draw!
# TypeScript
bun run examples/tic-tac-toe/game.ts
┌─────────────────────────────────────────────────────────┐
│ AgentRuntime │
│ (Anonymous Character) │
├─────────────────────────────────────────────────────────┤
│ plugins: │
│ ├── plugin-sql (persistence) │
│ ├── bootstrap-plugin (basic capabilities) │
│ └── tic-tac-toe-plugin (custom model handlers) │
├─────────────────────────────────────────────────────────┤
│ runtime.useModel(TEXT_SMALL, { prompt: boardState }) │
│ ↓ │
│ ticTacToeModelHandler() ← NOT an LLM! │
│ ↓ │
│ parseBoardFromText() → minimax() → optimal move │
└─────────────────────────────────────────────────────────┘
Since there's no LLM latency, the AI responds instantly: