Repository navigation
feat: add contested hex control - #13
Merged
Merged
Conversation
christopherjnelson
marked this pull request as ready for review
August 14, 2026 13:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation
Adds the focused contested-hex-control milestone across shared contracts, the deterministic world engine, provider/runtime integration, the Game API, World Lab, telemetry, exports, tests, and documentation.
Hex control and capture rules
controllerAgentId.Defended-controller correction
Capture is legal only when the enemy controller is physically absent from the current hex. Authoritative agent positions determine presence. A present controller produces the typed
controller-presentrejection without mutation, an event, or territory gain/loss. Unrelated occupants do not defend a cell, and abandoned enemy territory remains capturable.The initial unrestricted experiment produced 16 captures, zero messages, and a nine-transfer same-cell loop. With defended capture, the next experiment produced five captures across five unique cells with no ping-pong.
Observations and World Lab
Observations expose current and adjacent controllers, server-owned capture eligibility, the six-agent territory scoreboard, and at most six chronological gained/lost control changes. World Lab colors infected cells by controller while retaining text labels, selected-cell distinction, territory totals, capture events, and accessible controller/eligibility presentation.
Mingle alone now uses the revised social coalition-builder default. In genuine validation, Mingle sent five delivered coalition messages, all recipients observed their messages, and controller-present situations produced messaging or movement rather than illegal capture attempts.
Telemetry and export schema v3
Telemetry adds requested/successful captures, infection gains, capture gains, capture losses, and separately exposed current authoritative territory. Capture losses are attributed to displaced controllers.
Generated exports use schema version 3. Capture events are relevant to both capturer and victim, including victim-only zero-turn selections with an explicit matching-control-change count. State-only world snapshots include controller data, filtering remains recipient-aware and chronological, and rejected captures never become successful control changes.
Architecture and security
The world engine remains deterministic and provider/network/UI/storage independent. Boundary data is runtime-validated in shared schemas. Messages, personalities, territory data, and capture eligibility remain subordinate observations. Telemetry and exports exclude credentials, authorization headers, raw prompts/provider payloads, and private reasoning. Explicit scripted mode bypasses repository
.envloading.ADR 0006 records the control model, defended capture, event-derived history, victim-aware selection, schema v3, fully-infected safeguard, and deferred systems.
Automated validation reported green by the owner
The repository owner confirmed the complete final local validation suite is green: frozen install, formatting, lint, type checking, deterministic tests, production build, and Chromium Playwright.
Genuine OpenRouter manual validation
No experiment export or screenshot is included.
Explicitly deferred functionality
Formal teams, factions, alliances, treaties, relationship scores, shared missions, combat stats or probability, health/damage, resources, fortifications, bonuses, cooldowns, forced movement, respawning/elimination, fog of war, persistence, player/GPS systems, provider configuration changes, free messages, combat animation, and autonomous post-infection conflict playback remain deferred.