
A 2D game where a small town comes to life through characters driven by a large language model (Claude). Each NPC has a profession, its own memory and a social life: it buys materials, produces goods, trades, chats with its neighbours and hands out quests to the player. Instead of scripted dialogue, the characters reason, remember and react to what happens around them.
Technical highlights:
- Generative agents with episodic memory (a memory stream retrieved by relevance + recency + importance, inspired by Park et al., 2023).
- Semantic memory using local embeddings (MiniLM) on a vector database (ChromaDB).
- A real economy: owned items, professions, crafting recipes and scarcity with cooldowns.
- Emergent quests generated with a hybrid approach (the model writes them, the code guarantees they’re always completable).
- State grounding to curb hallucinations: NPCs answer tied to their real inventory and pending errands.
Stack: Python · FastAPI · Claude (Anthropic) · ChromaDB · sentence-transformers · SQLite · Unity (C#) · REST API.
Role: end-to-end design and implementation (agent backend + Unity client + integration).d de agentes + cliente Unity + integración).
Code Repository
https://github.com/antoniocxv/TFM-Trade
Meet link
TFM Defense
Date: July 15, 12.00 Insular time. La Laguna. Spain