ReviewOS

stacks/the-settlers-iii-remake

Search known owned territory beyond nearby AI building sites

#197
Closed chris opened this 8 days ago ·
8 days ago

The ordinary two-economy seed-1 settlement at tick80000 has all20current economic-policy workplaces active, spare planks/stone/tools, and no weaponsmith. Its policy emits only a survey order. The player's real public placement query finds eight legal weaponsmith sites, all outside the planner's 14-tile window around its castle/tower holdings.

Example: (54,70) is19Chebyshevtiles from the nearest holding. One ordinary build command there is accepted, completes and staffs the weaponsmith within12000ticks, and preserves clean conservation. No inventory, workers, map or rules are injected. It still lacks inputs and produces no weapons in that probe, so this does not establish a completed economy or match.

Source placeNear() stops at radius14. A useful owned area can be visible and legally buildable beyond that window, especially after the nearby city fills. The fix must search known owned territory efficiently rather than merely raise a nested-loop cap.

Captured pre-command normal checkpoint SHA256 df17db79400b75d55924cd2a1769832d5ccc6548faadfd6946777ae68760edc0, 456649 bytes, source main d834053a5815c85faf6bbe707ca08d45974e50e9. No original raster/audio in the generated simulation fixture.

Acceptance:

  • Retain existing nearby-site preference, then consider legal known owned origins beyond the old14tile window.
  • Preserve public placement, ground, resource-range and actual harvesting-reachability checks. Exclude hidden/enemy territory and do not inspect concealed deposits.
  • Keep deterministic selection/restore and bounded work suitable for the normal browser clock. Avoid expanding the existing cubic ring-loop work to full map dimensions.
  • Reproduce the captured missed order, actual ordinary construction and conservation without grants, state edits or physics/profile changes.
  • Cover nearby preference, distant legal sites and invalid/hidden/enemy or unusable resource cases at the public policy/session seam.
  • Repeat normal matches, report remaining input/material bottlenecks honestly, and verify appropriate web checks and exact pushed-main CI before closing this scoped correction.

Related: #73, #74, #76 and #4. Original Gold AI behavior remains unobserved; this improves planning against the current engineering rules.

8 days ago

The source correction preserves the original nearby search first, then enumerates previously unchecked known owned origins once, sorts deterministically by distance and tile order, and applies the same placement/ground/resource/reachability checks. It does not extend the nested ring loop to map dimensions or change physics/profile identity.

Four focused public-policy/session tests pass with18assertions: the captured crowded city now orders a legal distant weaponsmith, ordinary construction completes and matches after restore without grants, the prior nearby choice remains unchanged, and stricter client knowledge/ownership views are respected. All296unit tests pass with22968assertions. Lint/type/build and asset/fidelity/roadmap checks pass.

Normal two-policy execution traces have clean accounting and zero failed commands:

  • seed1: player1wins at31841, checksum 2c03bbfc (previously unfinished80000).
  • seed2: player2wins at55581, checksum 8d573503.
  • seed5: player2wins at52601, checksum 230f8fff (previously unfinished80000).
  • seed3: still playing at100000, checksum 0d1d8b95.

The ordinary passive-player seed2 diagnostic still reaches defeat at39801, inside the existing browser window; no clock or deadline changed. Current-candidate browser acceptance has passed its first eight suites and is running the full ten-real-minute4xbattle/save/reload gate. Publication and exact-main CI remain pending. This does not establish original Gold behavior, all-seed sustainability, human victory or native presentation.

8 days ago

Implemented at the owning game source in ccaf4315f5301811a1848de8106136937ed937b7, normally fast-forward pushed to origin/main as Chris without coauthors.

The planner retains nearby preference, then checks other known owned origins in deterministic distance/tile order through the same public placement and harvesting rules. No hidden deposits, stock grants, physics/profile changes, installed-module patches or timing changes.

Verification:

  • Captured crowded-city fixture retained with source and SHA256 provenance. Four focused regressions pass with 18 assertions, including actual ordinary construction and matching restore, unchanged nearby choice and stricter knowledge/ownership views. Existing neutral-harvest regressions cover unreachable, hidden and enemy resources.
  • All 296 unit tests pass with 22,968 assertions across 40 files; lint/type/assets/fidelity/roadmap/build pass.
  • Fresh local production acceptance passes all ten suites, 385 successful steps and no console errors, failed requests or collection errors. Includes ten real minutes at normal 4x, defeat, save and actual reload.
  • Complete per-tick ordinary two-policy traces: seed1 ends31841 (player1), seed2 ends55581 (player2), seed5 ends52601 (player2), all clean accounting and zero failed executions. Seed3 is still unfinished100000 and remains a separate economic frontier.

Exact-main CI and original diagnostic artifact: run40234111784 succeeded. Original artifact12614458702,19648bytes, SHA256 e93aad842ce81646a591ed969e4a5b3cfda993cff973e81736934cca1c536b5b matches GitHub digest; everyZIPCRC, all385steps and empty console/request/collection error arrays verified.

The committed dated receipt records source/fixture hashes and the verified published Stacks311 adoption. This closes the scoped city-site defect only. #73/#74/#76/#4 remain open for broader economies, military/religious AI, human victory and original Gold/native acceptance.

Sign in to comment on this issue.