From news-rocq.inria.fr!univ-lyon1.fr!in2p3.fr!oleane!plug.news.pipex.net!pipex!tank.news.pipex.net!pipex!dispatch.news.demon.net!demon!sunsite.doc.ic.ac.uk!info-server.surrey.ac.uk!usenet Wed Apr 17 11:26:17 1996 Article: 4795 of rec.games.corewar Path: news-rocq.inria.fr!univ-lyon1.fr!in2p3.fr!oleane!plug.news.pipex.net!pipex!tank.news.pipex.net!pipex!dispatch.news.demon.net!demon!sunsite.doc.ic.ac.uk!info-server.surrey.ac.uk!usenet From: Ian Oversby Newsgroups: rec.games.corewar Subject: Wind-up Toy v0.4 Date: Tue, 16 Apr 1996 19:01:28 +0100 Organization: University of Surrey, Guildford, England Lines: 142 Message-ID: <3173E078.647A@surrey.ac.uk> NNTP-Posting-Host: duck4.ee.surrey.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.01 (X11; I; SunOS 5.4 sun4m) I think that this is the code for Wind-up Toy v0.4 as appeared on the standard 94 hill for about 60 challenges. I seem to recall the original performing very well against Memories which this doesn't do, don't know why. Maybe I introduced a p-code bug. Anyway, the basic idea is to try three different strategies sequentially. The dodger kills stones, the stone kills scanners and the last one kills everything else hopefully. If I am losing too much with the current one, I move to the next one. I eventually finish with a good all-rounder (I hoped). I go with each strategy until I have lost 10 rounds more than I have won before I switch to the next one. I had an idea for a one-shot scanner as the final strategy. The reason for this is that if I am brainwashed, I go to my final strategy. I expected mainly papers and scanners to brainwash me. I selected M R Bremer's Derision and hoped to improve it in various ways: adding anti-imp clear and/or brainwash (I think Toy v0.5 has brainwash). However, any changes caused Toy to perform worse except for the curious alteration of removing the indirection on the scan. This was worth three points to my score at submission time! I'm not sure why. It would have probably lasted longer on its own. Note that I don't bother booting anything. The reason for this was that I hoped Dodger would kill one-shots and I expected to be killed by QScans before I booted anyway. At least like this, my profile can be as small as possible for QScans. The constants for the win/loss are badly chosen. If I am winning by over 100 rounds I switch strategies anyway. This is unlikely to happen though so I don't think it made that much difference. Version 0.7 is smaller and has somewhat different components. It scores 195.5 Wilkies! Isn't that good? :-) It probably won't last much longer :-( Anyway, enough rambling... ;redcode-94 ;name Wind-up Toy v0.4 ;author Ian Oversby ;strategy Big, slow and lumbering... ;assert 1 ;P-Switching Bomb dodger, Bomber and Scanner ;Credits to M R Bremer for Derision org str plc equ 5 ; Not really plc2 equ 12 ; Not really ;;------------------------------------------------------------ str LDP.A #plc, pval ;load wins/losses ADD.A pval, check MOD.A #73, check JMN.A der, check ;permanent switch res LDP.AB #0, #0 LDP.A #plc2, pval2 ADD.A pval2, check2 MOD.A #87, check2 JMZ.A first, check2 sec SNE.AB #0, res ;check for loss lost ADD.A #73, pval SNE.AB #1, res ;check for win won SUB.A #73, pval STP.AB pval, #plc jump JMP.B st, <-100 first SNE.AB #0, res ;check for loss ADD.A #87, pval2 SNE.AB #1, res SUB.A #87, pval2 STP.AB pval2, #plc2 JMP.B dodge, <-100 pval DAT.F #0, #0 check DAT.F #7300, #7300 pval2 DAT.F #0, #0 check2 DAT.F #7134, #7134 ;;------------------------------------------------------------ safe DAT.F $0, $0 for 5 DAT.F $0, $0 rof st SPL.B #95, <-95 sloop ADD.F st, 1 MOV.I {line, line line DJN.F sloop, <-100 MOV.I 1, {st-1 ;;------------------------------------------------------------ for 5 DAT.F $0, $0 rof dodge JMN.F dboot, safe JMZ.F dodge, <-130 dboot ADD.AB #3, -131 MOV.I dptr+4, <-132 MOV.I dptr+3, <-133 MOV.I dptr+2, <-134 MOV.I dptr+1, <-135 MOV.I dptr, <-136 JMP.B @-137 dptr SPL.B #0, <-10 dloop MOV.I lline, {dptr MOV.I lline, {dptr JMP.B dloop, <-13 lline DAT.F <-12, <-11 for 35 DAT.F $0, $0 rof ;;------------------------------------------------------------ ptrs DAT.F b1, 0 der ADD.F step, scan scan SNE.I 108, 100 DJN.F -2, <-1664 b1 SPL.B #9, #14 cloop MOV.I *ptrs, >scan MOV.I *ptrs, >scan DJN.F -2, <-40 step DAT.F #16, #16 b2 SPL.B #8, #14 end -- ------------------------------------------------------------------------------ E-mail : ee31io@surrey.ac.uk Disclaimer : No-one, but me, believes any of this. ------------------------------------------------------------------------------