WORLD OF GONZ WIKIOpen game ↗

Engineering, operations & design history

Neighbour Houses — Computer-controlled players

Full repository source: docs/computer-controlled-players.md

Technical documentation includes historical decisions, proposals and verification reports. For playing instructions and practical rules, open Gameplay.

Neighbour Houses — Computer-controlled players

Status: proposed design, September 22, 2026. This document specifies a new autonomous player layer; it does not claim that independent AI houses are implemented. Existing production, mandates, governors, trade and continuity provide foundations. The living-world design remains the primary entry point; MMO gameplay design defines the broader family, authority, knowledge and attention contracts.

The idea

Populate settled regions with Neighbour Houses: persistent neutral computer-controlled families that run communities, pursue ambitions and remember their dealings with others. They interact cautiously with humans, beginning with small, limited agreements and extending trust through experience. A house might become your dependable grain supplier, negotiate competing woodland interests or shelter a displaced family. It has a visible adult leader, real residents, limited resources and a future that can go badly. Neutrality permits self-defense and refusal; these houses do not initiate territorial conquest against humans.

The world also contains three established major factions: ice mages around both poles, a continental Lich King, and an expanding troll, goblin and orc horde led by a dynasty of orc kings. Their territorial scale and strategic roles are distinct from these small neutral houses. The major faction design defines their identities, borders, quest access, economies and conflicts. This supersedes the earlier suggestion that an aggressive Ashen Banner neighbour would provide the principal AI expansion threat.

The player promise is: “My neighbours have lives and plans, and my choices change our relationship.” Recognizable neighbours create reasons to return without requiring a human opponent to be online. Their actions produce opportunities through actual shortages, surplus, interrupted deliveries and conflicting interests. They cannot invent a crisis, reward or enemy merely to entertain a nearby player.

A house is an organization, its leader is a character, and its controller is software. These are separate identities. A leader can die while the community, debts, agreements and history continue. Houses are explicitly labelled Computer-controlled; they do not impersonate connected humans or increase the human online count. Ordinary workers remain cohorts rather than thousands of individual planning agents.

Three control roles

RoleWhat it can decideHard boundary
Independent neighbourRun its own community and choose lawful trade, development and later diplomacyIts charter, actual resources, known information and shared game rules
Delegated governorExecute the human's specific permitted objectivesScoped office, finite allowances, reserves, expiry and revocation
Continuity stewardPreserve a community during lawful successionExisting continuity authority; no control of other human officeholders

These roles may reuse planning code, but never share implied authority. Logging out does not surrender a human's house or authorize a new strategic personality. Existing finite mandates remain finite. A successor does not reset spent allowances, deadlines, obligations or starting grants. Human control can transfer only through the game's lawful succession or office process, not through a “take over this NPC” shortcut.

Memorable personalities

Use a small set of stable preferences: caution, reciprocity, ambition, sociability and attachment to home. Separately track practical competence and the house's current needs. Traits change how it values legal choices; competence improves forecasts and coordination, not yields, vision or resource grants. Public descriptions are qualitative, and observed conduct can reveal more over time.

Example houseCharacter and ambitionLikely player encounterGenuine weakness
Willow HearthCareful growers seeking a reliable food reserveOffers food for tools or timber when a surplus existsHesitates to expand; misses some opportunities
Alder CartSociable traders seeking dependable routesOffers a small barter, then proposes repeated deliveries after successful dealingsTies up scarce workers and stock in journeys
StonewatchCautious builders seeking a secure homeInvests in repairs and funded local defense; later seeks passage agreementsDefense competes with food and development

These are example identities, not factions with exclusive bonuses. Geography and events should produce different outcomes for the same personality. Each neutral house must feed its residents, fund its defenses and obey protection and conflict rules. Small trades, selective partners and observed reliability characterize their cautious diplomacy. First release includes these three economic personalities; major-faction campaigns wait for the later conflict gates.

The player's experience

  1. Meet a neighbour. A permitted observation or contact reveals a settlement and its leader. The map does not reveal undiscovered houses globally.
  2. Understand a need. Its contact card might say “Seeking timber for repairs,” with the age and source of that public statement. Private stock totals and undisclosed plans remain hidden.
  3. Make a concrete choice. Propose a supported barter, accept or decline an offer, send relief, or inspect an existing delivery. Later stages add requests, passage and political agreements only when their rules exist.
  4. See the consequence. Real cargo moves with real carriers. A delivery can wait for storage, fail to dispatch for lack of provisions, or return after recall under ordinary contract rules.
  5. Build a history. The next encounter reflects fulfilled agreements, acknowledged aid and unresolved disputes. The return briefing links to actual receipts and changed terms.

Example: Willow Hearth observes a repair need and can spare prepared food after reserving household meals and journey provisions. It proposes a finite food-for-timber barter. The player can accept, change terms through a fresh offer, or decline. Acceptance alone does not create or teleport goods. A completed delivery lets Willow fund its repair through the normal construction command and improves its evidence of this partner's reliability. If nobody supplies timber, it may defer another project, seek another known partner or tolerate deterioration. The repair is never guaranteed by the story.

Declining an offer is ordinary business, not betrayal. Cancellation permitted by a contract is recorded separately from a breach. Repeated gifts do not buy unlimited loyalty: their relationship effect is bounded, while their goods remain real transfers. A starving house can change priorities and seek help without becoming automatically hostile to its neighbours.

Contact and decision interface

Selecting a known house opens a compact Neighbour card using the existing City/inspector visual language. It shows leader, computer-control label, observed home, declared priority, relationship evidence and active agreements. Use text labels as well as colour. On narrow screens, stack these sections and keep agreement terms readable without hover.

Example content, illustrative rather than live data:

WILLOW HEARTH                         Computer-controlled
Leader: Mara Willow                  Home: Willow village
Declared priority: repair the workshop
Relationship: reliable partner
Evidence: two completed exchanges; last delivery 1 village day ago

Offer: prepared food for timber
Quantity, provisions, route, expiry and authority: review required

[Review offer]  [Propose barter]  [View shared history]

Offer review reuses normal transaction previews: exact goods, source, destination, travel, finite commitment, expiry, recipient consent and current authority. Display village time and real-time equivalents using the world's configured clock. Rejection explains the information the partner is willing to disclose, such as “Cannot spare that quantity,” without revealing hidden warehouse values. Unavailable future systems are omitted from the first release.

For a human's own governor, a separate Why this decision? view shows objective, authorized allowance, evidence, chosen order, actual cost and result, or the reason it waited. Independent neighbours expose only public statements and shared events. Developers can inspect a fuller decision trace; a public explanation must never become a way to see enemy plans or hidden resources. Dialogue uses factual templates initially; a language model is unnecessary for strategic decisions.

How decisions work

Engine-first and cost-constrained: every routine faction decision runs as game code, with zero language-model inference calls. “Governor,” “planner” and “controller” name software responsibilities, not paid or self-hosted model agents. Use authored plan templates, state machines, bounded scoring, seeded traits and conventional pathfinding. The entire faction system must work without model credentials. Optional reviewed content assistance or non-authoritative prose follows the disabled-by-default, globally capped model spending policy; it cannot issue orders or determine outcomes.

Retain the existing three-layer architecture: strategic governor, bounded planner, ordinary command executor. Independent controllers consume an immutable knowledge projection, not the engine's complete state. The engine alone validates and applies world mutations.

Known facts + office/charter + remaining budgets
  -> identify urgent needs and current ambition
  -> generate a bounded set of supported plans
  -> discard illegal, unaffordable or unknowable choices
  -> score feasible choices and retain useful commitments
  -> submit ordinary commands
  -> persist receipts, next decision time and explanation

Evaluate basic survival and existing obligations before optional development. Useful candidate plans include staffing an existing producer, maintaining a building, changing a recipe, making a trade proposal or waiting. The controller must account for labor, storage, route capacity, service prerequisites, protected reserves, food aging and already committed resources. It cannot solve a shortage by issuing an unsupported command.

A proposed score is urgency + expected benefit + personality fit + relationship value - cost - risk - switching penalty, with each term normalized and its weights stored in a versioned policy. Hard constraints are filters, never negative scores that ambition can overcome. A plan includes prerequisites and a bounded horizon; it rechecks them before every command. Keep an active plan unless it becomes invalid or a materially better option appears, to prevent constant recipe changes and workforce churn.

The budget coordinator serializes decisions that compete for the same goods, workers or strategic attention. Its planning holds are not actual inventory or spending: only authoritative command acceptance creates the game's normal commitments. Rejected proposals release temporary holds. Stale state triggers a fresh projection and later replanning, not repeated blind submission. Unsupported or impossible needs produce an explicit wait/failure reason.

Seed choices by world, house and persisted decision sequence for reproducible tie-breaking. Persist the policy version, sequence, next due time, active plan, knowledge references and command receipts. Restarting must not reroll a personality, duplicate an offer or repeat a payment. A rules upgrade needs an explicit policy migration, retaining existing rights and commitments.

Fairness and relationships

  • No private information: knowledge consists of owned observations and lawful, timestamped reports. A stale price or route report can lead to a mistaken plan. Relationship evidence is similarly scoped; one house cannot automatically read another's private dealings.
  • No free economy: living house populations pay normal costs, consume meals, age fish, obey warehouse capacity, and travel normally. No faction can buy without funds or barter goods it does not possess. No recurring treasury or stock refill exists. Major factions may have explicitly defined unit needs, such as undead magical upkeep, but cannot bypass conservation or command validation.
  • No extra hands: one house has one shared strategic attention budget and ordinary organizational capacity. Adding planners, notables, governors or settlements does not create additional attention accounts. Descendant or splinter organizations must not mint a fresh automation allowance.
  • No targeted offline advantage: eligibility, production and travel do not depend on camera presence or whether a human is online. Later hostilities obey the same warnings, response windows, protection and supply rules as other actors.
  • No compulsory friendship: an independent house may decline, prefer another partner or fail. Relationship memory informs choices but never overrides reserves, charter limits or binding terms.
  • No offer flood: cap unresolved offers per house and partner, coalesce repeated needs, and use a retry cooldown. A decline creates no new offer until terms or circumstances materially change and the cooldown has elapsed.

Store compact relationship evidence: event ID, source, parties, date, type, magnitude and resolution. Trust concerns fulfilled commitments, affinity concerns shared interests, and grievances concern unresolved harm; do not collapse all three into one magic loyalty number. Old evidence loses decision weight without erasing receipts. Personal attitudes can change with a new leader while institutional contracts and claims survive.

Population, time and defeat

For a first controlled trial, provision three independent one-village houses in a bounded test region. Opening people, stock and property must have a recorded, one-time world-initialization allocation, comparable to the chosen human starting rules. Do not silently claim existing player land, turn every painted settlement into an active economy, or use shared prototype settlements as ownerless authority shortcuts. An existing save receives an empty controller registry until houses are explicitly introduced.

This trial is intentionally small enough to assess human opportunity. General regional density remains a later measured decision: reserve viable human founding space, limit autonomous expansion, and require a funded, lawful founding process. Player arrival must not spawn a rich neighbour or delete a struggling one. Defeated houses can lose land, contract, migrate or dissolve through supported rules; no instant replacement with fresh starting wealth. Families and meaningful history may outlive a settlement.

Strategy runs as scheduled work, not on movement ticks. Start with at most one ordinary strategic evaluation per house per village day, plus coalesced wake-ups for relevant events such as an offer, failed delivery or authority change. A wake-up changes neither attention nor the maximum command allowance. Initial trial ceilings are eight candidate plans per evaluation, two accepted strategic commands per house per village day, and one unresolved outgoing offer per partner, with three total per house; stricter existing limits prevail. These are tuning proposals, not implemented constants.

Active and unattended simulation must process the same logical decision times and engine events in stable order. When work exceeds a zone's budget, retain a persisted backlog and advance authoritative time in bounded slices; production, travel and AI cannot skip different portions of that timeline. Display pending catch-up where needed. Reduce strategic cadence through a versioned, region-wide policy at a recorded time boundary, never merely because the camera moved away. Cosmetic movement may have lower detail off-screen without changing travel results.

Delivery stages and integration

StageDeliverableRequired exit evidence
A — trustworthy controllerTyped computer principal, controller registry, filtered knowledge, deterministic scheduler and command adapterSame authority and cost validation as humans; replay and restart safety; no hidden-state access
B — three neighboursOne village each; existing staffing, recipes, repairs, one-time barter and relief; contact card and receiptsUnattended survival in viable fixtures, honest failure in constrained fixtures, funded player trades and clear explanations
C — lasting relationshipsBounded memories, eligible finite recurring agreements and lawful leader replacementContracts survive succession; allowances never reset; no gift loop or offer spam
D — major factionsEstablished polar and continental powers, quest-gated mage contact, funded exploration and expansion by the Lich King and orc dynastyMajor-faction foundations, knowledge, territory, quest permissions, magic, war notice, protection and supply systems support each action before activation

The current integration seams are zone-engine.js command dispatch and receipts; continuity.js for lawful actor/character authority; governors.js and mandates.js for bounded delegation; and trade, production, forecast and briefing modules for real consequences. A computer principal needs explicit server-side identity and authorization plumbing; do not fabricate a connected human account or bypass command checks. Preview/forecast access must be scoped to its knowledge as carefully as execution.

Suggested future modules are a controller registry, knowledge projection, policy planner, scheduler and decision history. These are proposed responsibilities, not files created by this design. Existing governors remain executors of already authorized rules until deliberately extended. Broader markets, AI elections, human employment by AI, independent armies and full family simulation are not prerequisites for stage B.

Acceptance scenarios

  1. Finite survival: a house in a viable fixture runs for thirty village days using real production; a house with no viable food path records shortage and its actual consequences instead of creating goods. Inspect the complete opening/incoming/used/spoiled/closing ledger.
  2. Physical trade: a human accepts an AI barter; real workers carry exact funded cargo and consideration. Full stores, blocked dispatch and recall preserve custody and ordinary consent rules.
  3. Information isolation: alter an undiscovered mineral deposit or another party's private inventory while holding the AI's knowledge fixed. Its decision and public explanation remain identical.
  4. Budget contention: repair and trade plans compete for the same timber, workers and attention. Accepted spending stays within authoritative limits; planner concurrency creates no extra capacity.
  5. Recovery: restart between proposal and command receipt, and again during travel. There is one logical offer, one payment and the same eventual delivery outcome.
  6. Time equivalence: advance identical seeds and command histories continuously, unattended and through bounded catch-up. Logical decisions, stock, journeys and relationships agree regardless of observers.
  7. Authority change: remove a governor's office or replace a leader while a plan is pending. New orders require current authority; lawful existing agreements retain their exact terms and spending history.
  8. Exploit resistance: repeat gifts, declines, reloads and attempted house replacement. No unlimited trust, attention, offers, starter resources or protection reset results.
  9. Player comprehension: a player can identify the neighbour's declared need, understand an offer and find its delivery result. Contact views reveal no foreign private warehouse or developer trace.
  10. Bounded cost: measure decision duration, queue age, commands, rejections and saved history at three, thirty and three hundred test houses before raising deployment caps. Set numerical server budgets from measured headroom; retain existing simulation/network gates.

Success means humans encounter useful, understandable neighbours that can prosper or fail through the same world systems. Track fulfilled versus blocked agreements, resource conservation, plan churn, explanation comprehension, AI land share and time until a new human has a viable interaction. Target values and wider population rollout follow trial evidence; more autonomous activity alone is not success.