Path: ibmpcug!wendy.ibmpcug.co.uk!pipex!swrinde!gatech!newsxfer.itd.umich.edu!newsrelay.iastate.edu!dunix.drake.edu!acad.drake.edu!pk6811s From: pk6811s@acad.drake.edu Newsgroups: rec.games.corewar Subject: Re: Scanner... Date: 11 Mar 95 21:34:09 CST Organization: Drake University, Des Moines, Iowa Lines: 152 Distribution: world Message-ID: <1995Mar11.213409@acad.drake.edu> References: <3jirar$nei@alpha.wright.edu> <1995Mar11.094023.2071@rhodes> NNTP-Posting-Host: acad.drake.edu In article <1995Mar11.094023.2071@rhodes>, graham@harlie.mathcs.rhodes.edu (Ran >... > OK, now the examples. You basic 88 code Quick scanner uses cmp/mov > combinations: > > > found dat #0, #0 > mov #-750, found > cmp -950, -1050 > mov #-950, found > cmp -1150, -1250 > mov #-1150, found > test jmz moveme, found > Close. More acurately it should be: found dat #0, #0 mov #-750, found <- not sure what this is?? cmp -950, -1050 <- start scanning here mov #-950-found-1, found cmp -1150, -1250 mov #-1150-found-1, found test jmz moveme, found <- test found after some scans Attached is QuickFreeze, the original '88 qscanner. It uses named offsets to compute the scan locations but is basically the same idea as above. Under '94 rules using sne/seq/mov you don't scan faster, but you do it with less code so that would be preferred. On the other hand, Randy's dat-scanner has the advantage of placing the scanning code far away from the scan pointers so is less likely to be hurt by another scanner in the early moments. Paul Kline pk6811s@acad.drake.edu ;redcode quiet ;name QuickFreeze v1.5 ;kill QuickFreeze ;author P.Kline ;contact pk6811s@acad.drake.edu ;strategy faster-than-c scan finds large opponents fast ;strategy also anti-imp paper and anti-vamp csize equ -400 cmpsp equ (csize/35)/4-1 ; scan every 2*cmpsp locations cmpdif equ -1/2+1 ; cmp N and N+cmpdif+1 cmpstrt equ start+100+cmpsp ; start scanning at cmpstrt boffset equ 5 ; adjust for bombing bspl dat <-40,#(3+cmpdif) ; bomb stms spl 1,cmpsp spl 1,cmpdif mov -1,0 p1s mov p1b,<1000 p1 mov #7,p1s ; 7-process paper mov