CB-WP-0025 T05: the search works, and it falsified this pass's own
affordability projection games/ground/src/search.rs, five tests. It finds real winning lines and replays them through validate/fold to group_success. Two bugs in my own work, found and fixed here. THE TRAVERSAL WAS WRONG. It branched on "the first seat with any legal command" and stopped there, so a later seat never acted if an earlier one was already selected but still had a legal move. Restructured around what the rules oblige: a seat without a selection MUST select (GR-R02) and nothing else can happen first; after Reveal the optional actions branch freely and the aggregate rejects Resolve until the obligatory ones are done -- so the search needs no phase logic of its own. AND MY REWIND WAS OFF BY ONE ROUND, replaying the round it was meant to search. That is why the first run reported 3 nodes and looked like a working search. Measured with the real search, rewinding real games to the start of their last K rounds: 2p K=1 exhausted, 8,103 nodes, ~29 ms 2p K=2 budget cut at 2,000,000 nodes, ~5 s 3p K=2 win found, 41 nodes, ~157 us The spec's own falsifier said "§3 fails if K=2 proves unaffordable at four seats". IT FAILED AT TWO. The projection assumed a joint product per round; the search explores sequential per-seat decisions, so orderings multiply the tree far beyond width^seats. That is the second projection this pass published in place of a measurement -- C1's timer was the first. THE ASYMMETRY IS THE OPERATIVE FINDING. Finding a win is cheap: DFS stumbles onto one in tens of nodes. Proving none exists needs exhaustion. So the witness feature is affordable now at any K a player would ask about, and the winnable fraction (ADR-0013 D4) is NOT, because its negative half must exhaust every deal it counts. K=1 is the honest default for exhaustive answers today; making K=2 exhaustible needs transposition or move-ordering, neither of which this pass built. specs §3 and §3.1 corrected accordingly, and the K=2 default withdrawn. The negative control that makes "winnable" falsifiable: 2p seed 7 over its last round returns NoneFound with exhausted=true in ~8k nodes -- a real negative, not a budget cut wearing a verdict's clothes. And the visible/ hidden marking is tested both ways, since a marking that can only say YES is decoration. make all: exit 0. loop-lint clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
b27aa14df0
commit
81e0aba59a
4 changed files with 530 additions and 78 deletions
|
|
@ -46,45 +46,30 @@ middle of stating, arriving with a concrete demand.
|
|||
|
||||
## What already exists, so the survey does not re-find it
|
||||
|
||||
- **The state is replayable.** `cb-game-runtime` records sessions as
|
||||
scenarios; `replay.rs` and `make replay-test` already re-run them.
|
||||
A search does not need new persistence.
|
||||
- **The move space is enumerable.** `legal_commands` exists and, since
|
||||
CB-WP-0023, is narrow enough to be worth trusting — SOLVE is offered
|
||||
only where it can act, so the branching factor is real rather than
|
||||
inflated by inert moves.
|
||||
- **Bots exist.** `games/ground/src/bot.rs` has `GreedyPolicy` and
|
||||
`RandomPolicy`, wired through `bot_policy` (`table.rs:208`). A win rate
|
||||
over N seeds is reachable with what is already there — the question is
|
||||
whether that number *means* anything, which is the survey's problem.
|
||||
- **The threshold is public.** `OutcomeView.total` / `.threshold` /
|
||||
`.group_success`. Difficulty has a denominator already.
|
||||
The state is replayable (`replay.rs`, `make replay-test`); the move space
|
||||
is enumerable (`legal_commands`, narrowed by CB-WP-0023 so branching is
|
||||
real rather than inflated by inert moves); bots exist (`bot.rs`); and the
|
||||
threshold is public (`OutcomeView`). **A search needs no new persistence
|
||||
and no new rules** — which is why D6 put it in `games/ground` with no new
|
||||
crate and no port.
|
||||
|
||||
## What makes this hard, and must not be waved through
|
||||
|
||||
**The game is not perfect-information and the search must respect that.**
|
||||
A path computed with the deck known is a path the players could never have
|
||||
found. `view.rs` hides the deck, other seats' hands, and face-down
|
||||
selections *by rule* (GR-S02/S04, GR-R02/R04). A retrospective solver
|
||||
running on `GroundState` sees all of it. So the ADR must decide, in
|
||||
words, **which of these three the tool answers**:
|
||||
**Settled by [ADR-0013](../decisions/ADR-0013-could-we-have-won.md).** The
|
||||
declaration framed the central risk as *a path computed with the deck
|
||||
known is a path the players could never have found*, and asked the ADR to
|
||||
choose between an omniscient, an information-respecting, and a bounded
|
||||
search.
|
||||
|
||||
- *was this deal winnable by an omniscient player* — cheap, honest,
|
||||
and answers a question nobody asked;
|
||||
- *was it winnable from what the seats could see* — the question actually
|
||||
asked, and the expensive one;
|
||||
- *did a reasonable line exist* — a bounded search from the losing seat's
|
||||
information, which may be the only affordable honest answer.
|
||||
**D1 dissolved the choice**: strategy fusion is a defect of aggregating
|
||||
over determinizations to *choose a move*, and after the game there is one
|
||||
world — so a line found in it is executable in it. **D2** keeps the
|
||||
declaration's real concern by marking each move `visible`/`hidden` rather
|
||||
than by refusing to search.
|
||||
|
||||
Getting this wrong produces a feature that tells the maintainer he could
|
||||
have won by playing a card he had no way to know was there. **That is
|
||||
worse than not shipping it.**
|
||||
|
||||
**And a difficulty number is a claim about a distribution.** One win rate
|
||||
over one bot policy over N seeds is not "the difficulty"; it is that
|
||||
policy's win rate. Whatever the spec adopts must name its policy, its N,
|
||||
and its seed range, or `ground-game` will tune tiers against a number
|
||||
whose meaning drifts the next time a bot improves.
|
||||
The second warning here — *"one win rate over one bot policy is not the
|
||||
difficulty"* — was right, and **the survey made exactly that error
|
||||
anyway**; see T02.
|
||||
|
||||
## Task: survey
|
||||
|
||||
|
|
@ -99,29 +84,12 @@ state_hub_task_id: "556cfd24-5992-4cc0-be90-0b60e989b5bb"
|
|||
(`loop-lint` checks both).
|
||||
|
||||
Per §Step 1 the survey is done when it can name a **benchmark-to-beat**
|
||||
per dimension — a number or a reproducible comparison, not an impression.
|
||||
|
||||
- **Retrospective solvers in games with hidden information.** The prior art
|
||||
is real and should be named: determinized search (perfect-information
|
||||
Monte Carlo) and its known failure — *strategy fusion*, where a
|
||||
determinizing solver claims lines that require knowing which world it is
|
||||
in. That failure is exactly the trap in §What makes this hard. Bridge
|
||||
and Skat post-mortem tools are the closest analogues; poker solvers are
|
||||
the well-studied case and the wrong shape.
|
||||
- **"A path to win" as a product, not a proof.** The maintainer already
|
||||
conceded optimality (*"the best path is not computable I guess"*). So
|
||||
the target is a **witness**: one concrete line of play that reaches
|
||||
`group_success`, or a defensible *no line found within bound B*. Name
|
||||
what a witness must carry to be checkable.
|
||||
- **Difficulty as a measured quantity in co-operative games.** Pandemic and
|
||||
its relatives set difficulty by a dial with a published win rate. The
|
||||
benchmark-to-beat is: can we produce a win rate whose confidence
|
||||
interval is tight enough to distinguish two threshold settings?
|
||||
- **Cost.** Search over an event-sourced aggregate with full `validate` on
|
||||
every branch has a per-node price. Measure it on our machine, on our
|
||||
scenarios — the runnable-baseline option applies here, since a search
|
||||
that cannot finish while the player is still looking at the page is a
|
||||
different feature.
|
||||
per dimension. Four were asked for: retrospective solvers in
|
||||
hidden-information games (and their known failure, strategy fusion); *a
|
||||
path to win* as a **witness** rather than a proof; difficulty as a measured
|
||||
quantity in co-operative games; and the **per-node cost**, measured on our
|
||||
machine — the runnable-baseline option applies, since a search that cannot
|
||||
finish while the player is looking at the page is a different feature.
|
||||
|
||||
**Done 2026-08-05.**
|
||||
[CB-RES-0008](../research/CB-RES-0008-could-we-have-won.md), with a
|
||||
|
|
@ -150,12 +118,6 @@ corrected text and
|
|||
[the response](../history/260805-could-we-have-won-response.md) for the
|
||||
full accounting.
|
||||
|
||||
**Prior art named the trap** — determinized search suffers *strategy
|
||||
fusion* (Frank, Basin & Matsubara 1998) — **and T03 then established it
|
||||
does not apply here.** After the game there is one world, so a line found
|
||||
in it is executable in it. Fusion is an obstacle to a *playing* engine,
|
||||
which this is not.
|
||||
|
||||
## Task: adversarial review
|
||||
|
||||
```task
|
||||
|
|
@ -313,16 +275,15 @@ Measured at real decision points (table in
|
|||
**0.5–3.8 µs**.
|
||||
|
||||
**`clone` is in there because a search must copy state per branch**, and
|
||||
`iter_batched` excludes setup from timing — leaving the budget resting on
|
||||
an unmeasured span, which is precisely C1's mistake. **Per-child cost is
|
||||
not uniform**: `validate+fold` ranges 0.5–3.8 µs by command, so budgets
|
||||
use the upper end (~5 µs/child).
|
||||
`iter_batched` excludes setup from timing — leaving the budget on an
|
||||
unmeasured span, which is precisely C1's mistake.
|
||||
|
||||
**That settles D3's affordability with real numbers**: joint branching
|
||||
over the last two rounds is ~5×10² / 1.6×10⁵ / 5.7×10⁵ at 2/3/4 seats →
|
||||
negligible / **0.8 s** / **2.9 s**. `K = 2` holds at two to four seats and
|
||||
**does not at five or six**, where the tool must reduce `K` and *say so*
|
||||
rather than silently search less.
|
||||
**The affordability conclusion drawn here was itself falsified by T05.**
|
||||
It projected joint branching and concluded `K = 2` holds at two to four
|
||||
seats. The real search exceeded 2×10⁶ nodes at **two**. See T05's record
|
||||
and [RetrospectiveAnalysis §3.1](../specs/RetrospectiveAnalysis.md) —
|
||||
a projection from branch widths is not a timing of a search, and this
|
||||
pass has now made that mistake twice.
|
||||
|
||||
**§4.1 is a normative prohibition**, not a preference: a single-policy win
|
||||
rate may not be reported as a difficulty. The spec carries the measured
|
||||
|
|
@ -332,7 +293,7 @@ reason — greedy 100% vs first-legal 0% on identical deals.
|
|||
|
||||
```task
|
||||
id: CB-WP-0025-T05
|
||||
status: todo
|
||||
status: done
|
||||
priority: high
|
||||
state_hub_task_id: "5f1cbda3-7427-4f23-8c67-b2e216b987a8"
|
||||
```
|
||||
|
|
@ -353,6 +314,40 @@ a loss.
|
|||
naming *that* boundary goes red. If it cannot be mutated, it was a
|
||||
comment rather than a rule.
|
||||
|
||||
**Done 2026-08-05.** `games/ground/src/search.rs`, five tests.
|
||||
|
||||
**The first traversal was wrong and the diagnostic hid it.** It branched
|
||||
on *the first seat with any legal command* and stopped there, so a later
|
||||
seat never acted if an earlier one was already selected. Restructured
|
||||
around what the rules oblige: a seat without a selection **must** select
|
||||
(GR-R02) and nothing else can happen first; after Reveal the optional
|
||||
actions branch freely, and the aggregate rejects `Resolve` until the
|
||||
obligatory ones are done — **so the search needs no phase logic of its
|
||||
own.**
|
||||
|
||||
**And my rewind was off by one round**, replaying the round it was meant
|
||||
to search. That is why the first run reported 3 nodes and looked like a
|
||||
working search.
|
||||
|
||||
**The measurement falsified the spec's own projection, at two seats rather
|
||||
than the four §6 predicted.**
|
||||
|
||||
| case | result |
|
||||
|---|---|
|
||||
| 2p `K=1` | **exhausted**, 8,103 nodes, ~29 ms |
|
||||
| 2p `K=2` | **budget cut** at 2,000,000 nodes, ~5 s |
|
||||
| 3p `K=2` | win found, 41 nodes, ~157 µs |
|
||||
|
||||
The projection assumed a joint product per round; the search explores
|
||||
sequential per-seat decisions, so orderings multiply the tree far beyond
|
||||
`width^seats`.
|
||||
|
||||
**The asymmetry is the operative finding.** *Finding* a win is cheap —
|
||||
DFS stumbles onto one in tens of nodes. *Proving none exists* needs
|
||||
exhaustion. So the **witness feature is affordable now**, and the
|
||||
**winnable fraction is not**, because its negative half must exhaust every
|
||||
deal it counts. That is T06's problem and the spec now says so.
|
||||
|
||||
## Task: measure the difficulty, and hand it to ground-game
|
||||
|
||||
```task
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue