Red Flag Implementation Thought #19

Closed
opened 2026-08-26 19:58:35 +00:00 by Jesse.Markowitz · 1 comment
Owner

if you see a train coming in and you've got a red flag card, you can play it if doing cards like any other card. If played, asked "FLAG EAST" or "FLAG WEST". That stops all trains from entering your limits from that direction (i.e. Flag East holds westbound trains.). You can do this if you see a problem or wish to complete switching.

Now, in actual cases of danger, I assume that when a train enters it checks for collisions (possibly in the same place you check for yard offices and ask if a normally-carrying-coaches train wishes to detour to the yard office (if such a direct path exists)).

Regardless, so the train is going to go to the Office or the Yard Office. If there is a train or cars on the track and there will be a collision, then you break in with a dialog that says "COLLISION RISK! FLAG AGAINST T2?" (or whatever train it happens to be).

This way, you can play the card normally or out of phase, but only if you need it.

if you see a train coming in and you've got a red flag card, you can play it if doing cards like any other card. If played, asked "FLAG EAST" or "FLAG WEST". That stops all trains from entering your limits from that direction (i.e. Flag East holds westbound trains.). You can do this if you see a problem or wish to complete switching. Now, in actual cases of danger, I assume that when a train enters it checks for collisions (possibly in the same place you check for yard offices and ask if a normally-carrying-coaches train wishes to detour to the yard office (if such a direct path exists)). Regardless, so the train is going to go to the Office or the Yard Office. If there is a train or cars on the track and there will be a collision, then you break in with a dialog that says "COLLISION RISK! FLAG AGAINST T2?" (or whatever train it happens to be). This way, you can play the card normally or out of phase, but only if you need it.
Author
Owner

Done in v0.7.4, commit 19a6a47. Shipped to phoenix.local as 0.7.4:0.

Built as described, with two rulings from you

  • It replaces the old card outright. Red Flags used to protect a stopped train out on the
    Mainline: offered 4,212 times and played 4 across 600 games. ABS Signals already does that job
    better, so nothing is lost by deleting it.
  • The flag is planted on a side of your own district and holds the next train arriving from that
    way — "Flag East holds westbound trains", because a westbound train comes from the east.
  • Spent on the train it stops (your ruling): one card, one train. No lifting action to build,
    nothing to forget, and a flag cannot quietly strangle the Division. The held train loses one
    Mainline Phase and comes in on the next, which is the Stage you wanted to finish switching in.
  • Playable out of phase, which was the heart of the issue: when an arrival is certainly about to
    collide and you hold the card, the phase breaks in and asks. Offered only to somebody holding
    one
    — a prompt with a single button is not a choice, and it would leak that a collision is
    coming. The danger is read from §8.3's own two triggers rather than restated, so the prompt cannot
    offer a flag against a collision that will not happen.

The bot still never plays it — measured, not assumed

Worth knowing, because it means the redesign did not fix the thing everyone assumed it would.

The bot now takes the danger prompt unconditionally: the engine has already established the
collision, so there is nothing left for it to judge. Over 200 solitaire games it plays zero. The
reason changed from unwillingness to arithmetic — the prompt needs an arrival that would collide
(0.14 per game, about one game in seven) to coincide with the district's owner holding a Red Flags
card, from a three-card hand drawn out of 121.

So the anomaly exemption in sim.test.ts stays, but its comment no longer claims the bot is
unwilling: it is measuring deck luck. What is actually left is the half of the card a human would use
— planting a flag on purpose to buy switching time — which needs the bot to know it wants time.
TODO.md records that in place of the old finding.

A bug worth recording

The flag was originally taken down in a reduce case, which never fires for an event advance.ts
emits — the phase driver mutates state and then describes it. The flag stayed up and held every train
that came. test/events.test.ts keeps a registry of unreduced event types precisely to make that
class of mistake visible, and redFlagSpent is on it now deliberately, with the reasoning.

Not yet played

Nobody has used this at a table. Both halves are pinned end to end in
test/mainline-cards.test.ts, but the reactive prompt in particular is worth watching in a real
game — it interrupts somebody mid-thought, which is the sort of thing only play reveals.

Done in **v0.7.4**, commit `19a6a47`. Shipped to `phoenix.local` as `0.7.4:0`. ### Built as described, with two rulings from you - **It replaces the old card outright.** Red Flags used to protect a stopped train out on the Mainline: offered **4,212 times and played 4** across 600 games. ABS Signals already does that job better, so nothing is lost by deleting it. - **The flag is planted on a side of your own district** and holds the next train arriving from that way — "Flag East holds westbound trains", because a westbound train comes from the east. - **Spent on the train it stops** (your ruling): one card, one train. No lifting action to build, nothing to forget, and a flag cannot quietly strangle the Division. The held train loses one Mainline Phase and comes in on the next, which is the Stage you wanted to finish switching in. - **Playable out of phase**, which was the heart of the issue: when an arrival is certainly about to collide and you hold the card, the phase breaks in and asks. Offered **only to somebody holding one** — a prompt with a single button is not a choice, and it would leak that a collision is coming. The danger is read from §8.3's own two triggers rather than restated, so the prompt cannot offer a flag against a collision that will not happen. ### The bot still never plays it — measured, not assumed Worth knowing, because it means the redesign did **not** fix the thing everyone assumed it would. The bot now takes the danger prompt unconditionally: the engine has already established the collision, so there is nothing left for it to judge. Over **200 solitaire games it plays zero**. The reason changed from unwillingness to arithmetic — the prompt needs an arrival that would collide (0.14 per game, about one game in seven) to coincide with the district's owner holding a Red Flags card, from a three-card hand drawn out of 121. So the anomaly exemption in `sim.test.ts` stays, but its comment no longer claims the bot is unwilling: it is measuring deck luck. What is actually left is the half of the card a human would use — planting a flag on purpose to buy switching time — which needs the bot to know it wants time. `TODO.md` records that in place of the old finding. ### A bug worth recording The flag was originally taken down in a `reduce` case, which never fires for an event `advance.ts` emits — the phase driver mutates state and then describes it. The flag stayed up and held every train that came. `test/events.test.ts` keeps a registry of unreduced event types precisely to make that class of mistake visible, and `redFlagSpent` is on it now deliberately, with the reasoning. ### Not yet played Nobody has used this at a table. Both halves are pinned end to end in `test/mainline-cards.test.ts`, but the reactive prompt in particular is worth watching in a real game — it interrupts somebody mid-thought, which is the sort of thing only play reveals.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Jesse.Markowitz/station-master#19