;redcode-94 ;assert CORESIZE==8000 ;name Sunset ;author David Moore ;strategy P^3 ;strategy Recon 2 or paper + stone ;--------- ; Recon 2 ;--------- ; Recon 2 looks at pairs of cells that are 6 apart. ; When something is found, it gets wiped with 14 SPLs like this: ; ..X.....X..... ; distance between scanned pairs: rStep equ 6557 ; overcomes 3, 7, 9, and 11 point imps ; 6557 * 231 = 2667 (2667 * 3 = 1) ; 6557 * 99 = 1143 (1143 * 7 = 1) ; 6557 * 77 = 889 ( 889 * 9 = 1) ; 6557 * 63 = 5091 (5091 * 11 = 1) ; use different boot locations to throw off one-shot scanners rPlaceA equ 1282 rPlaceB equ 6800 rDestB nop (rPlaceB - rPlaceA), (rPlaceB-rPlaceA) reconB add.f rDestB, rDest ; boot to location B reconA mov rEnd, rPtr ; hit 'em with SPLs rW2 mov *rWipe, >rPtr ; later, this becomes a DAT clear djn.a rWipe, rLength rLoop sub rDiff, @rS2 rScan sne rStep-1, rStep-7 ; check a pair sub rDiff, rScan rS2 seq *rScan, @rScan ; check another pair slt.a #20, rScan ; ignore self rTimer djn rLoop, #4800 ; count down to DAT phase rLength sub.ba #0, #-7 ; set up for SPL wipe rTweak mov.ab @rS2, @rWipe rT2 jmn *rW2, rTimer ; when timer expires, rEnd djn.a 1 ; This replicator fills the core with code that can't be run ; by other replicators. pNext spl 4200, {pThis mov }pThis, }pNext mov pDat, >5200 pThis mov pNext+6, }pNext jmz.f pNext, *pThis pDat dat <2667, <5334 ;;; dat 0, 0 ; dat 0,0 must be there after boot placeS equ 5300 ; stone boot location placeP equ (placeS + 223) ; paper boot location paper mov >pSrcS, >pDestS spl 2, >3988 spl 1, >4191 pSrcP spl 1, pNext+6 mov >pSrcS, >pDestS mov pDestS ; to work properly pDestP djn paper+placeP+6, #paper+placeS ; the paper needs 6 end think