From rmorganl@fred.fhcrc.org Sun Apr 20 23:10:13 1997 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by tobago.inria.fr (8.6.10/8.6.6) with ESMTP id XAA20330 for ; Sun, 20 Apr 1997 23:10:12 +0200 Received: from bug1.fhcrc.org (bug1.fhcrc.org [140.107.10.110]) by nez-perce.inria.fr (8.7.6/8.7.3) with ESMTP id XAA20857 for ; Sun, 20 Apr 1997 23:10:10 +0200 (MET DST) Received: from port03-rem.fhcrc.org (port03-rem [140.107.12.33]) by bug1.fhcrc.org (8.8.5/8.8.5) with SMTP id OAA04323 for ; Sun, 20 Apr 1997 14:09:53 -0700 (PDT) Message-Id: <199704202109.OAA04323@bug1.fhcrc.org> Comments: Authenticated sender is From: "Ross Morgan-Linial" Organization: very little To: Damien.Doligez@inria.fr Date: Sat, 19 Apr 1997 13:06:05 -0800 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Warrior Priority: normal X-mailer: Pegasus Mail for Windows (v2.42a) Status: R Well, I seem to be out of Core Wars for a while, so I figured I'd send you a warrior you don't have... ---- 8< ---- ;redcode-94 ;name Versatility 1.7 ;author Ross Morgan-Linial ;assert CORESIZE==8000 ;strategy brainwash-resistant table-based ;strategy pspacer with a scanner from Chameleon, a ;strategy paper from Grilled Octopus and tornado 3.0 ;strategy ;strategy version 1.6: ;strategy Shaved a few instructions & cycles off switcher ;straregy Compacted table. A _LOT_. ;kill Versatility ;show source ;show off ; scanner, stolen from Chameleon dist EQU 66 spread EQU dist*2 stun spl #spread, spread w2 top add stun, scan ;start here scan cmp dist+top, top slt.ab #100, scan djn.f top, <5100 mov sjump, @scan mov stun, w1/zero-wash on loss ; If we were brainwashed with zero, and lost, we will use w1, but we will still ; act brainwashed next round. Oh well. That's optimization for you. ; If, for some strange reason, we _didn't_ lose after being brainwashed ; (such as if the brainwash really occured the round before), we will ; recover somewhat gracefully, going to w1 on a win and w3 on a tie. ; This strange reaction shaves a full cycle off of our thinking time, which ; was used to check for a brainwash with zero. ;this table has been compacted severely table DAT #toffs+3, #w1 ;w3->w1 on loss ;zero-wash->w1 on win DAT #toffs+0, #w3 ;w3->w3 on win ;zero-wash->w3 on tie ;w2->w3 on loss DAT #toffs+1, #w2 ;w3->w2 on tie ;w2->w2 on win DAT #toffs+1, #w2 ;w2->w2 on tie ;w1->w2 on loss fsttab DAT #toffs+3, #w1 ;w1->w1 on win ;this is used for the first ;round and when brainwashed endtab DAT #toffs+1, #w2 ;w1->w2 on tie ;w1, w2, and w3 (boot points) go here ;show off ;paper module, stolen from Grilled Octopus ;non-booted (of course) dest0 equ 2200 dest1 equ 3740 dest2 equ -1278 ; pmars optimized range equ 933 ; pmars optimized w3 paper SPL.B 1, #0 ;\ SPL.B 1, #0 ;-> generate 8 processes SPL.B 1, #0 ;/ silk SPL.B @0, {dest0 MOV.I }-1, >-1 silk1 SPL.B @0, -1 MOV.I ibomb, }range MOV.I {silk1, dest2 ibomb DAT.F <2667, <5334 ;tornado, stolen from Armory-A5 dms equ 25 dmd equ -2500 step equ -45 djnoff equ -2205 bootd equ 2000 B equ 24 ;boot (mine) dta dat gate, gate+bootd w1 mov }dta, >dta djn -1, #8 add.ab #B, dta mov }dta, >dta djn -1, #9 jmp bombs+bootd+B gate dat -100, 100 dat <-10, <2667 ;anti imp bit dat -4000, djmp-gate+2 stclr spl #-3000, djmp-gate+2 tclear mov @djmp, >gate mov @djmp, >gate djmp djn.b clear, {stclr dat 0,0 dat 0,0 bombs spl #step, -step ;hit spl start1 sub incr, @b1 stone mov (0*step)+jump2,*(1*step)+jump2 b2 mov bombs, @stone b1 mov bombm, *stone jump2 djn.f start1, -3*step,>-3*step last bombm mov {step, 1 end start ------------------------------- Antimatter * rmorganl@fhcrc.org You have the power of negation.