Any single-strategy program would be defeated easily by an adapter, which would have bomber, scanner, replicator, imp, with variations of each pre-programmed and pre-optimized, just needing to be turned on and tried.”

Kline, Paul More Revolutionary Redcode Changes, rec.games.corewar, 26 June 1995.

P-space was proposed as an extension to the Draft 1994 Core War Standard to add elements similar to the Prisoner's Dilemma to Core War. P-space is a private memory area for each warrior that persists between rounds, allowing warriors to store results and other information. A p-switcher uses p-space to switch between two or more different components / strategies depending on the results of one or more previous rounds.

A state-based p-switcher is a warrior that behaves like a finite state machine: each state corresponds to a strategy, and the warrior switches strategy based on the previous round's result (win, loss, or tie).

state diagram for the switcher from Bulldozed

Example P-Switchers

Alladin's Cave, Armory - A5, Bulldozed, Chameleon, Combatra, Electric Head, Electric Razor, Falcon v0.3, Fire and Ice, Flurry, Forgotten Lore, Gem of the Ocean, Grilled Octopus v0.5, Hazy Shade II, Jack in the box, Jack in the box II, juliet and paper, Oblivion, Recycled Bits, Sunset, The historian, Yogi Bear

Further Reading

  1. Bezzi, Beppe. "P-Space." Core Warrior 5 (13 Nov 1995).
  2. Boeren, David. "Pspace Hints." Core Warrior 19 (4 Mar 1996).
  3. Bremer, M. R. "Switching Techniques and Brainwash Recovery." Core Warrior 26 (22 Apr 1996).
  4. Kendall, Philip. "Some pspace engines." Core Warrior 57 (30 Mar 1997).
  5. Kline, Paul and Robert Macrae. "Alladin's Cave." Core Warrior 66 (8 Apr 1998).
  6. Marsden, Anton. "P-Warriors & P^2." Core Warrior 58 (14 Apr 1997).
  7. Moore, David. "The P^3 Switcher." Core Warrior 70 (4 Feb 1999).