Sections
Home
Hills
Infinite Hills
Tournaments
Software
Evolving
Optimizer
Community
Newsletter
Discussion
History
Sections
 
For Beginners
First Steps
FAQ
Guides
Lexicon
Benchmarks
For Beginners
> Home > The Corewar Newsletters > Core Warrior > Issue #1

Issue 78                                                       7 November, 2000
_______________________________________________________________________________
Core Warrior is a newsletter promoting the game of corewar. Emphasis is placed
on the most active hills - currently the '94 draft hill, the beginner hill and
the '94 no-pspace hill. Coverage will follow where ever the action is. If you
haven't a clue what I'm talking about then check out these five-star internet
locals for more information:

FAQs are available from:
  http://www.koth.org/corewar-faq.html
  http://homepages.paradise.net.nz/~anton/cw/corewar-faq.html

The ftp site and it's mirrors are at:
  ftp://ftp.csua.berkeley.edu/pub/corewar
  ftp://ftp.inria.fr/INRIA/Projects/para/doligez/cw/mirror
  ftp://www.koth.org/corewar

pMARS itself is also available from:
  http://www.koth.org/pmars                  ;pMARS home page
  ftp://members.aol.com/ofechner/corewar     ;Fechner ftp site

Web pages are at:
  http://www.koth.org/                       ;KOTH
  http://www.ecst.csuchico.edu/~pizza/koth   ;Pizza
  http://para.inria.fr/~doligez/corewar      ;Planar

Newbies should check the above pages for the FAQ, language specification,
guides, and tutorials. Post questions to rec.games.corewar. All new players
are infinitely welcome!
_______________________________________________________________________________
Greetings...

It has been absolutely ages since last issue and hill activity has been
minimal.  Fortunately the past few months have not been uneventful - JKW
has finally shared the code for Return of the Jedimp and organised the
Koth Fall Corewar Tournament (Kofacoto).

This issue, David Moore shows us how Combatra, his boot-distance works and
also we have the code for KafuFFLe, a defensive paper/stone.

-- John Metcalf
_______________________________________________________________________________
Current Status of the Internet Pizza Server ICWS '94 Draft Hill:

Hill Specs:
         coresize: 8000
   max. processes: 8000
         duration: after 80,000 cycles, a tie is declared.
max. entry length: 100
 minimum distance: 100
    rounds fought: 200
  instruction set: ICWS '94 Draft

 #   %W /  %L /  %T                       Name               Author Score  Age
 1  48.9/ 41.0/ 10.0              Shapeshifter      Michal Janeczek 156.8    4
 2  45.7/ 46.4/  7.9                     Razor      Michal Janeczek 145.0    5
 3  39.8/ 34.7/ 25.5       Self-Modifying Code             Ben Ford 144.8   93
 4  36.2/ 29.0/ 34.8                     Vilex         Ken Espiritu 143.4   45
 5  32.6/ 23.5/ 44.0                 Uninvited         John Metcalf 141.7   16
 6  38.9/ 36.9/ 24.2             Recycled Bits          David Moore 140.9  147
 7  31.5/ 23.5/ 45.0            Mini Digitalis    Christian Schmidt 139.6    0
 8  40.0/ 41.1/ 18.9                  Combatra          David Moore 138.8    5
 9  39.6/ 40.8/ 19.5                        G2          David Moore 138.5    0
10  37.8/ 37.3/ 24.9         Origami Harquebus                  mjp 138.2   41
11  28.5/ 19.2/ 52.3               Tie Factory    Christian Schmidt 137.8   19
12  25.2/ 12.9/ 61.9                  Cinammon         John Metcalf 137.6   18
13  29.4/ 21.4/ 49.3                 nPaper II        Paul-V Khuong 137.4   50
14  39.5/ 42.2/ 18.3                   Pitbull    Christian Schmidt 136.7    9
15  36.7/ 37.4/ 25.9      Trefoil the original        Steve Gunnell 135.9   38
16  27.8/ 21.3/ 50.8                      Jade             Ben Ford 134.3   70
17  37.5/ 41.0/ 21.5                 CrazyShot    Christian Schmidt 134.0    8
18  37.9/ 41.9/ 20.2                    Ultima    Christian Schmidt 133.9   12
19  26.3/ 19.4/ 54.3         Stylized Euphoria         Ken Espiritu 133.2   37
20  24.9/ 16.7/ 58.4                  Cinammon         John Metcalf 133.0   43
21  27.5/ 22.2/ 50.3                    EvoP 3         Ken Espiritu 132.9   50
22  24.6/ 17.6/ 57.8    Return of the Fugitive          David Moore 131.6   74
23  25.7/ 20.2/ 54.1              The Dark One    Christian Schmidt 131.2    2
24  26.6/ 22.4/ 50.9                      Exor         Ken Espiritu 130.9   50
25  27.6/ 26.5/ 45.9                Wintermute         John Metcalf 128.7   34

Age since last issue: 18 ( 12 last issue, 20 the issue before )
Days since last issue: 209 ( 121 last issue, 101 the issue before )
Average age: 34 ( 34 last issue, 28 the issue before )
Average score: 138 ( 137 last issue, 137 the issue before )
Average movement: -6.0 ( -1.5 last issue, -4.2 the issue before )
Warriors surviving: 14 ( 18 last issue, 9 the issue before )

The top 25 warriors are represented by just 9 independent authors: Schmidt
with 6, Espiritu, Moore and Metcalf with 4, Janeczek and Ford with 2. The
remaining three authors have just 1 warrior each. ( 10 authors last issue,
10 the issue before )

Shapeshifter dominates the hill by nearly 12 points, utilising a P^3 ->
dodger/stone/scanner to great effect.  Janeczek's other warrior, a HSA-like
scanner by the name of Razor holds second place.  Only Trefoil gains rank -
Wintermute drops furthest, from 4th to 25th.
_______________________________________________________________________________
94 - What's New (Sorted by rank and score)

 #   %W /  %L /  %T                       Name               Author Score  Age
 1  47.2/ 42.2/ 10.6              Shapeshifter      Michal Janeczek 152.2    1
 1  44.8/ 46.8/  8.4                     Razor      Michal Janeczek 142.8    0
 2  39.3/ 39.0/ 21.7                   Pitbull    Christian Schmidt 139.5    1
 4  23.4/ 12.6/ 64.0                  Cinammon         John Metcalf 134.2    1
 5  37.3/ 41.9/ 20.8                   Behemot      Michal Janeczek 132.7    0
 5  38.4/ 44.7/ 16.9                Brainstorm      Michal Janeczek 132.2    1
 6  26.0/ 21.2/ 52.8                 Uninvited         John Metcalf 130.9    1
 7  36.5/ 40.4/ 23.0                 CrazyShot    Christian Schmidt 132.6    1
 8  28.9/ 25.3/ 45.7            Mini Digitalis    Christian Schmidt 132.5    0
 8  35.8/ 41.3/ 22.9             Combatra 2667          David Moore 130.4    1
 9  37.0/ 41.7/ 21.3                      G2-b          David Moore 132.2    1
10  35.8/ 41.9/ 22.4                    Ultima    Christian Schmidt 129.6    0
12  22.5/ 17.3/ 60.2                  KafuFFLe         John Metcalf 127.7    1
14  36.6/ 44.6/ 18.8               goonie lite          David Moore 128.6    0
17  32.9/ 36.5/ 30.7                      test                   dm 129.3    1
17  18.2/ 13.4/ 68.4                     Seven         John Metcalf 122.9    1
18  37.5/ 48.1/ 14.5            Nothing New... Leonardo H. Liporati 126.9    1
18  34.2/ 42.5/ 23.3                  Combatra          David Moore 125.9    0
18  35.8/ 48.0/ 16.2    Burn Paper, Stomp Imps          David Moore 123.6    1
19  25.1/ 21.8/ 53.1              The Dark One    Christian Schmidt 128.3    1
25  28.4/ 33.3/ 38.3                    Ultima    Christian Schmidt 123.5    1
25  19.8/ 18.7/ 61.4                      Maya         John Metcalf 120.9    1

Players entering hill since last issue: 5 ( 5 last issue, 7 the issue before )
Average rank of new entries: 11 ( 17 last issue, 13 the issue before )

Michal Janeczek makes an impressive hill debut.  Activity has been scarce,
where is everyone?
_______________________________________________________________________________
94 - What's No More (Sorted by age)

 #   %W /  %L /  %T                       Name               Author Score  Age
26  25.2/ 29.3/ 45.5          The Stormbringer    Christian Schmidt 121.1  142
26  22.4/ 25.7/ 51.9               Stonewashed    Christian Schmidt 119.1   78
26  33.1/ 44.3/ 22.6                   myBlur2             Paulsson 121.9   41
26  21.2/ 22.7/ 56.1                    Jaguar    Christian Schmidt 119.6   36
26  32.3/ 44.0/ 23.7                    SnooPy              P.Kline 120.6   27
26  28.9/ 33.8/ 37.4                 Trefoil f        Steve Gunnell 123.9   25
26  35.2/ 49.7/ 15.1                  Friction         Ken Espiritu 120.7   19
26  24.6/ 27.9/ 47.5                 Trefoil c        Steve Gunnell 121.3   16
26  36.6/ 53.5/  9.9            Iron Curtain 3         Ken Espiritu 119.8   14
26   0.6/  0.6/  2.8                  KafuFFLe         John Metcalf   4.7    9
26  22.5/ 24.3/ 53.1          Unlucky Redcoder         John Metcalf 120.8    8
26  18.8/ 19.3/ 62.0                     Seven         John Metcalf 118.3    7
26  36.1/ 50.2/ 13.7              Resurrection         Ken Espiritu 122.0    6
26   1.9/  1.7/  0.4                    Ultima    Christian Schmidt   6.2    5
26   1.5/  2.3/  0.2             Combatra 2667          David Moore   4.6    5
26  35.8/ 51.0/ 13.2            Nothing New... Leonardo H. Liporati 120.7    4
26  18.3/ 18.5/ 63.2                      Maya         John Metcalf 118.1    4
26   2.0/  1.1/  0.8                      test                   dm   6.9    3
26  34.8/ 47.3/ 17.9               goonie lite          David Moore 122.4    2
26  35.0/ 49.4/ 15.6    Burn Paper, Stomp Imps          David Moore 120.6    2

Paulsson, Kline and Liporati leave the hill completely.  Schmidt's oldest
three warriors are pushed off.
_______________________________________________________________________________
94 - What's Old

 #   %W /  %L /  %T                       Name               Author Score  Age
 6  38.9/ 36.9/ 24.2             Recycled Bits          David Moore 140.9  147
 3  39.8/ 34.7/ 25.5       Self-Modifying Code             Ben Ford 144.8   93
22  24.6/ 17.6/ 57.8    Return of the Fugitive          David Moore 131.6   74
16  27.8/ 21.3/ 50.8                      Jade             Ben Ford 134.3   70
13  29.4/ 21.4/ 49.3                 nPaper II        Paul-V Khuong 137.4   50
21  27.5/ 22.2/ 50.3                    EvoP 3         Ken Espiritu 132.9   50
24  26.6/ 22.4/ 50.9                      Exor         Ken Espiritu 130.9   50

P-warriors Recycled Bits and Self-Modifying Code look as healthy as always.
Who will be next to enter the Hall of Fame? Will Return of the Fugitive
survive the next 4 challenges?
_______________________________________________________________________________
The Extended New Hall of Fame:  * indicates the warrior is still active.

Pos Name                   Author             Age    Strategy
 1  Probe                  Anton Marsden      403    Q^2 -> Bomber
 2  Blur 2                 Anton Marsden      396    Scanner
 3  Damage Incorporated    Anton Marsden      373    Q^2 -> Bomber
 4  Return Of The Jedimp   John K W           357    Q^2 -> Stone/imp
 5  unrequited love        kafka              346    Q^2 -> Paper
 6  Impish v0.2            Ian Oversby        345    Stone/imp
 7  Gigolo                 Core Warrior staff 332    Q^2 -> Stone/imp
 8  Falcon v0.3            Ian Oversby        275    P-warrior
 9  Nine Seven Six         M R Bremer         232    Q^2 -> Stone/imp
10  Rosebud                Beppe              218    Stone/imp
11  Newt                   Ian Oversby        216    Q^2 -> Stone/imp
12  Q^2 Miro               Anders Ivner       214    Q^2 -> Scanner/bomber
13  Instant Wolf 3.4       Edgar              205    P-warrior
14  Goldfinch              P.Kline            201    P-warrior
15  Simple v0.4b           Ian Oversby        197    QScan -> Stone/imp
16  Trident^2              John K W           195    Q^2 -> Stone/imp
17  ompega                 Steven Morrell     189    Stone/imp
18  Frogz                  Franz              172    Q^2 -> Paper
19  The Machine            Anton Marsden      164    Scanner
20  Memories               Beppe              152    Scanner
21  Recycled Bits          David Moore        147 *  P-warrior
 =  Vain                   Ian Oversby        147    Q^2 -> Stone/imp
23  Head or Tail           Christian Schmidt  142    Q^2 -> Paper
 =  The Stormbringer       Christian Schmidt  142    Q^2 -> Stone/imp
25  Electric Head          Anton Marsden      140    P-warrior
26  Vigor                  Ken Espiritu       138    Q^2 -> Paper
27  Fixed                  Ken Espiritu       135    Q^2 -> Paper
28  Tiberius 3.1           Franz              130    Q^2 -> Paper
29  Ultraviolet-B          Ken Espiritu       120    Q^2 -> Paper
30  obvious to those who k Robert Macrae      117    Q^2 -> Paper
31  Solomon v0.8           Ian Oversby        116    Stone and scanner
32  CC Paper 3.3           Franz              107    Q^2 -> Paper
33  mrb-test               M R Bremer         106    *Unknown*
34  T.N.T. pro             Maurizio Vittuari  105    Bomber
 =  Pulp v0.5              Ian Oversby        105    Q^2 -> Paper
36  Fugitive               David Moore        102    Q^2 -> Paper/imp
37  Vengeance              Robert Hale        101    Q^2 -> Stone/imp
38  Jack in the box II     Beppe Bezzi        100    P-warrior
 =  Fire and Ice           David Moore        100    P-warrior
40  Oblivion               Ian Sutton          99    P-warrior
41  Self-Modifying Code    Ben Ford            93 *  P-warrior
 =  Silver Talon 1.2       Edgar               93    Scanner
43  death by redcode       Simon Wainwright    91    Q^2 -> Bomber
44  Bodge 1                Robert Macrae       85    Q^2 -> Scanner
45  Inferno 2.4            Philip Kendall      84    Qscan -> Bomber
46  Test                   Anton Marsden       83    *Unknown*
 =  NCC-1701-A             Philip Kendall      83    P-warrior
48  RetroQ                 Paul Kline          82    Q^2 -> Paper
49  Tornado 4              Beppe Bezzi         78    Bomber
 =  Stonewashed            Christian Schmidt   78    Q^3 -> Paper/stone

Stormbringer perishes, sharing it's final resting place with Head or Tail.
Stonewashed creeps onto the bottom of the hill displacing He Scans Again,
before it too perishes.
_______________________________________________________________________________
Current Status of the Internet Pizza Server Beginner Hill:

Hill Specs:
         coresize: 8000
   max. processes: 8000
         duration: after 80,000 cycles, a tie is declared.
max. entry length: 100
 minimum distance: 100
      maximum age: At age 100, warriors are retired.
    rounds fought: 200
  instruction set: ICWS '94 Draft

 #   %W /  %L /  %T                       Name               Author Score  Age
 1  51.9/ 24.7/ 23.4             MorphinMerlin             Jeremy K 179.2   25
 2  52.4/ 33.6/ 14.0             Grand Mal 1.1         Ransom Smith 171.2   27
 3  46.9/ 34.0/ 19.1              Seek&Destroy     Ayan Chakrabarti 159.8    4
 4  50.7/ 42.1/  7.3                 Kenshin d        Steve Gunnell 159.3   84
 5  46.8/ 34.5/ 18.7                Golden Gun          Ken Hubbard 159.1   98
 6  45.9/ 36.3/ 17.8               Gomjabbar V         Ingo S Kacza 155.6   93
 7  39.7/ 26.8/ 33.5       DiHydrogen Monoxide          Josh Yeager 152.6   95
 8  41.9/ 32.4/ 25.8     the boy's a time bomb                  aCM 151.4   89
 9  41.6/ 32.5/ 25.9                  jollyblu                  aCM 150.6   97
10  28.7/  9.2/ 62.1              PimpKing 1.0           Simon Duff 148.2   80
11  32.8/ 20.8/ 46.4 Hyper Advanced (read: sux           Josef Jahn 144.8   16
12  42.6/ 40.7/ 16.8 Even More Advanced (read:           Josef Jahn 144.5   31
13  40.9/ 38.5/ 20.6          Advanced Spooner           Josef Jahn 143.4   29
14  39.7/ 37.8/ 22.5                     Chaos         John Morahan 141.5   39
15  29.1/ 19.3/ 51.6                Arkenstone         John Morahan 138.9   50
16  41.0/ 43.1/ 16.0                Heatseeker         John Morahan 138.8   48
17  35.3/ 33.3/ 31.5                  Mob Boyz           Simon Duff 137.3   81
18  27.2/ 19.7/ 53.0                 Simpleton     Ayan Chakrabarti 134.7    8
19  39.1/ 43.6/ 17.3               Remorseless     Ayan Chakrabarti 134.6    5
20  23.4/ 16.6/ 59.9                   Fangorn         John Morahan 130.2   54
21  28.3/ 32.3/ 39.4                    Toofan     Ayan Chakrabarti 124.3    9
22  28.3/ 36.0/ 35.7                VelvetFist     Ayan Chakrabarti 120.7    6
23  34.2/ 48.8/ 17.0                  h1_1.red          Dave Hillis 119.6   28
24  35.4/ 55.8/  8.7                      Mini         John Metcalf 115.1   49
25  17.2/ 48.8/ 34.0       Pinky And The Brain      Simon Glanville  85.7    1

In the 48 successful challenges since last issue, 8 warriors have achieved
retirement, 2stoned, Forgotten Lore, Caladan II, PC, Wild-Fire, da mutant,
Arsonic C and FireMaster 2.
_______________________________________________________________________________
Current Status of the KOTH.ORG '94 No Pspace Hill:

Hill Specs:
         coresize: 8000
   max. processes: 8000
         duration: after 80,000 cycles, a tie is declared.
max. entry length: 100
 minimum distance: 100
    rounds fought: 250
  instruction set: ICWS '94 Draft, excluding ldp and stp

 #  %W/ %L/ %T                      Name               Author    Score    Age
 1  48/ 37/ 15                   Behemot      Michal Janeczek    159.8     33
 2  46/ 42/ 12                 Eraser II         Ken Espiritu    150.3    167
 3  46/ 42/ 13                        G2          David Moore    149.5      2
 4  46/ 42/ 12                      Jinx    Christian Schmidt    149.1    173
 5  38/ 28/ 34            Mini Digitalis    Christian Schmidt    148.6      1
 6  46/ 44/ 10                   Stalker              P.Kline    148.1    195
 7  39/ 32/ 29                   Blacken          Ian Oversby    145.9    457
 8  45/ 44/ 11                   Pitbull    Christian Schmidt    145.8     43
 9  37/ 28/ 36                   Omnibus         John Metcalf    145.3    219
10  44/ 43/ 12                  Zooom...         John Metcalf    145.1    346
11  35/ 24/ 41                 nPaper II        Paul-V Khuong    144.8    210
12  34/ 25/ 41                      Jade             Ben Ford    143.8    279
13  45/ 46/ 10         vamp/scan test b1         Ken Espiritu    143.6    125
14  33/ 23/ 44                 Uninvited         John Metcalf    142.5    162
15  31/ 23/ 46              The Dark One    Christian Schmidt    139.8      3
16  31/ 22/ 48               Tie Factory    Christian Schmidt    139.6     61
17  31/ 23/ 45                    Jaguar    Christian Schmidt    139.6    197
18  40/ 42/ 18                 CrazyShot    Christian Schmidt    139.0     42
19  33/ 28/ 39              Experimental         John Metcalf    138.3    166
20  43/ 49/  8                   Kenshin        Steve Gunnell    136.7    165

Old timer Boys are Back in Town perishes age 441, allowing Blacken to claim
title of oldest warrior.  Also gone are Ant Factory (268), Icen (246) and
Evop 3 (199).  Janeczek has a firm grip on the hilltop, this time with his
MiniQ^3 -> Stun Bomber.
_______________________________________________________________________________
Current standings of Kofacoto:

             #1   #2   #3   #4  Total                #1   #2   #3   #4  Total
Janeczek : 1000  850  764 1000 : 3614      Hillis : 342  214  454   79 : 1089
   Moore :  968  402 1000  886 : 3256      Yeager : 562  253  200    . : 1015
Liporati :  728 1000  749  397 : 2874     Pihlaja : 895    .    .    . :  895
  Macrae :  989  486  636  757 : 2868   Nevermind :   .  374  256    . :  630
   Kline :  922  488  579  878 : 2867 Chakrabarti : 574   31    .    . :  605
 Schmidt :  724  444  973  620 : 2761   Adamowski :  81   67  405    . :  553
Paulsson :  977  282  529  935 : 2723      Khuong : 538    .    .    . :  538
    Ford :  629   74  447  586 : 1736     Metcalf :   .    .  478    . :  478
 Gunnell :  755  245  424  230 : 1654       Kacza : 345    .    .    . :  345
 Guenzel :  713  686    .    . : 1399      Ankerl :  30  197    .    . :  227
 Karonen :  672  185  327    . : 1184        Chin : 138   41    .    5 :  184
  Stefan :  652  247    .  195 : 1094

The preliminary rounds are over with the highest ranking 8 competitors going
forward to the playoffs.  Janeczek claims victory in both the White Warrior
and Hostage rounds.  Liporati takes first place in the '88lp Multi-Warrior,
while Moore discovers Black Box's p-space weakness to succeed in the Black
Warrior round.

For the latest tournament info, check out the tournament's home page at:

  http://www.koth.org/kofacoto
_______________________________________________________________________________
Extra Extra - Combatra by David Moore

Redcode warriors may start with 100 instructions, but when the scanners
come looking, nobody wants to be that big. Therefore, they often bootstrap
a sub-program away from their original code.

A while back in the Redcode Maniac's Tournament, Paul Kline capitalized on
this behavior in an intriguing way. Knowing the boot distances of his
scheduled opponents, his program SnowDust could search for the enormous
glob of unused code left by his opponents, and then adjust to attack
precisely the location of the booted module. Paul won that round by a
landslide.

That's a fine strategy if we know our enemy, but what if we don't have a
handy table to look up its intimate details? In the '94 hill competition,
we must find out during the battle. That can be hard work, but once those
secrets are learned, pspace allows us to remember and exploit them.

We can locate the boot code simply by scanning for it. However, learning
where the warrior actually fights is harder. Scanning for it is impossible
because executed instructions look just like non-executed ones. We have to
trick its processes into code that conveniently reveals its hideout.

What if that code was a smart bomb like this:

     Bomb    MOV.A #MyCode-Bomb, MyCode
              ...
     MyCode  STP.AB #0, #PspaceLocation

At the end of the round, if MyCode is non-zero then we know where the
opponent hides. Wheee!

In fact, that is how my warrior Combatra works:

;strategy Start each battle with a few quick scans. If nothing
;strategy is found, then run either a core clear or a bomber.
;strategy Otherwise, assume that Combatra found the opponent's
;strategy original 100 instructions. Probe to discover where its
;strategy processes run. Remember where everything is. Compute
;strategy the bootstrap distance. Later, a scanner finds the enemy
;strategy simply by locating its enormous boot code.

Combatra destroys many of the same warriors that SnowDust was designed to
beat: Probe, Gigolo, Impish, CIA, blue candle, and Torch.

However, its scores can vary wildly between battles of 200. Combatra's
opportunistic scan might locate the enemy in the first battle, or in the
100th. Furthermore, when fighting a multi-component warrior, such as an
imp/stone like The Stormbringer, the scores will differ depending on which
part is probed first. For example, Combatra may happily take advantage of
Stormbringer's imps, not realizing that greater rewards could be achieved
if it could find the stone. In fact, Stormbringer's imp launcher happens
to be positioned precisely 112*98 steps before its stone, so it is a great
decoy to fool the process finder. Perhaps a different design would be less
susceptible to decoys. One such alternative is included here for your
amusement (below the main warrior).

Perhaps a better boot-finding program could be made by hacking existing
warriors instead of by requiring two specialized components. That might
flatten some of the score fluctuations.

An interesting phenomenen influenced the developement of Combatra. A quick
bomber can brainwash a pspacer even without using STP bombs. The brainwash
happens when the pspacer references data that has been bombed. For
example, consider this code typical of modern pspacers:

        STP.B  *table, #Pstate
table   JMP        }1,  441
state1  DAT     boot1,  882

If either table or state1 is bombed, then the pspacer will store junk data
instead of its intended data. This will happen to a P^3 switcher like
SnooPy during 5/7900 of battles with a quick bomber like Cinammon. In 200
rounds, there is an 11.9% chance that SnooPy will be brainwashed at least
once. This effect increases dramatically for slower pspacers. It's
tolerable for SnooPy, a machine that changes state quickly, but it can't
be ignored by a long-term strategist like Combatra.

One way to reduce problems is to keep the data inside of your executable
instructions as much as possible. Instead of:

     STP.AB *pointer, #Pspace

try to put the data directly into the STP instruction:

     STP.AB #1, #Pspace

Here's the code:

;redcode-94
;name Combatra
;author David Moore
;strategy Start each battle with a few quick scans. If nothing
;strategy is found, then run either a core clear or a bomber.
;strategy Otherwise, assume that Combatra found the opponent's
;strategy original 100 instructions. Probe to discover where its
;strategy processes run. Remember where everything is. Compute
;strategy the bootstrap distance. Later, a scanner finds the enemy
;strategy simply by locating its enormous boot code.
;assert CORESIZE==8000 && MAXLENGTH==100

org start

;----------------------------------------------------------------------
; the core clear is used either alone or with the scanner

cgate   dat    -1,  sFirst
        dat <5334, <2667
        dat    -1,  12
clear   spl #3891,  sScan  ; spl #3891, 18
        mov    -1, >cgate
        mov   *-1, >cgate
        djn.a  -2,  cgate
        djn.a  -3, *-1

        dat 0,0
        dat 0,0
        dat 0,0
        dat 0,0  ; scanned

sDiff   equ    65 ; difference between sScan and cgate after boot
sStep   equ    98
sFirst  equ  1283

; Boot the scanner to take advantage of the magic number

sBoot   mov  <away, <where
        ldp.a #pBoot, sStore
        mov  <away, <where
        mov  >clear, >sJump
        djn -2, #7
sJump   djn.f start+dist-3+sDiff+1, #start+dist-3+sDiff

sScan   add.ab #sStep+1, @2
        jmz.f  sScan, <sScan-sDiff
        jmz.f  sScan, <sScan-sDiff    ; ignore the loners
        spl (-3-sDiff)+3, <(-3-sDiff) ; write over what I just found
        djn.a  #6, #4                 ; after about 12 SPLs, change
sStore  add.ab #0, -5-sDiff           ; attack to hit booted opponent
        dat 0,0

;----------------------------------------------------------------------
; bomber taken from Kline's Floody River and hacked

bstep   equ 7829
btime   equ  863
btime2  equ  420

bomb    spl #bstep*2, -bstep
        mov {(bomb-2)+bstep*btime2, @3-(bstep*2)*btime
        mov   bomb, @-1
        add.x bomb,  -2
        djn.f -3, {-(bstep*2)*(btime-1)  ; hit by SPL to start clear
        mov    2, >bomb-3
        djn.f -1, >bomb-3
        dat <2667, 6-bomb

;----------------------------------------------------------------------
; Did I find something last time?

check   ldp.a #pTroll, tab
        add.a   #5,  tab  ; ignore small numbers
tab     slt.ab  #0, #11
        jmp compute,  9   ; (yes, go compute the boot distance)
        jmp bBoot,   10   ; (no, keep trolling)

; Compile all of my information into one nice number

compute ldp.a #pQuick, diff
diff    sub.a  #0, tab
        add.a #((start-qPtr)+tDist+5-6)-11-196, tab
        stp.ab tab, #pBoot
        stp.ab #6, #pMode  ; run scanner next time
        jmp boot, 0  ; I'm too slow to risk booting everything now

        dat 0,0
        dat 0,0
        dat 0,0
        dat 0,0  ; scanned

pMode   equ 271  ; overall strategy (code for one of the 11 states)
pBoot   equ 292  ; opponent's bootstrap distance

; intermediate results used to compute pBoot
pQuick  equ 433  ; what cell was quickscanned
pTroll  equ 454  ; what cell was occupied by the opponent

start   ldp.a #0, tab
        ldp.a #pMode, state
        mod.ba *tab,state; current;  next      loss       win       tie
        stp.b *1, #pMode ;  state ; state      ----       ---       ---
state   jmp     }0, 472  ; 0 check; 472= 42*11+ 10 = 52*9+ 4 = 47*10+ 2
        spl #check, 472  ; 1 check; 472= 42*11+ 10 = 52*9+ 4 = 47*10+ 2
        spl #bBoot, 472  ; 2 bomb ; 472= 42*11+ 10 = 52*9+ 4 = 47*10+ 2
        spl #sBoot, 943  ; 3 scan ; 943= 85*11+  8 =104*9+ 7 = 94*10+ 3
        spl #bBoot,  qA  ; 4 bomb ;3874=352*11+  2 =430*9+ 4 =387*10+ 4
qTable  spl #cBoot,  qB  ; 5 clear;2705=245*11+ 10 =300*9+ 5 =270*10+ 5
        spl #sBoot,  qC  ; 6 scan ;1536=139*11+  7 =170*9+ 6 =153*10+ 6
        spl #sBoot, 267  ; 7 scan ; 267= 24*11+  3 = 29*9+ 6 = 26*10+ 7
        spl #sBoot, 768  ; 8 scan ; 768= 69*11+  9 = 85*9+ 3 = 76*10+ 8
        spl #sBoot, 849  ; 9 scan ; 849= 77*11+  2 = 94*9+ 3 = 84*10+ 9
        jmp #cBoot, 455  ;10 clear; 455= 41*11+  4 = 50*9+ 5 = 45*10+ 5

;----------------------------------------------------------------------
; program intended to "troll" the enemy into revealing its location

tStep  equ 98
tTime  equ 2448

troll  mov    @0, *5
       add.f   3,  4
       jmz.a  -2,  1
       stp.ab #0, #pTroll
       jmp  #tStep, <-tStep
       ; this bomb causes my foe to report its location to me
       mov.a #(-2-tStep*tTime), -2-(-2-tStep*tTime)

; quickscan got something! (presumably boot code)

tDist   equ  2100 ; difference between start and troll after boot

tBoot   mov <tJump, {tJump
        mov <tJump, {tJump
        djn -2, #3
qCalc   mul.ba qTable, qPtr   ; compute the scanned location
qPtr    sne     qX, datZero
        add.a #qDiff, qPtr
        stp.ab qPtr, #pQuick  ; remember where I found it
        stp.ab  #1,  #pMode   ; next time, check the results
        stp.ab  #0,  #pTroll  ; forget previous troll now
tJump   djn.f start+tDist+6, #troll+6  ; start trolling

bAway   dat -3, bomb-(clear-3)

        dat 0,0
datZero dat 0,0
        dat 0,0
        dat 0,0  ; scanned

bBoot   add.f bAway, away  ; converts clear boot into bomber boot

; note: changing the distance between qTable and qPtr affects
; both the quickscan and the pspace!

qX      equ 5072
qInv    equ 6831  ; inverse of qX-1 (such that (qX-1)*qInv==1)
qDiff   equ 5983
qA      equ (((qX+(qTable-qPtr)-2)*qInv)%CORESIZE)
qB      equ (((qX+(qTable-qPtr)-1)*qInv)%CORESIZE)
qC      equ (((qX+(qTable-qPtr)-0)*qInv)%CORESIZE)

cBoot   sne qPtr+(qA-0)*qX, qDiff+qPtr+(qA-0)*qX
        seq      <qTable-1, qDiff+qPtr+(qA-1)*qX
        jmp          tBoot, {qCalc
        sne qPtr+(qC-0)*qX, qDiff+qPtr+(qC-0)*qX
        seq      <qTable+1, qDiff+qPtr+(qC-1)*qX
        jmp          tBoot, }qCalc
        sne qPtr+(qB-0)*qX, qDiff+qPtr+(qB-0)*qX
        seq      <qTable+0, qDiff+qPtr+(qB-1)*qX
where   jmp          tBoot, start+dist+5

dist    equ 6942  ; distance between start and clear after boot

boot    mov <away, <where
        mov <away, <where
        mov <away, <where
        mov <away, <where
        djn -4, #2
away    djn.f start+dist, #clear+5

end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;redcode-94
;name Process Finder
;author David Moore
;assert CORESIZE==8000

first equ 4104 ; 3585 ; 2587
fstep equ  911 ; 6727 ; 7699

PFIND equ 250

;bomb that writes back to fstore
fbomb  mov.a #first,  fstore-first

find   spl    #fstep , -fstep
fstore stp.ab #0     ,#PFIND
       add     find  , fbomb
       mov     fbomb ,*fbomb
       jmp     -2    , 0

end find
_______________________________________________________________________________
Extra Extra Extra - KafuFFLe by John Metcalf

KafuFFLe is a warrior formed from two strategies commonly found running in
parallel.  KafuFFLe is an example of a defensive paper/stone, such as Shadow
or Puddleglum.  Take a look at Oversby's Recovery for an example of an
aggressive paper/stone.

The creation of KafuFFLe's paper was inspired by one of Liporati's tiny hill
papers, which is effective though only 7 lines long.  Whether any similarity
exists between the two remains to be seen.  The paper here is a low process
silk-imp.

KafuFFLe uses a .5c stone which mutates into a clear by self-bombing.  This
happens in a similar way to the classic stone Carbonite. The stone's djn
co-operates with the bombing to build a decoy twice as fast.

It need not be tricky to uncover some decent constants for a paper/stone.
For KafuFFLe, I followed the traditional method of finding constants for
the paper by brute force, then placing the stone in each 'pocket' of
untouched core in turn, testing to see which was most effective.  However,
comparable results can be obtained by adding a second stage of brute force
to decide where to place the stone.

Anyhow, here's the code:

;redcode-94
;name KafuFFLe
;author John Metcalf
;strategy Mini-Q^3 -> Paper/Stone
;assert CORESIZE==8000

     pBoot equ pGo+501
     sBoot equ pBoot-755           ; still tweaking!

     org qGo
pGo: spl   1,        >sBoot-2619
     mov   <sFrm,    {sPos
     spl   1,        >sBoot+2759
     mov   <sFrm,    {sPos
sPos:spl   sBoot+6,  >sBoot-3494   ; launch stone

     mov   {pap1,    {pPos
     mov   {pap1,    {pPos
pPos:djn.f pBoot+8,  <sBoot-1666   ; launch paper

     pStep1 equ 1312
     pStep2 equ 3692
     pStep3 equ 5323               ; still tweaking!

pap1:spl   @0+8,     <pStep1       ; paper (Nomad)
     mov   }pap1,    >pap1
     mov   }pap1,    >pap1
pap2:spl   @0,       <pStep2
     mov   }pap2,    >pap2
     mov   {pap2,    <pap3
pap3:spl   *pStep3-4,>pStep3
     mov.i #pStep2-pStep3+1,}pStep3-1

     for 36
     dat 0,0
     rof

     sStp equ 703
     sTim equ 1183

sFrm:spl   #0,       #0+6          ; stone (Uninvited)
sLp: mov   sBmb,     @sPtr
sSel:sub.x #sStp*2,  @sLp
sPtr:mov   {3582,    }sSel+2*sStp*sTim
     djn.f @sSel,    }sPtr
sBmb:dat   <sStp,    >1

     qf equ qKil                   ; Mini-Q^3
     qs equ 222
     qd equ 322
     qi equ 7
     qr equ 11

qGo: seq   qd+qf+qs,    qf+qs      ; 1
     djn.f qSki,        {qd+qf+qs+qi
     seq   qd+qf+6*qs,  qf+6*qs    ; B
     djn.f qFas,        {qd+qf+6*qs+qi
     seq   qd+qf+5*qs,  qf+5*qs    ; B-1
     jmp   qFas,        <qBmb
     seq   qd+qf+7*qs,  qf+7*qs    ; B+1
     jmp   qFas,        >qBmb
     seq   qd+qf+9*qs,  qf+9*qs    ; A-1
     djn   qFas,        {qFas
     seq   qd+qf+10*qs, qf+10*qs   ; A
     jmn   qFas,        {qFas

     seq   qd+qf+3*qs,  qf+3*qs    ; C
     djn.f >qFas,       {qd+qf+3*qs+qi
     seq   qd+qf+2*qs,  qf+2*qs    ; C-1
     jmn   >qFas,       {qSlo
     seq   qd+qf+4*qs,  qf+4*qs    ; C+1
     jmn   >qFas,       }qSlo
     seq   qd+qf+12*qs, qf+12*qs   ; B*C-B
     jmn   qSlo,        {qSlo
     seq   qd+qf+15*qs, qf+15*qs   ; B*C-C
     jmp   qSlo,        <qBmb
     seq   qd+qf+21*qs, qf+21*qs   ; B*C+C
     jmp   qSlo,        >qBmb
     seq   qd+qf+24*qs, qf+24*qs   ; B*C+B
     jmn   qSlo,        }qSlo
     seq   qd+qf+27*qs, qf+27*qs   ; A*C-C
     djn   qSlo,        {qFas
     seq   qd+qf+30*qs, qf+30*qs   ; A*C
     jmn   qSlo,        {qFas
     sne   qd+qf+18*qs, qf+18*qs   ; B*C
     jmz.f pGo,         qd+qf+18*qs-10

qSlo:mul   #3,          qKil       ; C=3
qFas:mul.b qBmb,        @qSlo
qSki:sne   >qf+23*qs,   >qKil
     add   #qd,         qKil
qLoo:mov   *qKil,       <qKil
qKil:mov   qBmb,        }qs
     sub   #qi-1,       @qLoo
     djn   qLoo,        #qr
     djn.f pGo,         <10        ; A=10
qBmb:dat   {qi*qr-10,   {6         ; B=6
     end
_______________________________________________________________________________
Errata

In Core Warrior 70, the summary of the P^3 result incorrectly switched
"even" and "odd". The correct text for lines 705-6 should read:

   j = (i+1+m)/2  if i is odd
   j = i/2        if i is even
_______________________________________________________________________________
Questions?  Concerns?  Comments?  Complaints?  Mail them to people who care.
Beppe Bezzi <giuseppe.bezzi@galactica.it>, Philip Kendall <pak21@cam.ac.uk>,
Anton Marsden <anton@paradise.net.nz>, John Metcalf <grumpy3039@hotmail.com>
and Christian Schmidt <schmidt@mail.uni-mainz.de>
2002-2005 corewar.info. Logo C. Schmidt