Major simulation features:
- Age progression (1 year per 365 sim days) with lifecycle stages
- Death system for 80+ with exponential probability curve
- Divorce mechanic for unhappy marriages (low trust/sentiment/mood)
- Married couples move in together (cohabitation)
- Church wedding ceremonies, hospital births after 9 sim-day pregnancy
- Baby agents born as real citizens, living with parents, autonomous at age 4
- Annual mayor elections with weighted voting (18+ citizens)
- Short-term (weekly) and long-term goals with auto-refresh
- Memory query API: ask any agent about their memories via LLM
- Community score tracking for election candidacy
- UI: lifecycle badges, deceased agents, mayor display, split goals,
memory query input, parent info, new event icons
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add life events, goals, pregnancy system; fix profile editor bugs
- Life events: append-only timeline seeded from persona, extended by
LLM reflections and romance milestones (dating/engaged/married/birth)
- Goals: personal aspirations with progress tracking, managed by LLM
reflections (add/complete/progress)
- Pregnancy: married couples can conceive, birth after ~7 sim-days,
baby names, both parents get memories and life events
- Agent context: LLM now sees life story, goals, children, pregnancy
- Fix profile editor: fetch full agent detail instead of WS summary
(occupation, background, personality sliders now load correctly)
- Fix Go dropdown: only rebuild when empty, preserves user selection
- Fix WS state summary: include age, occupation, daily_plan, is_player
- NN self-improve: track accuracy in training_stats.json, compare with
previous model on push
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diversify agent activities, add local training script, scheduled Gemini cycle, architecture diagram
- routine.py: Add morning/post-work exercise, park lunch, sports_field for more
personality types, varied activity descriptions, park as exercise destination
- nn_train.py: Standalone local training script (equivalent to Kaggle notebook)
with synthetic data gen, ONNX export, HF push, CUDA support
- nn_selfimprove.py: Add 'scheduled' mode for nightly Gemini collection + retrain,
oversample LLM-sourced samples 3x during training
- routes.py: Fix valid providers list (nn instead of hf)
- docs/architecture.html: SVG diagram of SociAgentTransformer architecture
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Sleeping agents now displayed horizontally on a bed with pillow,
blanket, closed eyes and floating ZZZ bubbles
- Agents walking upward show back view (no face, hair covers back of head)
- Road network expanded: north/south access roads + far west/east avenues
give full coverage to every building on the map
- Movement uses L-shaped 2-waypoint queue routing via road grid instead
of a single midpoint snap (agents walk along streets)
- _add_evening_block now fills the full period until sleep — eliminates
the 18:30–22:00 unscheduled gap that flooded Ollama with LLM requests
- Ollama/Claude now capped at 10 LLM calls + 3 conversations per tick
(was unlimited), keeping tick speed consistent at normal simulation speed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix agent clustering: valid house slots, even street routing, wider crowd spread
Root causes of 66-agent pile-up:
1. GEN_HOUSE_SLOTS had top row at y=0.06 and interior at y=0.13 (sky/mountain).
All 55 slots now in valid ground area (y≥0.20), spread across full map width.
2. Corner apartments apt_northeast/northwest were at y=0.10 (sky); moved to y=0.22.
apt_southeast/southwest moved from y=0.86 to y=0.78.
3. generate_houses() used random.choice(all_public_zones) — most houses ended up
connecting only through street_north, creating a commute bottleneck. Now cycles
deterministically through the 4 named streets (N/S/E/W) so traffic is evenly split.
4. generate_personas() was cycling through ALL residential (named + generated),
leaving house_gen_64..80 empty. Now uses only house_gen_XX homes for generated
agents, so every generated house gets exactly 1 occupant.
5. computeAgentTarget crowd spread: maxPerRow 8→13, base radius 24→38, row step
14→24px — 66 agents spread ~3× wider than before.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Distribute agents across full map, add children, add corner buildings
- web/index.html: GEN_HOUSE_SLOTS (52 positions across whole map) replaces
old hash-to-bottom-strip logic; 4 corner apartments + diner/pharmacy added
to LOCATION_POSITIONS
- config/city.yaml: 4 corner apartment blocks (apt_northeast/northwest/
southeast/southwest) and Blue Moon Diner + SociMed Pharmacy added
- generator.py: 20% of generated agents are children (age 8-17) with
elementary/middle/high school student occupations and child backstories
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Expand city to 34 locations with new buildings, pan controls, and 2.5D web UI
- Add school, office tower, factory, hospital, 3 apartment blocks, bakery,
cinema, church, town square, sports field, east/west avenues
- New building sprites: factory with chimney smoke, hospital with red cross,
church with steeple, cinema with marquee lights, sports field with track
- Pan system: drag canvas or use sliders to scroll larger world (1.6x1.4)
- Sidebar narrowed 380->260px, agent clustering improved for large crowds
- Occupation-aware work locations (lawyer->tower, mechanic->factory, etc.)
- Routines use new locations for lunch, leisure, and evening entertainment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Scale to 100 agents: procedural personas, daily routines, speed controls
- Add procedural persona generator with diverse names, Big Five traits,
weighted values/quirks, and occupation-aware home/work assignments
- Add daily routine system: deterministic schedules (work day, weekend,
evening shift, retired) with personality-driven timing and motivation
overrides for critical needs or bad mood
- Generate houses dynamically and scale city capacities proportionally
- Routine-based action dispatch replaces LLM for ~90% of idle decisions
- Default agents raised from 20 to 100, --generate flag for procedural gen
- Per-agent sleep awareness in scheduler via routine wake/sleep times
- Add x5, x10, x50 speed controls to web UI and API
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add gender, romance system, web UI, and API event log
- Add gender field to all 20 personas (male/female/nonbinary)
- Implement romance system: romantic_interest tracking with relationship
progression (crushing -> dating -> engaged -> married)
- Add partner_id to agents for tracking romantic partners
- Create web UI (web/index.html): canvas-based city visualization with
buildings, animated agents with gender-specific sprites, weather effects,
day/night cycle, couple hearts/lines, event log, and agent detail panel
- Add /api/events endpoint and persistent event history in simulation
- Serve web UI from FastAPI with static file mounting
- Update default Ollama model to llama3.2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Initial implementation of Soci city population simulator
LLM-powered simulation of 20 diverse AI people living in a city.
Architecture: world (clock, city map, events), agents (persona, memory,
needs, relationships), actions (movement, activities, conversation, social),
engine (simulation loop, scheduler, entropy management, Claude API),
persistence (SQLite), and API server (FastAPI REST + WebSocket).
All 12 integration tests pass with mock LLM.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>