;redcode-94 ;name Last Laugh ;author Robert Macrae ;strategy Quickvamp + Tiny Vamp with Core-clearing, Brain-washing Trap. ;strategy -- Hope that, once I win, I win for good! ;assert CORESIZE == 8000 ; Very tricky round, because the situation is so knife-edged and ; unfamiliar. There should be a huge disparity in scores... :-| ; If I'm losing, I launch a small vampire. ; If I'm winning, I try a small quickvamp first. ; Hope I haven't missed a killer strategy... STEP equ 1364 ; Sensible mod-4 step? Also 868, 652, 204, 212. MSTEP equ 3240 ; Approximately 2/5 way round core, and 2/7 _RESULT equ #0 ; through bombing pattern... _BOOT equ #419 base equ start+4000 start i for 24 ; 168 nop 1,1 ; 7 is unlikely scan separation... nop 1,>1 ; (of course, who'd scan? Bow tie?) nop 1,<1 nop 1,}1 ; and I don't have a djn trail... nop 1,{1 nop 1,@1 nop 1,*1 rof vamp mov bite, @bite ; Minimal vampire add split-boot+vamp+4, bite jmp -2, >-20 bite jmp trap-boot+vamp+4, 0 ; Fang ; Have to launch fang, sadly, to permute bombing... ; Separate by a multiple of 4... Total is 44. nop 1,>1 nop 1,<1 for 6 nop 1,1 nop 1,>1 nop 1,<1 nop 1,}1 nop 1,{1 nop 1,@1 nop 1,*1 rof trap mov 5, 0, #1 ; Stores 0 through P-Space jmp trap, 4 ; Will be over-written... for 4 dat <2667, 0 ; Coreclear rof ; Separate by a multiple of 4... Total is 36. nop 1,>1 for 5 nop 1,1 ; 7 is unlikely scan separation... nop 1,>1 ; Dec if QV gets lucky? nop 1,<1 nop 1,}1 nop 1,{1 nop 1,@1 nop 1,*1 rof boot ldp _BOOT, #0 ; Calculate boot offset result ldp _RESULT, #0 jmn.b quickv, result ; If I lost, drop quickvamp. launch seq.b result, #1 ; If I won, don't nudge vampire. nudge add.ab #MSTEP, boot mov.ba boot, store store stp #0, _BOOT ; complete book-keeping. sub.ba boot, vamp+1 ; Correct pointer to step sub.ba boot, bite ; Correct fang mov bite, 1 nop 1,<1 nop 1,}1 nop 1,{1 nop 1,@1 nop 1,*1 rof end boot