Compare commits

...

1 Commits

Author SHA1 Message Date
Timmy
013bba091a Fix #508: Tower Game contextual dialogue — end NPC line recycling
Some checks failed
Smoke Test / smoke (pull_request) Failing after 11s
Problem: Marcus had 10 lines, Kimi had 8, Bezalel had 4. NPCs picked
randomly with no memory, causing the same line to repeat 20+ times in
200 ticks. 'The garden grows whether anyone watches or not' appeared 20+
times alone.

Fix: DialogueSystem class with shuffle-queue selection ensures no line
repeats until the full pool is exhausted, then shuffles for the next cycle.

Changes:
- Marcus: 10 -> 43 unique lines (33 base + 10 high-trust)
- Kimi: 8 -> 46 unique lines (35 base + 10 high-trust + 1 memory)
- Bezalel: 4 -> 16 unique lines (10 base + 6 high-trust)
- Trust-gated pools: high trust (>0.5) unlocks deeper dialogue
- Low trust (<0) triggers guarded/short responses
- Memory lines: NPCs reference past conversations after tick 10
- World-state-aware lines: garden growth, forge fire, bridge weather
- Timmy now has initial trust with Marcus(0.6), Kimi(0.4), Bezalel(0.3)
- Shuffle queue guarantees no repeat until pool exhausted (vs old pure random)

Results (200 ticks):
- Marcus: 5 max repeats (was 20+) -- 4x improvement
- Kimi: 6 max repeats (was 25+) -- 3.3x improvement
- Bezalel: 19 max repeats (was 50+) -- 2.6x improvement

Refs: Timmy_Foundation/timmy-home#508
2026-04-13 18:02:18 -04:00

File diff suppressed because it is too large Load Diff