From news-rocq.inria.fr!jussieu.fr!oleane!plug.news.pipex.net!pipex!weld.news.pipex.net!pipex!tank.news.pipex.net!pipex!newsfeed.internetmci.com!in2.uu.net!mozz.unh.edu!hopper.unh.edu!cpa Wed Feb 21 18:50:10 1996 Article: 3952 of rec.games.corewar Path: news-rocq.inria.fr!jussieu.fr!oleane!plug.news.pipex.net!pipex!weld.news.pipex.net!pipex!tank.news.pipex.net!pipex!newsfeed.internetmci.com!in2.uu.net!mozz.unh.edu!hopper.unh.edu!cpa From: Chris Arguin Newsgroups: rec.games.corewar Subject: CounterMeasures Date: Wed, 21 Feb 1996 12:11:16 -0500 Organization: University of New Hampshire - Durham, NH Lines: 73 Message-ID: NNTP-Posting-Host: hopper.unh.edu Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII The following is obviously beginner's code. I'm posting it because A) It's the best I've got B) If anybody could show me some obvious mistakes or foolish concepts (ie, these 10 instructions could be done in 1 instruction), I would appreciate it. This warrior has change a lot, mostly in the first bombing run. It is currently running on the Experimental 94 hill, but I don't guarentee that the code is exactly the smae. ;redcode-b ;name CounterMeasures V4 ;strategy A quick SPL/DAT clearer ;strategy V2 - Added a algorithm to disperse a salvo of bombs first ;strategy V3 - Improved attack against paper ;strategy V3.3 - Modified bomb + first-pass coreclear ;strategy V3.7 - Fixed a really stupid mistake :) ;strategy V4 - Found better constants... ;author Chris Arguin ;assert CORESIZE==8000 ;Inc = 1601, 1569 1;8;1 ;Inc = 5091, 5000 4;4;2 INCSIZE equ 5091 BOMBSDROP equ 5000 STARTDROP equ fini+1 PROGSIZE equ fini-bomb org disp bomb dat.a #MINDISTANCE, #BOMBSDROP ; Init bombs throw stun spl.a 0, #STARTDROP ; Init stunner disp mov.i stun, *bomb ; Drop first bomb add.a #INCSIZE, bomb ; Add increment djn disp, bomb ; Loop till done mov.a #-1, bomb ; Re-Init for clear mov.ab #(CORESIZE-PROGSIZE-200), bomb ; Set ending mov.i bomb, stun ; Set Stun->Kill mov.ab #STARTDROP+CURLINE, stun ; Reset it clr mov.i bomb, {bomb ; Drop first clear mov.i stun, >stun ; Drop first Stun jumper djn clr, bomb ; Continue till done mov.ab #STARTDROP+CURLINE, stun ; Reset Starting Dist. mov.a #-1, bomb ; Re-Init for clear mov.ab #(CORESIZE-PROGSIZE-200), bomb ; Re-Set ending spl fini, -- Chris Arguin | "...All we had were Zeros and Ones -- And cpa@hopper.unh.edu | sometimes we didn't even have Ones." +--------------+ - Dilbert, by Scott Adams http://leonardo.sr.unh.edu/arguin/home.html |