Newsgroups: rec.games.corewar From: Robert@buchanan.demon.co.uk (Robert Macrae) Path: ibmpcug!wendy.ibmpcug.co.uk!pipex!peernews.demon.co.uk!buchanan.demon.co.uk!Robert Subject: Queasy 1.4 Organization: Buchanan Partners Limited Reply-To: Robert@buchanan.demon.co.uk X-Newsreader: Demon Internet Simple News v1.29 Lines: 134 X-Posting-Host: buchanan.demon.co.uk Date: Wed, 5 Apr 1995 19:12:46 +0000 Message-ID: <797109166snz@buchanan.demon.co.uk> Sender: usenet@demon.co.uk Here is the code for Queasy 1.4, my quickscan -> bomber. Its based on Michael Constant's Sauron_T, though my development has taken it in much the same direction as Pyramid. (BTW what happened to Pyramid? I can't see much this does that it doesn't?) I initially developed and tested the code against the warriors from the '93 and '94 tournament files, and the bombing pattern was chosen to disrupt the big imp launchers like Sphinx, though it works when any warrior remains close to a decoy. I carpet the whole area any hit, since the target is unlikely to be chaff so early in the battle. I use a vampiric attack, indirected via a pointer so that Silk-like papers don't trash the trap with indirect bombing. (Maybe SPL-JMP bombs would be less hastle:) Ideally I'd like to bomb outwards from the hit in both directions, but I doubt its worth the extra code so I settled on the asymmetric pattern as a compromise. In return for not biting +50 to +100 at all, I hit -100 to +50 24 cycles earlier and against other quickscanners thats a big gain. The only possibly novel bit of the QS is the loop for determining which of the 4 comparison addresses is the hit. It saves space over a tree search, and more scans => better against small opponents. Its also a fraction faster on average. Once the QS is finished I launch Modron, a 4-word, mod-1 dwarf. This looks fairly conventional, but decrements the step every time round the loop. Step size is carefully chosen (OK, I wrote a state machine to do a blind search) so that 1) It eventually hits most locations 2) initial coverage is reasonable and 3) there exist suitable holes for Modron and the trap to live. Note I have to forgo a DJN stream because any lost processes would disrupt the pattern... Modron itself made it onto the hill scoring 115, not bad on a per-word basis. It was then kicked off after only 101 minutes which I thought abrupt to the point of cruelty, Randy! ;redcode-94 ;kill Queasy ;name Queasy 1.4 ;author Robert Macrae ;strategy Quick-scan -> mod-1 bomber. ;strategy Faster trap, new constants, indirect bites. ;assert CORESIZE == 8000 STP equ 81 ; QS step size. Lookat equ look+237+8*(qscan-1)*STP ; Repeated part of qscan expression. traptr dat #0, #trap ; Points to trap bite jmp @traptr, 0 ; Vampire bite, indirect via traptr ; If I bite, there will be lots of pointers to these, so I keep them away ; from the trap to protect it against indirect bombers. look qscan for 6 sne.i Lookat+0*STP, Lookat+2*STP seq.i Lookat+4*STP, Lookat+6*STP mov.ab #Lookat-bite-2*STP, @bite rof jmn test+1, bite ; Save lots of cycles qscan for 6 sne.i Lookat+48*STP, Lookat+50*STP seq.i Lookat+52*STP, Lookat+54*STP mov.ab #Lookat-bite+46*STP, @bite rof jmn test+1, bite ; Save a few cycles qscan for 6 sne.i Lookat+1*STP, Lookat+3*STP seq.i Lookat+5*STP, Lookat+7*STP mov.ab #Lookat-bite-STP, @bite rof jmn test+1, bite ; Well... qscan for 6 sne.i Lookat+49*STP, Lookat+51*STP seq.i Lookat+53*STP, Lookat+55*STP mov.ab #Lookat-bite+47*STP, @bite rof ; Intention is to place points evenly through core. The ordering ; I use means 1) initial compares are >100 apart for maximum ; efficiency against long opponents, and 2) each block of 4 are evenly ; spaced, for ease of identification in the test loop. test jmz.b blind, bite ; If no address stored, no hit. add #STP*2, bite ; Loop through possible hits jmz.f -1, @bite ; to find the nonzero element. mov modron, @bite ; Quick SPL 0 pre-bomb... add #49, bite ; Aim 49 past the hit attack sub.ba bite, bite ; loop mov bite, @bite ; Vampire step over target at add.f step, bite ; 6 locations / 3 cycles so djn loop, #24 ; space=6 => 72 cycles, 144 locs. ; Tried to bite all over the target if found; now launch dwarf. blind mov modron+3, trap+2499+3 ; Launch Modron. mov {blind, -200 ; Lackadaisical attempt at gates... spl -1, >-200+2667 ; Each should increment many times jmp -2, >-200+2*2667 ; between imp steps, but then _whole_ ; imp moves! Blows away rings. ; Hope is to out-split silks if I hit them early enough. This arangement ; gives good split rate in 3 words, carefully hidden so Modron doesn't bomb ; it for 50K cycles. step dat #6, #-6 ; QS step size. modron spl #1469, >-155 ; Mod 5 > attack and Mod 1 bomb. add.x -1, 1 ; >-155 will gate if loop is DAT-bombed. mov.i }2, -3109-2 ; Offset misses dwarf, trap (for 50K). jmp -2, {-3 ; Decrements step for Mod-1 bombing. ; Modron uses an decrementing step to cover most of the core with DAT bombs, ; while using a regular mod-5 } attack. (Looking at the code now, { might ; be better since it pinkens bombs -- hmmm...) It loses to imps or papers ; unless the quickscan really hurt them, but does OK against most others. end look