-
-
start dialogue with visualization (gemini-2.5-flas-image) the dialogue steps and NPC actions totally controled by PDDL brain
-
you can deliberately anger the NPC and it will respond with hardcoded PDDL actions
-
2026-02-05 20:32:15 - npc_engine.gamemaster.visual - DEBUG - Visual: Full text prompt sent to LLM:
-
2026-02-05 20:32:15 - npc_engine.gamemaster.visual - DEBUG - Visual: Full text prompt sent to LLM:
-
neuro symbolic Concept PDDL + NLU
-
GAC (game as code) compiled graph
About the project
We built DAQS for the Gemini hackathon to bridge a gap we kept seeing: rigid scripted NPCs feel fake, while free-form LLM NPCs hallucinate, forget inventory, and break quest chains. DAQS pairs Gemini for natural language with a PDDL planner for provable game logic, so characters improvise while every move is mathematically grounded.
Inspiration
Modern AI NPCs talk well but act poorly. Inspired by GOAP systems (F.E.A.R., S.T.A.L.K.E.R.) and Gemini’s multimodal stack, we asked: what if NPCs spoke with Gemini but thought with a planner? That “two-brain” idea—LLM for style, PDDL for truth—became DAQS.
How we built it
- Neuro-symbolic core: We model each session as a PDDL tuple \(\Pi = \langle O, I, G \rangle\) where operators \(O\) cover moves like
move,pickup,persuade, \(I\) is the live state (location, inventory, mood), and \(G\) encodes quest goals. Plans \(\pi = \langle a_1, a_2, \dots, a_k \rangle\) come from unified_planning/Fast Downward. - Gemini front-end: Gemini classifies player intent, renders narrative around validated PDDL actions, and keeps to a Valid Moves list injected into prompts.
- Game as Code: Worlds, items, and personas live in YAML. The engine hot-swaps personas and regenerates graphs instantly.
- Client/server split: FastAPI backend hosts the world and planner; Streamlit UI runs the Game Master front-end.
Challenges we faced
- Neuro-symbolic mapping: Getting Gemini to emit stable predicates (e.g.,
(user-negative)) required a strict extraction schema and guardrails. - Hallucination control vs. creativity: We anchored Gemini with planner-approved metadata so it never invents NPCs or items, yet keeps flavor.
- Latency: Classical planning can be slow; domain pruning plus unified_planning kept responses under ~200 ms.
What we learned
Constraining creativity with structure actually amplifies it: Gemini can focus on storytelling while the planner enforces causality. Modeling “mood” and social states as predicates turns dialogue into tactical play—social chess instead of free-form improv.
Log in or sign up for Devpost to join the conversation.