Path: ibmpcug!penny.ibmpcug.co.uk!pipex!howland.reston.ans.net!math.ohio-state.edu!jussieu.fr!univ-lyon1.fr!cri.ens-lyon.fr!news.imag.fr!news!han From: han@imag.fr (Jay "Thierry" Han) Newsgroups: rec.games.corewar Subject: About scanners Date: 03 Mar 1995 10:15:35 GMT Organization: Byll-IMAG/Systemes Lines: 114 Distribution: world Message-ID: NNTP-Posting-Host: uvea.imag.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit As a followup to Randy's post, here's a warrior I submitted to the Hill about a year ago. It stayed there for a little while, but never made it in the top10 and dropped off eventually. The basic scanner is the same as Randy's except I use a "scantab" line to check for the end of the scan. Also, it uses pMars constants like MINDISTANCE and MAXLENGTH to compute an "optimal" scanning run. When something is found, I set up a trap at the lower end of the range and vampirize every "j" instructions from there up to the upper end of the range. The trap itself is simply a SPL-carpet layer, sort of. After that, I set up a perpetual forward core-clear *after* the trap and jump there. The thing that wins is that this setup makes the opponent "marinate" in the trap for a long time before I go and kill it. If nothing's found in the scan, then I jump to "boot", which boots off a simple imp-spiral/stone. The constants are set up so that I scan approx. every 100 instructions. By making "n" larger you could make it scan tighter than that, at the expense of startup time of course, which is critical for the stone to work well. ;redcode-94 ;assert CORESIZE==8000 && MAXLENGTH==100 ;name Fscan ;author Jay Han ;kill Fscan org entry j equ 6 n equ 38 s equ (((CORESIZE-(2*MINDISTANCE)-MAXLENGTH)*2)/((2*n)+1)) q equ (s/2) h equ (q/2) a equ (head-MINDISTANCE) l equ (q+MAXLENGTH) k equ (l/j+1) dat0 equ head-1 head entry scan sne.i *fscan, @fscan djn.f scan, scan jmz.a boot, @scan add.f scan, test test add.b scan, #scan sne.i dat0, @test sub.ab #q, test add.b test, bite mov.i vamp, >bite mov.i mega, >bite add.b bite, ptr stun mov.i bite, @bite add.f vamp, bite djn.b stun, #k copy mov.i >ptrcclear, -j vamp spl.b #j, <-j bite jmp.b -2, #test+q scantab dat.f 0, scan m for n dat.f a-(m*s), a-(m*s)+q rof fscan equ scantab+n-1 p2 equ -73+(972*s2) s2 equ -74 p1 equ 75+(972*s1) s1 equ 74 cast mov.i =- han@imag.fr Bull-IMAG/Systemes. 2, av. Vignate. ZI Mayencin II, 38610 Gieres. Tel: +33 76.63.48.41. Fax: 76.54.76.15. Perso: 61, rue Thiers. 38000 Grenoble. 76.46.11.26.