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 64                                                  8 January 1998
______________________________________________________________________________
Core Warrior is a newsletter promoting the game of corewar. Emphasis is placed 
on the most active hills--currently the '94 draft hill and the beginner hill. 
Coverage will follow where ever the action is.  If you have no clue what I'm 
talking about then check out these five-star internet locals for more 
information:

FAQs are available by anonymous FTP from rtfm.mit.edu as
pub/usenet/news.answers/games/corewar-faq.Z
FTP site is: ftp.csua.berkeley.edu /pub/corewar
             ftp.inria.fr/INRIA/Projects/para/doligez/cw/mirror.
Web pages are at: (Please note new Stormking's address)
http://www.koth.org/                            ;Stormking
http://www.ecst.csuchico.edu/~pizza/koth        ;Pizza
http://pauillac.inria.fr/~doligez/corewar/      ;Planar

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

If ftp.csua.berkeley.edu is unreachable, you can download pMARS at:
Terry's web page--http://www.ncs.infi.net/~wtnewton/corewar/
Planar ftp site--ftp://ftp.inria.fr/INRIA/Projects/para/doligez/cw/mirror
Fechter ftp site--ftp://members.aol.com/ofechner/corewar

A collection of Bezzi's hints in the first issues is available at:
ftp://ftp.volftp.vol.it/pub/pc/msdos/games/solutions/bbhints.zip

Beppe Bezzi web page - http://www.aspide.it/freeweb/Bezzi
______________________________________________________________________________
Greetings.

I'm a bit late with this issue, sorry, but i hope you'll be satisfied with
the code of Nomolos and obvious and forgive me.

I had some problems of space with this issue and i had to cut the beginners
hill and the old hall of fame; my mailer strongly refused to paste other text.

Best wishes of merry Christmas and Happy New Year to you all.

--Beppe Bezzi

_____________________________________________________________________________
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  46.6/ 36.1/ 17.3             Alladins Cave              P.Kline 157.0    6
 2  41.1/ 29.1/ 29.9                   Nomolos          Ian Oversby 153.0   10
 3  38.9/ 28.1/ 33.0                     Fixed         Ken Espiritu 149.8    5
 4  36.6/ 24.4/ 39.0                      Newt          Ian Oversby 148.9   99
 5  37.9/ 29.0/ 33.0                      Vain          Ian Oversby 146.8   21
 6  36.8/ 27.0/ 36.2                     Vigor         Ken Espiritu 146.7    9
 7  42.2/ 38.3/ 19.4             Electric Head        Anton Marsden 146.1  108
 8  45.6/ 45.8/  8.6            He Scans Again              P.Kline 145.5    1
 9  42.1/ 40.2/ 17.7                 Red Baron    Christian Schmidt 144.0   64
10  33.7/ 23.4/ 43.0            Benchmark [94]           Zul Nadzri 143.9   21
11  39.6/ 36.6/ 23.8                PAN-TAU-RA    Christian Schmidt 142.6    6
12  36.5/ 30.5/ 33.0 obvious to those who know        Robert Macrae 142.4   57
13  41.3/ 42.4/ 16.3 The Boys are Back in Town       Philip Kendall 140.3    3
14  33.7/ 27.5/ 38.8                 Pulp v0.5          Ian Oversby 139.9   56
15  34.8/ 30.2/ 35.1                 Vengeance          Robert Hale 139.3   56
16  38.4/ 38.0/ 23.6                    Stasis          David Moore 138.8    2
17  40.5/ 42.6/ 16.9          Silver Talon 1.2                Edgar 138.4    7
18  37.1/ 36.8/ 26.1                 Tornado 4          Beppe Bezzi 137.4   23
19  28.2/ 19.4/ 52.4      Return Of The Jedimp             John K W 137.1  353
20  42.5/ 48.2/  9.4                  Memories          Beppe Bezzi 136.7   27
21  38.8/ 41.5/ 19.7                    HnK II       Ivan Krajnovic 136.2    5
22  34.1/ 32.7/ 33.1              Head or Tail    Christian Schmidt 135.5  141
23  31.9/ 28.4/ 39.7             Ultraviolet-B         Ken Espiritu 135.5   31
24  38.9/ 42.7/ 18.4          It's not a trick    Christian Schmidt 135.2   12
25  33.9/ 33.0/ 33.1            Nine Seven Six           M R Bremer 134.8  217


Age since last issue: 26 ( 31 last issue, 27 the issue before )
New warriors: 15  Turnover/age rate 60%
Average age: 53 ( 63 last issue, 63 the issue before )
Average score: 142 ( 136 last issue, 136 the issue before )
The top 25 warriors are represented by 14 independent authors: Schmidt and
Oversby with 4; Espiritu with 3; Kline and Bezzi with 2.
All others with one warrior each.

Paul Kline put his Alladins Cave on the top and here it remained all time,
even if he tried very hard to do better in 94 test; let's see who will be
the first to find the magic word ('open sesame' is for Ali Baba cave :-)
______________________________________________________________________________
94 - What's New

 #   %W /  %L /  %T                       Name               Author Score  Age
 1  41.6/ 36.9/ 21.5             Alladins Cave              P.Kline 146.4    2
 2  36.0/ 28.1/ 36.0                     Fixed         Ken Espiritu 143.9    1
 4  33.6/ 26.9/ 39.5                     Vigor         Ken Espiritu 140.2    5
 5  34.4/ 29.7/ 35.8                   Nomolos          Ian Oversby 139.2    6
 6  33.9/ 29.1/ 37.0                      Vain          Ian Oversby 138.8   17
 9  37.8/ 41.4/ 20.8          Silver Talon 1.2                Edgar 134.1    3
10  36.6/ 39.4/ 24.0          It's not a trick    Christian Schmidt 133.9    8
13  28.2/ 24.8/ 47.0            Benchmark [94]           Zul Nadzri 131.5   17
17  39.6/ 49.6/ 10.8                  Memories          Beppe Bezzi 129.6   23
18  28.4/ 27.5/ 44.1             Ultraviolet-B         Ken Espiritu 129.3   27
22  34.8/ 42.4/ 22.8                    HnK II       Ivan Krajnovic 127.1    1
24  31.8/ 37.2/ 31.0                 Tornado 4          Beppe Bezzi 126.4   19
 6  40.4/ 41.9/ 17.7 The Boys are Back in Town       Philip Kendall 138.8    1
17  35.6/ 39.6/ 24.9                    Stasis          David Moore 131.6    1
 9  43.6/ 47.5/  9.0            He Scans Again              P.Kline 139.6    1

More than half hill is changed.
______________________________________________________________________________
94 - What's No More

26  35.6/ 43.5/ 20.9       Damage Incorporated        Anton Marsden 127.7  373
26   1.0/  0.0/  3.0                   Dim Wit          Ian Oversby   6.1   35
26  39.1/ 50.4/ 10.5            He Scans Again              P.Kline 127.8   76
26  32.1/ 42.1/ 25.8 PaperBoy Throws Some Rock          Robert Hale 122.1   29
26  35.9/ 48.4/ 15.7                       C^3    Christian Schmidt 123.5   51
26   1.7/  1.6/  0.7                   Nomolos          Ian Oversby   5.7   17
26  37.2/ 49.9/ 12.9       Conan the Barbarian    Christian Schmidt 124.4   15
26  26.7/ 29.2/ 44.1               Merciless-A         Ken Espiritu 124.2   56
26  32.7/ 43.1/ 24.1               Digitalis 2    Christian Schmidt 122.4   37

And something else that i missed :-(

Damage incorporated is the leaves the hill and loses the * in the Hall of Fame
______________________________________________________________________________
94 - What's Old

 #   %W /  %L /  %T                       Name               Author Score  Age
20  23.5/ 19.0/ 57.5      Return Of The Jedimp             John K W 128.1  353
19  30.6/ 32.4/ 37.0            Nine Seven Six           M R Bremer 128.8  217
12  31.8/ 31.7/ 36.5              Head or Tail    Christian Schmidt 131.9  141
14  35.6/ 40.3/ 24.1             Electric Head        Anton Marsden 131.0  108

Return of the Jedimp is the oldest warrior now, Elrctric Head the new entry.
______________________________________________________________________________

No space left for Old Hall of Fame, no changes from last issue.
______________________________________________________________________________
NEW HALL OF FAME
* means 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           353 *  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  Rosebud                Beppe              218    Stone/imp
10  Nine Seven Six         M R Bremer         217 *  Q^2 -> Stone/imp
11  Q^2 Miro               Anders Ivner       214    Q^2 -> Scanner/bomber
12  Instant Wolf 3.4       Edgar              205    P-warrior
13  Goldfinch              P.Kline            201    P-warrior
14  Simple v0.4b           Ian Oversby        197    QScan -> Stone/imp
15  Trident^2              John K W           195    Q^2 -> Stone/imp
16  ompega                 Steven Morrell     189    Stone/imp
17  Frogz                  Franz              172    Q^2 -> Paper
18  The Machine            Anton Marsden      164    Scanner
19  Memories               Beppe              152    Scanner
20  Head or Tail           Christian Schmidt  141 *  Q^2 -> Paper
21  Tiberius 3.1           Franz              130    Q^2 -> Paper
22  Solomon v0.8           Ian Oversby        116    Stone and scanner
23  CC Paper 3.3           Franz              107    Q^2 -> Paper
24  mrb-test               m r bremer         106    ?
25  T.N.T. pro             Maurizio Vittuari  105    Bomber

Jedimps gains 3 spots, nine seven six 5, Head or tail 3; no new entries.
______________________________________________________________________________
Current Status of the Internet Pizza Server Beginner's Hill:

Sorry no space for beginners hill :-(
______________________________________________________________________________

Extra Extra (I)
Nomolos by Ian Oversby

I wouldn't normally publish anything as flimsy as a p-spacer.
However, maybe Kline does have a point that code-sharing will
encourage others to jump in so I thought I would share
Nomolos.  I am interested to know how making the code public
will effect it.

> By the way, I think the hill is a bit weird at the moment
> with many complex p-switchers.  Testing results are very
> different from real ones and changing boot distances a bit
> often changes the score significantly.  
> 
> Then those damn tests and not scoring if the dead warrior
> is less than 110 or something.  I hate another warrior being
> the same age as one of mine.  Is it just my imagination or
> did people stop playing when tests were introduced?  Anyway, 
> that is quite enough from this soapbox...

The original concept was quite simple.  As the hill is so
full of paper, kill the papers and then switch to a 
imp/paper to draw against everything else.  I had quite an
aggressive imp/paper that scored reasonably against most
warriors, only suffering from HSA and Memories type things.

I tried various warriors for the paper-killer including a
Blur-style warrior, mini-HSA and CMP scanners but nothing
did quite so well as one-shot scanners.  I wrote a fairly
flawed one a while back called Tsunami which also handled
some imp/stones well.  

The result did OK, landing in the upper part of the hill but
was easily beaten by Electric Head and HSA/Scorch.  I then
wanted to handle scanners with something else and change the
paper to something a little more aggressive.  Carbonite is
very effective against HSA/Scorch so I chose that.

The last point was the choice of paper.  I was only really
expecting paper/imps imp/stones and P-Spacers at this point
so it had to perform quite well alround against scanners.
The original Pulp is a little fragile against scanners so
after a little experimentation I came up with a replacement
that is OK against E-Head and isn't destroyed by scanners.
 
For the p-space algorithm resetting on tie for the stone
seems to work against pure scanners the best.  I also
thought it would be best to stay at the paper, even on
losing.  If I am brainwashed to this point by a scanner,
maybe I will be brainwashed back to the stone again.  It
seems to work OK anyway.

;----------

That was the original plan.  Then came several imp/papers
against which, my one-shot is helpless.  I wanted to add
mini-HSA which also handles imp/papers but there wasn't
enough space so I developed a new p-space brain and
added mini-HSA.  

This did OK for a few challenges until people updated
their imp/papers but the real blow was when the next
Bloodhound appeared.  This trashed Nomolos 25/140 so
I made a minor tweak (sorry Christian :-) and now it
takes hill-top again.  I suspect not for very long
though...



;redcode-94
;name Nomolos
;author Ian Oversby
;strategy Stone, One-shot Scanner
;strategy then try to tie
;strategy v2 Added mini-HSA
;strategy One scanner is never enough :-)
;assert 1

;--------
; Paper
;--------

pdist	equ	4000	; Not really

dist0	equ	5689
dist1	equ	1021
dist2	equ	3607
range1	equ	4723
range2	equ	6892

pboot	spl.b	1,	<-300
for 6
	mov.i	<pptr,	{pptr
rof
pptr	jmp.b	pdist,	#bomba+1

	mov.i	-pdist+5,	#0
	mov.i	-1,	#0
	mov.i	-1,	#0
silk	spl.b	@0,	<dist0
	mov.i	}-1,	>-1
silk1	spl.b	@0,	<dist1
	mov.i	}-1,	>-1
	mov.i	bomba,	}range1
	mov.i	bomba,	>range1
	mov.i	{silk1,	<silk2
silk2	jmp.b	@0,	<dist2
bomba	dat.f	<2667,	<5334

;---------
; P-Logic
;---------

w1	equ	cboot
w2	equ	tboot
w3	equ	boot
w4	equ	pboot

plc	equ	123

init	dat.f	#0,	#0
loss	dat.f	#0,	#1
win	dat.f	#0,	#-1
tie	dat.f	#0,	#0

pcode	ldp.a	#0,	loss
	ldp.a	#plc,	table
	add.ba	*loss,	table
	mod.a	#19,	table	; (-1 mod 19) = 0 :-)
	stp.ab	*table,	#plc
table	jmp.b	@0,	w1	; State 0

	dat.f	#1,	w1	; Stone
	dat.f	#2,	w1
	dat.f	#3,	w1
	dat.f	#4,	w1

	dat.f	#6,	w2	; Must always waste one line :-(
	dat.f	#6,	w2	; One-shot
	dat.f	#7,	w2
	dat.f	#8,	w2
	dat.f	#9,	w2
	dat.f	#10,	w2

	dat.f	#12,	w3	; Must always waste one line :-(
	dat.f	#12,	w3	; Mini-HSA
	dat.f	#13,	w3
	dat.f	#14,	w3
	dat.f	#15,	w3

	dat.f	#17,	w4	; Paper
	dat.f	#17,	w4

	dat.f	#17,	w4	; Safety net

;----------
; Mini HSA
;----------

mst	equ	9
ptr	equ	(bomb-5)

away	equ	5000

bomb	spl    #1,{1
kill	mov    bomb,<ptr
mptr	mov    >ptr,>ptr
	jmn.f  kill,>ptr
a	add    #mst+1,@mptr
scan	jmz.f  a,<ptr
	slt    @mptr,#btm-ptr+3
	djn    kill,@mptr
	djn    a,#16
btm	jmp    a,{kill
hp	dat.f	0,	-1

boot	mov    btm,@dest
for 4
	mov	<hp,<dest
rof
	djn.b	-4,	#2
	spl    @dest,1
dest	mov    #250,@away
	mov    bomb,<dest
	div.f  #0,dest

;-----------
;CARBONITE++
;-----------

caway	EQU	1800	; not really

cboot	mov	tar+1,	<cdest
	mov	tar,	<cdest
	mov	tar-1,	<cdest
cdest	mov	dbomb,	*caway
	spl	<cdest,	<2000
	mov	tar-2,	@cdest
	div.f	#0,	cdest
	spl	#0,	<-3000+3
	mov	197,	tar-197*3500
tar	add.ab	{0,	}0	
	djn.f	-2,	<-3000

dbomb	dat	>-1,	>1

;-----------------
; One-shot scanner
;-----------------

tgate	equ	(tloop-8)
half	equ	10
step	equ	(2*half)
dstr	equ	3001
tdist	equ	700

tpos	equ	(cptr+1)

tboot	mov.i	<tpos,	<tptr
for 4
	mov.i	<tpos,	<tptr
rof
	djn.b	tboot,	#2
	spl.b	*tptr,	<-202
tptr	div.f	#tdist,	#tdist+7
	dat.f	}-200,	>-303
	dat.f	#-25,	#cptr+4-tgate
	spl.b	#-20,	#20
b1	spl.b	#120,	#120-half
tloop	sub.f	tstep,	b1
	sne.i	*b1,	@b1
	djn.f	tloop,	<-dstr
tstep	spl.b	#-step,	<-step
	mov.i	@cptr,	>tgate
	mov.i	@cptr,	>tgate
cptr	djn.b	-2,	{b1

end pcode
______________________________________________________________________________
Extra Extra (II)
obvious to those who know
By Robert Mcrae


		"obvious" -- Or, How Not to Name Your Warrior.

obvious has just made it into middle age at 50, a good occasion to publish
it. Besides, I've been working on a oneshot for *ages* and with just a few
more papers on the hill... ;-)

obvious is a Q^2 scan followed by an aggressive paper. The Q^2 is actually a
new engine, which I wrote for convenience rather than power as it doesn't
work any better than the Probe masterpiece. 
However, new constants make it slightly more programmer-friendly because
there are now no accesses outside the table of pointers. This makes it
relatively easy to modify or re-order the code. 

I've kept the Probe attack as it has a particularly neat bombing pattern.
After lengthy analysis I came up with a full Tornado-style bomber which
shaved a couple of cycles off the bomb run but it never justified the extra
length and boredom quickly set in. If you want a longer scan, there are
eight lines which are available but are currently commented out. I found
that extra length 
gave away more losses to other Q^2s than it gained in wins; as far as I can
see a longer run would only make sense with a less aggressive main warrior,
or when there are fewer Q^2s on the hill.

The paper is also a close copy of existing code, in this case CCPaper:

len     EQU 9
fcp     EQU 3039
scp     EQU 2365
tcp     EQU 777

boot    spl 1,  <-3000 ; 9 processes together
        mov -1, 0
        mov -1, 0
        mov -1, 0

frog    spl @0,         <fcp-len
        mov }-1,        >-1
        spl @0,         <scp
        mov }-1,        >-1
        spl @0,         <tcp
        mov }-1,        >-1
        mov 2,  	      <-1
        jmp -1,         <-10

        dat <2667,      <2667*2

The idea of CCPaper is to make an aggressive replicator. Each Silk carries a
simple suicidal 
coreclear and as the battle progresses, more and more processes accumulate
in these clears. This 
gives very effective coverage of core, and also means that an enemy warrior
which manages to hop 
aboard the Silk replicator when it is over-written is not yet safe. Unless
it manages to subvert 
the mechanism very effectively and spread widely within core, it may still
be wiped by the other 
DAT clears. If it only establishes itself in a single clear then it will
eventually wipe itself.

Sad 1.0, my variant, makes two small modifications to this warrior. The
first is to cut the 
number of processes from 9 to 7 by adding a second MOV instruction to the
first stage replicator. 
This reduction in processes leads to a substantial increase in replication
rates, as less time is 
wasted by the subsequent stages copying trailing DATs. I have found that
this modification 
improves many published Silks.

The second modification is to begin the DAT carpet not on the replicator's
own code, but on that 
of an "uncle" - a paper from a previous generation. My argument for this
follows Beppe's 
reasoning that against scanners and SPL clears it pays to kill off older
copies in case they have 
been stunned. OTOH there is little point a replicator wiping itself because,
if it is still 
capable of wiping, it is probably not damaged.

There is something rather special about those step sizes, and I don't know
what. I have tried 
over 60 alternatives, hand-picked from amongst thousands of PMARS
simulations -- see Beppe's 
article in an early Corewarrior for the general approach. None were better
and most were clearly 
worse, so I will just give George's account of how he generated the numbers:

	well it's kind of a funny story ... if you look at frogz .. that's where
CCPaper 	
	originated ...

	Frogs is a simple paper that just happend to have the right step sizes ...
and 	
	believe me I chose those in random ...

The skill of "Just happening" to pick the right numbers is one I *want*.

The result is a very aggressive, fast-splitting replicator. It spends a
substantial effort on self destruction, hence the name, and this makes it
more vulnerable than most Silks. For example 
it sometimes loses to DAT bombers, and fairly frequently to incendiary
bombers (and vampires?). 
The compensation is that it achieves many more kills than most Silks,
especially against traditional scissors such as scanners and SPL clears.
This makes it particularly hard for P-spacers to handle as they are often
fooled into fielding the wrong warrior. 

The combination achieved pretty good scores against most warriors, with the
worst results coming against imp-heavy warriors that are usually too tough
to kill. I suspect that its recent slide has been due to an increase in the
population of Oneshots, as these stun quickly but, unlike single-process
scanners, are hard to kill by over-writing. 

There is a small mystery in the hill scores. I have resubmitted this code to
Pizza and it barely makes it onto the hill -- yet the original is still in
the top half. I know that the starting positions will have changed since I
first submitted, but a 15-point difference in scores is rather hard to
understand.

And the ;name? Spot the classic bug... I didn't.


;redcode-94 test
;name Benj's Revenge 1.0
;author Robert Macrae
;assert CORESIZE==8000
;strategy Q^2 (new), and Suicidal Paper

; Name obvious to those who know my son :-)
; (oops -- classic "Name" bug, but I like the new one too:)

        ORG start

; History
; 2.1   reverts to Probe attack.
; 2.6   puts gap after paper, before bomber.
; 2.9   2.6 is best yet, so drop to 44 scans.
; Time to stop fiddling!

; Q2NEW 
;       See q2table.pas for the code to get the table values.
;       These [9,5,13,1,2,17,16] give up to 28 distinct targets
;       with the greatest at only 34. Easier to use than Probe's,
;       as no references leak outside table.
;       Checked by exec k, exec k+1 and checking bomb fell on scan mark!
;       All the scans included as, depending on step, different ones
;       will need to be commented out to avoid self-scans.


; ----------------------------------------------
;-redcode-94 test
;-name Sad 1.0
;-author Robert Macrae
;-assert CORESIZE==8000
;-strategy Suicidal Paper

; 1.0  spends a lot of time bombing, often itself. This makes it
;      resistant to carpets and scanners, but it may lose to dwarves!
;      Constants straight from ccpaper.

len     EQU 9
fcp     EQU 3039
scp     EQU 2365
tcp     EQU 777

boot    spl 1,  >-3000    ; 7 processes replace 9 in CCPaper
        spl 1,  <-3200    ; for cost of extra Mov in launcher.
        mov -1, 0

frog    spl @0,         <fcp-len
        mov }-1,        >-1
        mov }-2,        >-2
        spl @0,         <scp
        mov }-1,        >-1
        spl @0,         <tcp
        mov }-1,        >-1
        mov 2,          <-fcp+len+1   ; Wipe uncle.
        jmp -1,         <-10
        dat <2667,      <2667*2
; ----------------------------------------------

for 21
   dat 0,0
rof

; ----------------------------------------------

QS      EQU 100              ; Illustration only!
QD      EQU 4000             ; Ditto.
QB      EQU (start+14*QS)    ; Ditto.
CR      EQU (fnd-which)
datz    EQU (table-3)

        dat     9*QS,  1*QS     ; can get 28 values from this table
table:  dat     5*QS,  2*QS     ;  
        dat    13*QS, 17*QS     ;  

P:      add.f  table,table  ; point into table. Nudge with }{>< and djn.f.
slow:   add.ab *P,fnd       ; adds an element A column (usually)       
fast:   add.b  @P,@-1       ; adds an element B column (usually)       

which:  sne.i  datz,@fnd    ; which half of scan hit?
        add.ab #QD,fnd

; ----------------------------------------------
; Original Probe attack

COUNT   EQU 6
GAP     EQU 15
REP     EQU 6

         mov.i  qbomb,@fnd
fnd:     mov.i  -GAP/2,@QB    ; picks up table as bomb...
         add.ba fnd,fnd
         mov.i  qbomb,*fnd
         add.f  qinc,fnd
         mov.i  qbomb,@fnd
         djn.b  -3,#REP
         jmp    boot,}-300

qbomb:   jmp    -200,GAP
qinc:    dat    GAP,-GAP


; ----------------------------------------------
;                  0/1 cycle 
; ----------------------------------------------

start:
        seq.i  QB+QS*0,QB+QS*0+QD
        jmp    which, 0                ; 0

        seq.i  QB+QS*2,QB+QS*2+QD
        jmp    fast, 0                 ; E
        seq.i  QB+QS*1,QB+QS*1+QD
        jmp    fast, <P                ; D
        seq.i  QB+QS*17,QB+QS*17+QD
        jmp    fast, >P                ; F

; ----------------------------------------------
;                   2 cycles
; ----------------------------------------------

        seq.i  QB+QS*7,QB+QS*7+QD
        jmp    slow, 0                 ; BE
        seq.i  QB+QS*6,QB+QS*6+QD
        jmp    slow, <P                ; BD
        seq.i  QB+QS*22,QB+QS*22+QD
        jmp    slow, >P                ; BF
        seq.i  QB+QS*11,QB+QS*11+QD
        jmp    slow, {P                ; AE
        seq.i  QB+QS*15,QB+QS*15+QD
        jmp    slow, }P                ; CE
        seq.i  QB+QS*10,QB+QS*10+QD
        djn.f  slow, P                 ; AD

        seq.i  QB+QS*5,QB+QS*5+QD
        jmp    >fast, 0                 ; B
        seq.i  QB+QS*9,QB+QS*9+QD
        jmp    >fast, {P                ; A
        seq.i  QB+QS*13,QB+QS*13+QD
        jmp    >fast, }P                ; C

; ----------------------------------------------
;                   3 cycles
; ----------------------------------------------

        seq.i  QB+QS*14,QB+QS*14+QD
        jmp    P, 0                     ; BBEE
        seq.i  QB+QS*8,QB+QS*8+QD
        jmp    P, <P                    ; BDE
;        seq.i  QB+QS*24,QB+QS*24+QD             ; KO to avoid self scan!
;        jmp    P, >P                    ; BEF   ; KO to avoid self scan!
        seq.i  QB+QS*12,QB+QS*12+QD
        jmp    P, {P                    ; ADE
        seq.i  QB+QS*32,QB+QS*32+QD
        jmp    P, }P                    ; CEF
        seq.i  QB+QS*20,QB+QS*20+QD
        djn.f  P, P                     ; AADD

        seq.i  QB+QS*4,QB+QS*4+QD
        jmp    }slow, 0                 ; EE
        seq.i  QB+QS*3,QB+QS*3+QD                  
        jmp    }slow, {P                ; DE
        seq.i  QB+QS*19,QB+QS*19+QD
        jmp    }slow, }P                ; FE
;        seq.i  QB+QS*2,QB+QS*2+QD               ; Duplicates a faster scan
;        djn.f  }slow, P                 ; DD    ; Duplicates a faster scan
         
;        seq.i  QB+QS*10,QB+QS*10+QD             ; Duplicates a faster scan
;        jmp    <fast, 0                ; BB     ; Duplicates a faster scan
        seq.i  QB+QS*18,QB+QS*18+QD
        djn.f  <fast, P                ; AA
         
        seq.i  QB+QS*36+CR,QB+QS*36+QD+CR         ; CR corrects for the gap
        jmp    }fast, 0                ; BBBBG    ; between fnd and which.
;        seq.i  QB+QS*26+CR,QB+QS*26+QD+CR
;        jmp    }fast, >P               ; BBG
;        seq.i  QB+QS*34+CR,QB+QS*34+QD+CR
;        jmp    }fast, {P               ; AAG
;        seq.i  QB+QS*42+CR,QB+QS*42+QD+CR
;        jmp    }fast, }P               ; CCG
;        seq.i  QB+QS*52+CR,QB+QS*52+QD+CR
;        djn.f  }fast, P                ; AAAAG
;        seq.i  QB+QS*16+CR,QB+QS*16+QD+CR
;        djn.f  }fast, }slow            ; G
         
        jmp    boot ; If you don't spot any, get sad ;-)

        end
______________________________________________________________________________
Questions?  Concerns?  Comments?  Complaints?  Mail them to people who care.
authors: Beppe Bezzi <bezzi@nemo.it> or Philip Kendall <pak21@ cam.ac.uk> or
Anton Marsden <amarsden@mcs.vuw.ac.nz> or Christian Schmidt <schmc003@goofy.zdv.
uni-mainz.de>
2002-2005 corewar.info. Logo C. Schmidt