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.

Built With

Share this project:

Updates

posted an update

  • Author your world in YAML: locations with connections, locks/requirements, items and where they spawn, and any keys or concepts that unlock paths.
    • GameMaster ingests that YAML into a graph and auto-renders PDDL domain/problem, mirroring your locks (requires_concept/ requires_combo), items, and connectivity.
    • The planner (unified_planning/Fast Downward) computes shortest plans to acquire target items or reach target locations, respecting all constraints (locked nodes, required items/concepts, portals).
    • Dynamic state (visited, unlocked, inventory) feeds into PDDL each turn, so plans stay consistent with player progress.
    • You tweak quests by editing YAML—add a bridge, move an item, change a lock—and the next plan reflects it without code changes.

Log in or sign up for Devpost to join the conversation.

posted an update

A declarative adaptive quest system using world graphs, PDDL planning, and a FastAPI interface to serve as the intelligent "Brain" for external Game Masters.

DAQS (Declarative Adaptive Quest System) is a Neuro-Symbolic Engine that decouples Logic from Narrative.

  1. The Brain (Logic): A classical PDDL Planner (Fast Downward) manages the world state. It calculates plans like "Move to A -> Pick up Key -> Unlock Door -> Move to B". It ensures the quest is mathematically solvable.
  2. The Voice (Narrative): Google Gemini 2.0 Flash takes these dry logic steps and turns them into immersive, role-played descriptions.
  3. The Artist (Visuals): Gemini 3 Image Pro paints the scene in real-time, visualizing the exact location and items mentioned in the story.

The result? An infinite quest generator where you can roleplay, argue with NPCs, and explore a world that never breaks its own rules.

Log in or sign up for Devpost to join the conversation.