Skip to content

Walkability 1.4.0: chokes and mining, measured by the game - #2

Merged
jeany55 merged 1 commit into
mainfrom
measure
Oct 16, 2026
Merged

jeany55 merged 1 commit into
mainfrom
measure

Conversation

@jeany55

@jeany55 jeany55 commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Uses scm-sim 0.8.0's measure() (scm-js/plugin-scm-sim#10; the play page side is jeany55/scm-sim#11) to add two measures to the panel's The game's own pathing section. Both appear only where the engine can do them.

Chokes ▸ Measure

  • For every choke listed (up to Chokes up to wide), chokeEnds finds a straight line through it on open ground, from one of its two areas to the other, about 8 tiles each side.
  • The game makes twelve of the chosen unit (Dragoon to begin with) at one end. One walks through alone, then all twelve together.
  • A choke is judged by the time for ten of the twelve against the one alone (the queueing). Those through after twice that, or never, are counted as stragglers (groupThrough). Timing the last of twelve let one straggler decide the result.
  • The list is sorted by queueing time and each row goes to its choke. The map shows "width · +seconds" at each choke, red past 3 s or with more than one straggler.

Mining ▸ Measure / Add a base…

  • Every start location, plus any hall spot clicked, mined with 8, 16 and 24 workers, as minerals per minute. They show in a list and under each hall on the map.
  • A warning when one start location mines 5 % or more less than another at some worker count (miningGap).

Checked

  • 33 tests pass (new: the choke ends on a walled grid, the queueing and stragglers, the mining gap); tsc clean.
  • End to end in an editor build with StarEdit's download installed, this bundle and scm-sim 0.8.0 loaded as local plugins, (4)Lost Civilization, no page errors:
    • All 36 chokes in 16 s: 12 Dragoons queue 5–17 s at the 2.5-tile passages and 2–4 s at 4–8 tiles.
    • The four starts' mining in 4 s, about 510 / 810 / 1,090 a minute; "Player 4's start location mines 10 % less than Player 1's with 24 workers".
    • Two runs give the same numbers: the engine starts analysis games with a fixed seed.

After merge

Tag v1.4.0, then the editor's default pins (with scm-sim v0.8.0).

🤖 Generated with Claude Code

With scm-sim 0.8.0's measure(), the panel's "The game's own pathing"
section has the game put a group of twelve through every choke listed
(timed till ten of them are through, against one alone; the rest
counted as stragglers) and mine at every start location, and any base
clicked, with 8, 16 and 24 workers. Chokes are listed by queueing time
and labelled on the map; each base's minerals per minute show under its
hall, with a warning when one start location mines noticeably less than
another. Both go in the report.

game.ts: a choke's two ends (a straight line through it on open ground,
from one of its areas to the other), a group's queueing and stragglers,
the mining gap between starts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeany55
jeany55 merged commit 713454a into main Oct 16, 2026
1 check passed
@jeany55
jeany55 deleted the measure branch October 16, 2026 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant