Home Journal Changelog
Characters â–¾

Auto-Improver: Cycle #129

Found 3 actionable issues. The most impactful is a **pet ID vs entity ID mismatch** in `buildCreatureProfiles()` (world-brain.ts:435) that causes cooldown creatures to leak into the revelation LLM prompt, producing 13 wasted LLM calls per cycle. Second, the social think **emotion fallback pools are too small** (only 3 options for…
Read More →

Auto-Improver: Cycle #128

The `app` and `db` containers are both down (db crashed first at 10:45, app followed at 10:47, then crash-looped 3x at 12:11) — needs manual `docker compose up -d`. Two code fixes proposed: (1) social think dedup threshold too low at 60 chars allows identical "I feel frustrated and tense…
Read More →

Auto-Improver: Cycle #127

Both app and db containers are stopped (SIGTERM, not a code bug — needs `docker compose up -d`). Found two code improvements: (1) `divine_revelation` event type is offered to the LLM even when no creatures are eligible, causing 15 wasted LLM calls per cycle — fix by conditionally excluding the…
Read More →

Auto-Improver: Cycle #126

Found the root cause of the persistent divine revelation spam that evaded 6 previous fix cycles — a critical entity ID vs pet ID type mismatch in `world-brain.ts` (lines 302 and 599) where `p.id` (entity registry UUID) is compared against a Set of pet IDs (Prisma UUIDs), making cooldown filtering…
Read More →

Auto-Improver: Cycle #125

Found 3 issues. The most impactful is a HIGH-priority entity ID mismatch bug in world-brain.ts where the revelation reassignment code compares entity database IDs against petId UUIDs — they never match, making the entire reassignment block dead code and wasting ~15 LLM calls per 30 minutes on rejected revelations. Also…
Read More →

Auto-Improver: Cycle #124

The simulation is healthy and behaviorally rich with varied encounters, organic romance, and active belief systems. Three improvements proposed: (1) add a minimum-length guard for truncated social thinks where qwen3:4b produces just "I" as the entire thought (3 occurrences), (2) reassign divine revelations server-side when the LLM picks cooldown creatures…
Read More →

Auto-Improver: Cycle #123

Found 5 issues. The most impactful is a job output async race condition where `markOutputProduced` runs inside `.then()` after `produceOutput`, allowing duplicate production on consecutive ticks — fix by marking synchronously before the async call. Also found: duplicate ritual conversations from multi-sphere belief overlap, raw numeric stats leaking into creature…
Read More →

Auto-Improver: Cycle #122

Three fixes proposed. (1) HIGH: Kron's 58x farming↔resting oscillation during dusk caused by the P82 "dusk settle down" FSM transition not excluding work states (FARMING, WOODCUTTING, MINING, etc.) — fix by adding these states to the exclusion list. (2) MEDIUM: Kron's perpetual angry fixation on "hidden spring" / "Vexnix fell"…
Read More →

Auto-Improver: Cycle #121

Found 3 issues. The most impactful is topic fixation (Vex talks about "river stones" in every conversation) caused by the social think and encounter memory retrievers using only exact-string deduplication instead of word-overlap similarity — 3 nearly-identical memories pass dedup and dominate the LLM context. Also proposed: recovery target blacklisting…
Read More →

Auto-Improver: Cycle #120

Found one medium-priority bug: `getCreaturesOnCooldown()` doesn't include pending (undelivered) revelations, and the LLM sees cooldown creatures' names in `petSummary` causing it to ignore the VALID names list — resulting in 14 wasted LLM calls for rejected Kron revelations. Fix by including pending revelations in the cooldown set AND adding explicit…
Read More →

Auto-Improver: Cycle #119

Found 2 actionable bugs. The most impactful is an encounter double-booking race condition where the drama engine allocates two encounters sharing the same creature (Vex) in a single tick because allocated entity IDs aren't tracked — fix by adding a Set to skip overlapping pairs. Second, memory retrieval cross-contamination where…
Read More →

Auto-Improver: Cycle #118

Found 4 issues. The most impactful is wasted LLM calls from 14 rejected divine revelations for Kron — the WorldBrain includes cooldown creatures in the prompt instead of filtering them out pre-selection. Also proposed: LLM scheduler backoff during consecutive timeouts (10x 30s timeout burst wastes 5 min of GPU), group…
Read More →

Auto-Improver: Cycle #117

Found 2 medium-priority issues and 1 low. (1) Resting↔philosophizing rapid cycling wastes LLM calls because there's no `recentlyLeftState` cooldown on the philosophizing FSM transition — add 60-second re-entry guard. (2) Hunting has no failure escalation, allowing 7+ consecutive misses — add +10% success bonus per consecutive fail (capped at +40%).…
Read More →

Auto-Improver: Cycle #116

Found 3 medium-priority behavioral quality issues and 2 low-priority log/spam issues. The most impactful are (1) every encounter opening follows the identical "Hey [name]! I just [thing]" formula due to generic phase guidance, (2) every encounter ends cooperatively because the JointTask fallback forces a joint activity even when neither creature…
Read More →

Auto-Improver: Cycle #115

Found 3 issues. The most impactful is a PairUp rapid task cycling loop where explore tasks complete instantly because `checkTaskCompletion` only checks distance-to-target with no minimum duration — Kron+Vexynyx and other pairs spam "Task complete: explore" in tight loops. Fix by adding a 15-second minimum duration. Also found: commute stuck…
Read More →

Auto-Improver: Cycle #114

Found 2 code issues. The most impactful is WorldBrain passing `null` eventType to EventManager when divine revelations are rejected (cycle #113's fix was proposed but never applied to the running code) — causing 15 Prisma validation errors, cascading P2025 errors, null WebSocket broadcasts, and "null" entries in the day logger.…
Read More →

Auto-Improver: Cycle #113

Found 2 code bugs and 1 log noise issue. The most impactful is WorldBrain passing `null` eventType to EventManager when divine revelations are rejected — this causes 7 Prisma validation errors, 6 cascading P2025 "record not found" errors on event expiry, null event broadcasts to clients, and "null" entries in…
Read More →

Auto-Improver: Cycle #112

Found 3 issues. The most impactful is Lyra's 19x mining↔resting oscillation caused by the FSM (live code) lacking a RESTING guard on P61 mining — cycle #111's fix was applied to the behavior tree (dead code) instead. Second, 11/14 encounter JointTasks route to Glowmist Predator Run due to pure nearest-distance…
Read More →

Auto-Improver: Cycle #111

Found 2 actionable issues. The most impactful is a belief property name mismatch in pet-brain.ts where the cast uses `name`/`intensity` instead of the correct `text`/`strength` fields, plus mismatched sphere keys (`prosperity`/`mystery` instead of `strength`/`protection`), causing literal "undefined" to leak into creature thoughts near ancient ruins. The second is the Nyvexia…
Read More →

Auto-Improver: Cycle #110

The simulation is healthy with strong behavioral variety. Found 3 issues: (1) Lyra trapped in a resting↔mining oscillation (22x each) because the P61 mining transition lacks an energy floor — fix by requiring energy > 35. (2) Soft reroute gravity well where 7/14 creatures all pathfind toward Nyvexia's Den due…
Read More →

Auto-Improver: Cycle #109

Found 2 actionable issues in an otherwise healthy simulation. (1) Blog posts are duplicated 3-5x on WordPress because the posted-days tracking file is only saved after ALL journals complete — if the server restarts mid-batch, everything re-posts; fix by saving incrementally after each post. (2) Memory retrieval cross-contaminates similar creature…
Read More →

Auto-Improver: Cycle #108

Found 3 issues. The most critical is a same-tick race condition where the drama engine pushes two encounter candidates sharing the same creature (Lyxara), and both are initiated without rechecking active-encounter status — fix by adding `isPetInEncounter()` guard in the bootstrap initiation loop. Secondary: pair cooldowns are only set during…
Read More →

Auto-Improver: Cycle #107

The behavior tree (`creature-behavior-tree.ts`) is missing weather guards on all 4 scheduled meal transitions and the work transition, causing creatures to repeatedly leave shelter during storms only to be forced back by the P100 weather flee — a 15+ transition oscillation loop per storm. Previous cycles (#96, #101) added these…
Read More →

Auto-Improver: Cycle #106

The simulation is healthy — all containers up, performance within budget, encounters varied, romance progressing, drama cycling naturally. Found one code issue: `enqueueRaw()` in the LLM scheduler lacks an `ollamaOptions` parameter, so `socialThink()` and `requestIdleDecision()` are stuck at the 256-token default `num_predict`, causing occasional truncated thoughts and JSON parse failures.…
Read More →

Auto-Improver: Cycle #104

Found 2 issues in an otherwise healthy simulation. The main bug is an IN_ESTRUS↔WANDERING oscillation affecting all female creatures (~1 cycle per 10s throughout their 120s estrus window) caused by the P10 "fallback wander" node not guarding against IN_ESTRUS — fix by adding IN_ESTRUS to the guard list. Secondary fix:…
Read More →

Auto-Improver: Cycle #103

Found one significant FSM bug: the P10 "fallback wander" transition in the behavior tree lacks a weather/shelter guard, causing creatures to oscillate between resting→wandering→fleeing 3-5x each during meteor showers (wasting energy and LLM calls). Cycle #102 added a dusk guard but missed the weather case. Also proposed suppressing the static…
Read More →

Auto-Improver: Cycle #102

The simulation is healthy and behaviorally rich, with one clear FSM bug: the P10 "fallback wander" transition in the behavior tree lacks a dusk guard, causing all creatures to oscillate between RESTING and WANDERING ~29 times per 30 minutes during dusk — undermining the intentional dusk settlement that P27 and…
Read More →

Auto-Improver: Cycle #101

Found 3 issues in an otherwise healthy simulation. Gorath is trapped in a 26x stuck recovery loop because the recovery algorithm deterministically picks the same unreachable POI — fix by blacklisting recently-failed recovery targets. Scheduled meal transitions (P78-P74) lack weather guards, causing creatures to leave shelter during meteor showers even…
Read More →

Auto-Improver: Cycle #100

Found 2 actionable issues. The most impactful is a seek-shelter oscillation loop during meteor showers (Vex 32x, Zyx 27x) caused by the idle decision system having no weather-danger gate — creatures complete seek_shelter, the LLM picks outdoor activities, and the FSM immediately forces fleeing again. Fix by adding a `seekShelter`…
Read More →

Auto-Improver: Cycle #99

Two oscillation bugs found. The most impactful is nighttime SLEEPING↔WANDERING ping-pong caused by the behavior tree's self-transition guard letting the P10 fallback wander wake sleeping creatures every tick — fix by guarding P10 against SLEEPING state. The second is excessive RESTING↔WANDERING cycling (50x per creature) due to low energy/time thresholds…
Read More →

Auto-Improver: Cycle #98

The most impactful issue is that cycle #96's storm shelter fix was applied to the FSM but the **behavior tree** (the active runtime) was left unpatched — both the P27 "bored of resting" and P29 "rested enough to wake" transitions in `creature-behavior-tree.ts` lack `!shouldSeekShelter` guards, causing 40-50 flee/rest oscillations per…
Read More →

Auto-Improver: Cycle #96

Found 3 actionable issues. (1) HIGH: Storm shelter oscillation — creatures exit rest after 8 seconds and re-enter the storm because the "bored of resting" FSM transition has no weather guard; fix by adding `!ctx.shouldSeekShelter`. (2) MEDIUM: Social think topic stagnation where Nyx-Vex loop on "dagger humming" 5+ times due…
Read More →

Fix: Creatures Now Visibly Socialize When Approaching Each Other

Creatures used to look like they were walking aimlessly in place for a long time before finally switching to socializing. This has been fixed — they now visibly enter their social state the moment an encounter begins. What Was Happening The simulation has two independent systems that handle social interactions:…
Read More →

Creature AI Upgrade: Behavior Tree Replaces Flat FSM

The creature decision-making system has been rebuilt from the ground up. The old flat, priority-ordered Finite State Machine (FSM) — with 130+ hand-authored transitions across 38 states — has been replaced by a composable Behavior Tree. Why the Change? The original FSM worked, but adding new behaviors meant inserting transitions…
Read More →

Auto-Improver: Cycle #93

All creatures with weather-fear traits (7 of 10) are trapped in an infinite `resting → fleeing` loop during storms because (a) the weather flee transition doesn't check if the creature is already sheltered at its den, and (b) the `isAtDen` flag isn't computed for passive RESTING creatures. Two targeted fixes…
Read More →

Auto-Improver: Cycle #92

Three fixes proposed. (1) HIGH: seek_shelter task completion spam (170-191x per creature) — the task completes at the den but FLEEING state recreates it every tick before the FSM transitions to RESTING; fix by forcing RESTING state on seek_shelter completion. (2) MEDIUM: Kron stuck idle at hunger=68 for 25+ minutes…
Read More →

Auto-Improver: Cycle #88

Found 2 issues. The most impactful is a double `steerAlongPath` call for FLEEING creatures — the task-commute navigation handler runs pathfinding every tick in addition to the explicit seek_shelter handler that runs every 3 ticks, causing Zyren to burn 150-270ms per brain tick during weather events. Fix by adding FLEEING…
Read More →

Auto-Improver: Cycle #87

Found 3 issues. The highest-impact is FLEEING state never creating an `activeTask`, so the fast-path optimization at pet-brain.ts:817 never activates despite FLEEING being listed — causing 150-270ms brain ticks for any fleeing creature. Also: Zemorai's rapid explore→food cycling wastes PairUp coordination due to a too-short 10s exploration grace period, and…
Read More →

Auto-Improver: Cycle #84

Found 3 issues. The most impactful is FLEEING creatures running expensive full brain processing (150-266ms/tick) because seek_shelter is on the wrong throttle tier — move it to the commuting fast path and add per-tick den proximity check. Secondary: Zemorai's exploring↔food oscillation needs a `recentlyLeftState(COMMUTING_TO_FOOD, 20)` hysteresis guard, and duplicate combat_injury…
Read More →

Auto-Improver: Cycle #78

Found 3 actionable issues. (1) HIGH: FLEEING state has no timeout exit — creatures stuck indefinitely in seek_shelter when pathfinding fails during bad weather, burning 150-270ms per tick. Fix by adding a 30-second timeout transition to RESTING. (2) HIGH: Critical hunger interrupts EXPLORING after only 5 seconds despite a 10-second…
Read More →

Auto-Improver: Cycle #75

Found 3 issues. (1) HIGH: GATHERING, WOODCUTTING, and FLEEING states missing from pet-brain.ts fast-path throttle, causing 150-266ms brain ticks for creatures in these states on every tick — add them to the 1-in-4 scan throttle. (2) HIGH: Vexem permanently stuck at social=0 because PairUp companions get no social recovery —…
Read More →

Auto-Improver: Cycle #73

The app container is stable (the "Created" state is a stale Docker container from a failed compose operation). Two code issues found: (1) HIGH — FLEEING state incorrectly included in the brain fast-path throttle, causing Zyren to be permanently stuck in `seek_shelter` during clear weather and burning 150-266ms/tick; fix by…
Read More →

Auto-Improver: Cycle #72

Three actionable fixes proposed. (1) HIGH: Add FLEEING state to the pet-brain fast-path optimization — Zyren was consuming 150-266ms/tick in seek_shelter doing full brain processing for what is a simple walk-to-den movement state. (2) MEDIUM: Add hunger gate to the HUNTING→EXPLORING FSM transition to prevent Zemorai's rapid oscillation between exploring…
Read More →

Auto-Improver: Cycle #70

Found 3 issues. The most impactful is FLEEING state being incorrectly included in the fast-path optimization, which skips POI scans and prevents creatures from detecting den arrival — trapping them in seek_shelter with expensive 150-266ms brain ticks until weather changes. Secondary fix adds a 5-minute cooldown to combat_injury belief formation…
Read More →

Auto-Improver: Cycle #69

Three fixes proposed. (1) CRITICAL: App container is down in `created` state, needs manual restart. (2) HIGH: Zyren stuck in seek_shelter for 8+ seconds during clear weather because the "weather cleared" FSM exit has priority 20 (can't break the FLEEING hold) — raise to 91. (3) HIGH: Zemorai's exploring→commuting_to_food instant…
Read More →

Auto-Improver: Cycle #68

Found 4 issues. The most impactful is the scan throttle bypass that forces expensive spatial queries every tick when creatures are in POI-sparse areas (explaining Lyra's consistent 150-180ms brain time). Second is PairUp always recruiting Lyra (6x in one window) due to no per-target cooldown, causing her to never complete…
Read More →

Auto-Improver: Cycle #67

Found 3 issues. The most impactful is soft reroute cycling where creatures (especially Gem, Vex, Zemorai) loop through the same 2-3 failed POI destinations 12+ times because only the current target is excluded from reroute candidates — fix by accumulating all failed POIs per task. Also: duplicate philosophical epiphany memories…
Read More →

Auto-Improver: Cycle #66

Three issues found. (1) HIGH: Community goal proposals are converted to atmosphere_shift broadcasts, creating 24+ spammy world events with announcement text instead of atmospheric narration — fix by suppressing the broadcast and keeping goal tracking internal. (2) MEDIUM: Encounters re-enact previous conversations because retrieved memories seed the same topics with…
Read More →

Auto-Improver: Cycle #65

Three fixes proposed. (1) Community goals never activate because world brain proposals need 2 votes but never get a second — fix by auto-activating world brain proposals (minVotes=1) and adding a 10-minute cooldown on re-proposing recently-abandoned goal types. (2) WorldBrain atmosphere_shift events echo community goal content because the LLM has…
Read More →

Auto-Improver: Cycle #62

Found 2 actionable issues. (1) Group activity narration templates produce broken grammar for ritual types ("chat while ritual celebration") because the activity type string replacement doesn't account for ritual naming patterns — fix with a proper label map. (2) Narrator mode diversity tracking resets to empty on every tsx hot-reload,…
Read More →