Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I gave NPCs a graph database. Now the whole village knows I stole an apple.

Описание и применение

Hearsay использует графовую базу FalkorDB для моделирования памяти и слухов у NPC, позволяя им хранить события, слухи, доверие и происхождение, что делает социальные взаимодействия более реалистичными.

Задача

Game characters forget everything and cannot trace how reputation or gossip spreads, making in‑game social interactions unrealistic.

Результат

Hearsay demonstrates that a graph‑based memory model can give NPCs realistic gossip dynamics, including trust‑based propagation, confidence decay, exaggeration, and provenance tracking, enabling in‑game explanations of beliefs.

Рабочий процесс

  • 1. Create a read‑only template village graph.
  • 2. For each player, copy the template to a per‑player graph (hearsay_<playerId>).
  • 3. Every in‑game hour, match villagers in the same place who trust each other to identify gossip opportunities.
  • 4. When a teller tells a listener a story, create a new Rumour node for the listener with confidence, severity, and provenance via HEARD_FROM and ORIGIN relationships.
  • 5. Update confidence based on trust and hops, adjust severity if the teller exaggerates, and merge rumours if already known.
  • 6. Provide a query that, given a villager, returns the shortest provenance chain to the true event.
  • 7. Use the provenance chain to answer “Why do you think that?” questions.
  • 8. Render the game world and allow players to interact with NPCs whose memories evolve over time.

Доказательства

Game characters forget everything. The shopkeeper greets you warmly five seconds after you robbed them.

Each player gets their own graph (hearsay_<playerId>), created with GRAPH.COPY from a read-only template village.

When A tells B a story, B gets their own version: … CREATE (b)-[:HOLDS …]->(r)...

MATCH (v:Villager {id:$villager})-[:HOLDS]->(r:Rumour)... RETURN [n IN nodes(path) WHERE n:Rumour | n.id] AS rumour_ids, e.base_text AS what_happened

  • Дата записи: 2026-10-17T12:56:08.250Z