From news-rocq!jussieu.fr!fr.usenet-edu.net!usenet-edu.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!sjc-peer.news.verio.net!phl-feed.news.verio.net!news.verio.net!news.ttsg.com!ayanthegreat@crosswinds.net Thu Mar 22 14:12:00 2001 Article: 12401 of rec.games.corewar Path: news-rocq!jussieu.fr!fr.usenet-edu.net!usenet-edu.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!sjc-peer.news.verio.net!phl-feed.news.verio.net!news.verio.net!news.ttsg.com!ayanthegreat@crosswinds.net From: Ayan Chakrabarti Newsgroups: rec.games.corewar Subject: Warrior Improvement Date: 21 Mar 2001 15:30:13 -0500 Organization: TTSG Lines: 105 Distribution: world Message-ID: <5.0.2.1.2.20010321190330.00a24050@pop.crosswinds.net> Reply-To: ayanthegreat@crosswinds.net NNTP-Posting-Host: odin.ttsg.com X-Trace: odin.ttsg.com 985206613 24691 216.231.111.29 (21 Mar 2001 20:30:13 GMT) X-Complaints-To: abuse@news.ttsg.com NNTP-Posting-Date: 21 Mar 2001 20:30:13 GMT Originator: corewar-l@koth.org X-Mailer: QUALCOMM Windows Eudora Version 5.0.2 Xref: news-rocq rec.games.corewar:12401 Hi, I've been trying to make a scanning vampire called Mohini for quite some time now and I seem to have hit a brick wall in terms of improving it. So I'm posting the source code here. I would greatly appreciate it if somebody gave me directions on improving it. Please tell me whether I should work on optimizing my step size or if there is something else that I am not doing right or if the flaw is in the basic strategy itself. Mohini is basically a scanner which lays down a carpet of traps as it scans. Whenever it finds anything, it just changes the destination where the carpet is being laid (after having made appropriate changes to the trap). If a process is captured, it switches from scanning to a core-clear. I've been trying to optimize this thing for a long time. It does especially badly against scanners (as far as I could make out from the Wilkies scores). Any further improvements that I try to make seem to backfire (something like a rain dance causing an earthquake ;) like trying to make captured processes implement a gate. Again, I would be very grateful for any suggestions (including criticisms). ;redcode ;name Mohini ;author Ayan Chakrabarti ;strategy Scan + Vamp -> Clear ;strategy Captured processes stunned. ;assert CORESIZE == 8000 ;Wilkies Points = 122.92 init equ kill+100 inscan equ kill+2*step step equ 1226 ;--- Scan kill mov.i trap,>ptr add.f stinc,trap check jmz.f kill,@trap mov.b trap,ptr sub.ab #1,ptr mov.a #pit-trap,trap sub.ba trap,trap jmp kill,<-400 stinc dat #-1,#step ;------ for 3 dat 0 rof ;------ ;--- Clear (something captured) ptr2 dat 0,pit-ptr2 dat 0,pit-ptr2 dat -10,pit-ptr2 dat -10,pit-ptr2 done spl #4000,pit-ptr2 mov.i @2,>ptr2 mov.i @1,>ptr2 djn.b -2,{done dat 0,0 dat 0,0 ;--- The trap which doubles up as scanning pointer. trap jmp pit-init,inscan ;--- The pointer at which traps are being dropped. Also used to switch ; from scan to clear ptr jmp done-check,init ;------ for 9 dat 0 rof ;------ ;--- The pit pit mov ptr,check ; Process captured. Switch to clear. i for 9 spl #0 rof jmp -9 ;--- The end :) end check --------------- Ayan Chakrabarti " A bird in the hand is better than two overhead "