Repository navigation
Tidier solved layouts, cheapest ties first, per-landmass pickers, Solve all fixes - #12
Merged
Merged
Conversation
Right-sizing swapped a building with no load for the cheapest tier of its role and left it standing idle, which is how a Heat Sink #1 ended up doing nothing beside a #8. A building with no load is now tried for removal first, under the same power, online and plan guard as a swap. A new last pass moves the empty tiles a layout leaves inside the land out to the shore and into corners: a building nearer the edge steps into each hole, kept only if power holds, no producer goes offline, nothing new goes idle and the plan still runs. On a player's eight Singularity solves it took 24 interior holes to none at no power, in 0-145ms per board. Among layouts that tie on power, the cheapest to build (the game's prices, each copy dearer than the last; then fewest buildings) is the one an island returns, with its alternates in the same order.
… its own Every shortlist the app keeps is now cheapest first: attempts pooled for one island, the whole-board variants, and a tied re-run, which follows the layout on screen to its new place. A later attempt is still judged against the best power reached, so a cheaper tie a hair below it cannot drag the island's figure down. On a board where two or more islands have layouts of their own to choose between, the card shows a Part picker per island. Stepping one swaps that island's layout and keeps the rest; the board that makes is scored and put into the shortlist, never growing it past ten.
The estimate was the island on screen times the island count, so it moved with whichever island was open. It is now each island's own estimate, summed, from boards decoded once in the background and replaced when an island is edited. Between two islands the solver is idle while the next board loads, and Setup flashed back in while Run showed for a beat. A batch now counts as one run throughout: Setup stays hidden, the button stays on Stop, and Stop in the gap ends the batch.
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.
Solver
search/emptyTiles.ts) moves interior holes to the shore and corners; each move is re-simulated and kept only if power holds, no producer goes offline, nothing new goes idle and the plan holds. On a player's eight Singularity solves: 24 interior holes → 0, power identical, 0–145 ms per board (300 ms budget, plus 300 ms shared across alternates).App
IslandBest), whole-board variants, and a tied re-run (the selection follows the layout on screen). Attempts are still judged against the best power reached, so cheaper ties can't drag the figure down.Solve all
uiState.running): Setup no longer flashes back between islands, Run stays on Stop, and Stop in the gap ends the batch.Testing
npm test(1125 passing),npm run check,npm run knip,format:checkall clean.