Graph Topology and Battle Royale Mechanics

Players clap back: Ditch AI tricks, solve it backwards

TLDR: A developer pitched a “look ahead” method to decide which cities to close in Two Spies so maps stay fun, not broken. The comments pounced: one reader argued to search backwards with dynamic programming for a guaranteed answer, sparking AI-overkill jokes and ‘keep it simple’ pushback.

A game dev revisited how to shrink the map in spy game Two Spies so players can’t hide forever. The idea: remove cities one by one without breaking the map or turning it into a boring straight line. The post walked through the pitfalls, a mathy score called the Wiener number (basically, how many steps it takes to get anywhere), and a plan to “look ahead” with beam search, a trick from AI that keeps multiple options open so you don’t paint yourself into a corner.

And then the comments lit up. One reader, jaen, dropped the mic: forget the AI vibe, just search backwards from the end and use dynamic programming—translation: start at the last city and work out the best path in reverse—for a result that’s simpler and guaranteed optimal. Cue the split. Team Practical cheered, “Stop over-engineering it!” Team Heuristics fired back, saying beam search is fast and fine. The Wiener number name got the predictable giggles, with memes about “keep the number low, keep the tension high.” Others joked the real strategy is just “don’t make a line.” A few devs defended the original approach: real maps are messy, you need quick tools. But the vibe? Backwards is the new forward, and people love a clean, clever shortcut.

Key Points

  • City closing in Two Spies is modeled as removing vertices from an undirected graph, affecting map topology.
  • Connectivity is maintained by rejecting removals that create disconnected graphs, verified via BFS and avoiding articulation points.
  • Map quality is quantified using the Wiener number; lower values are preferred to preserve strategic richness.
  • A purely greedy strategy (lowest valid Wiener number at each step) can lead to local minima, such as ring end states that force path graphs.
  • Beam search is proposed to evaluate multiple pruning sequences with lookahead, avoiding bad final graphs without exhaustive search.

Hottest takes

"searching backwards from 'finished' graphs ... using dynamic programming should be simpler than beam search and guaranteed optimal" — jaen
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.