Skip to content

Order the steps by area; kind filter with the interface hidden; short-screen menu order - #18

Merged
OGMods merged 1 commit into
mainfrom
steps-by-area
Nov 22, 2026
Merged

OGMods merged 1 commit into
mainfrom
steps-by-area

Conversation

@OGMods

@OGMods OGMods commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Steps mode

The steps used to be ordered by power, so consecutive steps hopped between distant parts of the island (a swap in the south, then the north, then the south again). The island ends up built out whole either way, so the order now aims for few steps and an easy route.

  • By area: each step is the one nearest the tiles the last step touched; ties go in reading order. The plan still stops once the island reaches the solve's power. The "Most power" button becomes By area, and a saved "power" preference reads as By area. "By kind" is unchanged.
  • Swaps that settle both buildings go first. One swap then does two moves, so a ring of buildings takes fewer steps.
  • Fixes a wasted step: a swap could land a building on a tile where the plan was also going to build one of its kind. The planner then moved it on and bought a new one for the tile it had left. It now stays, and the pending build goes where it was headed.
  • More replaces: a kind's spare buildings are paired so that a tile becomes one replace rather than a sale plus a build.
  • Faster planning: with power out of the order, each board is scored once per step rather than once per candidate (By kind still scores candidates).

Measured on 35 real islands from the game-export fixtures, each planned against a fresh solve:

Before After
Steps 3,002 2,935
Average distance between steps 3.3 tiles 1.0 tile
Steps jumping more than 4 tiles 37% 3%

Power now rises more slowly during the plan. That's intended: the island is built out whole either way.

Interface

  • Kind filter with the interface hidden: on the solver's board (not during a run), the Generators / Coolers / Reactors filter stays at the bottom centre when the interface is hidden.
  • Short-screen menu order: the menu in the readout card is ordered by use. Hide interface and Center view; Steps, Copy, Share, Save as image; Island stats, Import, Transfer, Settings; map size; Discard / Remove all buildings last but one; Support. The full-height header menu is unchanged.

Testing

  • npm test: 1,208 tests pass. New planner tests cover each change, and each fails on the old code. The tests that pinned the power order now pin the area order.
  • npm run check, knip and prettier are clean.
  • Checked in the browser: the hidden-interface filter at desktop and phone width, and the short-screen menu order at 390×440 on both boards.

…en, regroup the short-screen menu

Steps:
- Order every step by area: the one nearest the last step's tiles, ties in
  reading order. Power no longer orders them (the island is built out whole
  either way); the plan still stops at the solve's power. "Most power" becomes
  "By area", and a stored "power" order reads as it.
- A swap that sends both buildings home goes first: two moves in one.
- A swap that lands a building where its own kind is still to be built keeps
  it there and sends the build on, instead of moving it off and buying another
  for the tile it left.
- Pair a kind's spare leavers and arrivals so a tile is one replace rather
  than a sale and a build.
- Boards are scored once per step rather than per candidate (except By kind).

On 35 real islands against their solves: 3002 -> 2935 steps, 3.3 -> 1.0
tiles between steps, jumps over 4 tiles 37% -> 3%.

Interface:
- With the interface hidden, the kind filter stays at the bottom centre on
  the solver's board.
- The readout's menu on a short screen is ordered by use: Hide interface and
  Center view; Steps, Copy, Share, Save as image; Island stats, Import,
  Transfer, Settings; map size; Discard last but one.
@OGMods
OGMods merged commit 2045418 into main Nov 22, 2026
3 checks passed
@OGMods
OGMods deleted the steps-by-area branch November 22, 2026 18:14
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