From news-rocq.inria.fr!jussieu.fr!news.sri.ucl.ac.be!news.belnet.be!news.rediris.es!scsing.switch.ch!swidir.switch.ch!in2p3.fr!oleane!tank.news.pipex.net!pipex!howland.reston.ans.net!ix.netcom.com!netcom.com!akemi Tue Mar 5 14:40:29 1996 Article: 4172 of rec.games.corewar Newsgroups: rec.games.corewar Path: news-rocq.inria.fr!jussieu.fr!news.sri.ucl.ac.be!news.belnet.be!news.rediris.es!scsing.switch.ch!swidir.switch.ch!in2p3.fr!oleane!tank.news.pipex.net!pipex!howland.reston.ans.net!ix.netcom.com!netcom.com!akemi From: akemi@netcom.com (David Boeren) Subject: Re: Pensive v0.1 Message-ID: Organization: NETCOM On-line Communication Services (408 261-4700 guest) X-Newsreader: TIN [version 1.2 PL1] References: <4hfous$7ng@info-server.surrey.ac.uk> Date: Tue, 5 Mar 1996 02:40:00 GMT Lines: 81 Sender: akemi@netcom3.netcom.com X I M Oversby (ee31io@surrey.ac.uk) wrote: : ;redcode-b quiet : ;name Pensive v0.1 : ;author Ian Oversby : ;strategy v0.1 Anti-scanner : ;assert 1 : : stun SPL.B #-3044, #3044 : loop ADD.F stun, 1 : MOV.I <101, 2 : MOV.I stun, >-3000 : DJN.F loop, <-100 : MOV.I 1, {loop : The above code should ideally place a SPL on the DJN line to start a coreclear : but it doesn't although it sort of core clears anyway. It doesn't contain a : boot or decoy because it isn't yet finished. Still, any suggestions for : improvements will be appreciated. The reason you don't drop a SPL on your DJN line is that after 4633 cycles you drop a DAT 0,0 on top of your SPL while executing the MOV <101,2 line. Of course, by that time, the 2 is a -2. I think that you might eventually drop the SPL on your DJN, except that your bombing step is MOD-4. That means that your bombing run will hit every 4th instruction. Looking at your code, the SPL is 4 instructions above the DJN, so we can tell that it will be hit too. The only question is, which gets hit first? By luck, your SPL gets hit first. I think that your easiest choices are to either try other mod-4 steps until you find one that hits the DJN first, or just change to a mod-5 step, which is probably easier and more effective anyway. I'd suggest using the corestep utility to help select and test your steps, it's a very useful program. Now, even if you switch to mod-5, we still don't know for SURE that your code will work. Let me try it and see... Hmm. I replaced your step with 95, which is mod-5. Now you do a MOV on top of your DJN, but you aren't MOV'ing a SPL. You spend most of the bombing throwing random core around, but at that one point you want to throw the SPL. So, let me replace your MOV's A-field and try that... Alright, now in order to MOV the SPL, the A-field of your MOV has to point to the SPL, right? But you probably don't want to have direct addressing, then you'd lose your decrement. So, I'm going to change your indirect addressing to A-indirect, and point through one of your instructions that already points to "stun". The new code looks like this: ;redcode-b ;name Pensive v0.2 ;author Ian Oversby ;strategy v0.1 Anti-scanner ;strategy v0.2 Fixed bugs ;assert 1 org loop stun SPL.B #-95, #95 loop ADD.F stun, 1 MOV.I }-1, 2 MOV.I stun, >-3000 DJN.F loop, <-100 MOV.I 1, {loop end Notice that I chose to use }-1 for the MOV, but you can also have used }1 instead since both point to "stun". Since this particular step happens to drop a SPL on the line before "stun" prior to dropping it on your DJN, you can also use pre-decrement indirect instead of post-increment, but this may not hold true for all mod-5 steps. If you wish to use B-field indirect, you should be able to use <3 since decrementing the "loop" in the B-field of your MOV 1, {loop will make it point to the SPL also. It's all up to your preferences... The pseudo-coreclear effect you saw before is due to your MOV stun, >-3000 line, which is coreclearish. However, clearing with SPLs won't help you win too many rounds :) If you have any further questions or need me to explain anything, feel free to post here or email, ok?