From news-rocq.inria.fr!jussieu.fr!math.ohio-state.edu!cs.utexas.edu!news.sprintlink.net!news-peer.sprintlink.net!uunet!in3.uu.net!news.new-york.net!news.stormking.com!iltzu@sci.fi Mon Oct 21 11:30:37 1996 Article: 6308 of rec.games.corewar Path: news-rocq.inria.fr!jussieu.fr!math.ohio-state.edu!cs.utexas.edu!news.sprintlink.net!news-peer.sprintlink.net!uunet!in3.uu.net!news.new-york.net!news.stormking.com!iltzu@sci.fi From: iltzu@sci.fi (Ilmari Karonen) Newsgroups: rec.games.corewar Subject: Sandstorm Q/0.4 Date: 20 Oct 1996 23:05:51 -0400 Organization: Storm King Ind. Inc. Lines: 176 Sender: server@news.stormking.com Distribution: world Message-ID: <21199615.Amiga@sci.fi> Reply-To: iltzu@sci.fi NNTP-Posting-Host: valhalla.stormking.com Originator: corewar-l@stormking.com X-Mailer: Air Mail V2.0 (Unregistered) -- Amiga Mailer by Danny Y. Wong Well, since it fell off the hill at the venerable age of 2, here's Sandstorm 0.4. Any suggestions on improving it are welcome. Maybe I should try adding some imps? There was recently some discussion about how fast a stone can be. While the theoretical maximum speed for "true" bombing may be .75c, lot higher speeds can be achieved if decrements are considered bombs; one MOV can modify 3 locations, so an unrolled MOV/ADD loop would be 1.5c. Sandstorm was originally designed as a p-component against scanners, and uses increments to color the core at .8c. The way it switches to the clear is quite interesting. It bombs itself, moving the instruction pointed to by the a-field of hit1 (incr) to the instruction pointed to by the b-field of hit2. The b-field of hit2 is 0, so the SPL lands on the jump line, letting the processes fall through to the clear. The pit I used for the qscan has a backwards running djn-stream. Sandstorm should be immune to it, but it makes the pit suicide just in case I never switch to d-clear for some reason. The constant away has been carefully selected to avoid damaging the pit. This isn't the one I really used, but it should work. ;redcode-94 ;name Sandstorm Q/0.4 ;version 0.4 ;kill Sandstorm ;author Ilmari Karonen ;strategy A fast stone with qscan. ;strategy Justin: I used this name first =) ;strategy Submitted: @date@ ;comments 0.8c in empty core, 1.2c with indirection ;comments Probe qscan is really HAIRY! I hope I got it working.. ;history 0.1 - Works. ;history 0.2 - Added boot & decoy. ;history 0.3 - Added qscan from Probe by Anton Marsden. ;history 0.4 - Qscan throws vamp fangs - better? ;date October 14, 1996 ;planar quick, scan, vamp, stun, pspace, boot, stone, clear ;assert CORESIZE == 8000 step equ 3288 ; mod-8 (2 runs offset by 4) cptr equ incr cend equ (clear+10) away equ (qpit+5704) ; be careful with this! org start QB equ (start+400) QS equ 200 QD equ 100 COUNT equ 6 GAP equ ((start+1)-(tab-1)) ; 15 REP equ 6 dat 10*QS, 2*QS ; can get 21 values from this table table: dat 4*QS, 1*QS ; and can also use the initial value dat 23*QS, 3*QS ; of fnd qpit spl qpit, #2 spl qpit, #-2 stp.b <0, #20 djn.f qpit, -GAP ; * The a-field MUST point to start+1! * tab: add.a table,table slow: add.ab @tab,fnd fast: add.b *tab,@slow which: sne.i datz,@fnd add.ab #QD,fnd sub.ba fnd, qbomb mov.i qbomb,@fnd add.ba fnd,fnd qloop: mov.i qbm2,*fnd sub.f qinc,fnd mov.i qbm3,@fnd djn.b qloop,#REP jmp boot,}-300 start: seq.i QB+QS*0,QB+QS*0+QD jmp which,}QS*13 ; qinc+GAP seq.i QB+QS*1,QB+QS*1+QD jmp fast,}QB+QS*1+QD/2 seq.i QB+QS*2,QB+QS*2+QD jmp fast,{tab seq.i QB+QS*3,QB+QS*3+QD jmp fast,}tab seq.i QB+QS*13,QB+QS*13+QD jmp fast,{fast ; !!! seq.i QB+QS*4,QB+QS*4+QD jmp >fast,}QB+QS*4+QD/2 seq.i QB+QS*5,QB+QS*5+QD jmp slow,}QB+QS*5+QD/2 seq.i QB+QS*6,QB+QS*6+QD jmp slow,{tab seq.i QB+QS*7,QB+QS*7+QD jmp slow,}tab seq.i QB+QS*10,QB+QS*10+QD jmp >fast,fast,>tab seq.i QB+QS*24,QB+QS*24+QD jmp slow,>tab seq.i QB+QS*17,QB+QS*17+QD jmp slow,{fast ; !!! seq.i QB+QS*8,QB+QS*8+QD jmp tab seq.i QB+QS*28,QB+QS*28+QD jmp tab,>tab seq.i QB+QS*30,QB+QS*30+QD jmp tab,}tab ; *** Sandstorm boot z for 11 mov.i hit2 add.f incr, b2 b2 mov.i }hit1+step, >hit2+step hit2 jmz.b hit1, #0 ; hit (spl) cloop mov.i clear, >cptr ; d-clear mov.i clear, >cptr djn.f cloop, >cptr dat.f <2667, cend-cptr ; hit (incr) clear dat.f <2667, cend-cptr ; just for djn protection datz z for (MAXLENGTH-CURLINE) dat 0, 0 rof end -- Ilmari Karonen