Path: ibmpcug!gwen.pcug.co.uk!plug.news.pipex.net!pipex!tank.news.pipex.net!pipex!howland.reston.ans.net!news.moneng.mei.com!uwm.edu!alpha1.csd.uwm.edu!dweezil From: dweezil@alpha1.csd.uwm.edu (Andrew S Mehlos) Newsgroups: rec.games.corewar Subject: Ideas? Date: 5 Oct 1995 18:50:24 GMT Organization: Information & Media Technologies, University of Wisconsin - Milwaukee Lines: 58 Distribution: world Message-ID: <4519dg$jvg@uwm.edu> NNTP-Posting-Host: 129.89.169.1 Well, this is one of my first attempts to get something on the beginner hill... Any ideas on how to improve on it would be greatly appreciated (I'm sure there's tons :).. ;redcode-b ;name Jezebel v2.0 ;author A. Nevermind ;assert 1 i1 equ 20 ; bombing interval i2 equ 10 i3 equ 1 b1c dat 690 b2c dat 1400 l1 dat 100 l2 dat 100 l3 dat 100 org start b1 spl 0, <4 ; slow down b2 jmp 0 ; paralyze b3 dat 0 ; and kill start spl b2run, <1000 spl b3run, <2000 b1run add i1, l1 mov b1, @l1 jmn -2, l3 imp mov 0,1 -- -[ "It doesn't matter what I say, as long I sing with inflection."-J.Popper -[ Finger for PGP key | Mmmmmmmmmmmm... Doughhhhhnuts! ]- -["I'm told it [superstition] works whether you believe in it or not. " ]- -[ --N. Bohr ]- Path: ibmpcug!gwen.pcug.co.uk!plug.news.pipex.net!pipex!dish.news.pipex.net!pipex!news00.sunet.se!sunic!uunet!in1.uu.net!spcuna!news.stormking.com!bezzi@iol.it From: Beppe Bezzi Newsgroups: rec.games.corewar Subject: Re: Ideas? Date: 5 Oct 1995 17:27:12 -0400 Organization: Storm King Ind. Inc. Lines: 58 Sender: server@news.stormking.com Distribution: world Message-ID: <199510052208.XAA25493@iol-mail.iol.it> Reply-To: bezzi@iol.it NNTP-Posting-Host: valhalla.stormking.com Originator: corewar-l@stormking.com X-Mailer: Windows Eudora Light Version 1.5.2 At 15.45 05/10/95 -0400, you wrote: > Well, this is one of my first attempts to get something on the >beginner hill... Any ideas on how to improve on it would be greatly >appreciated (I'm sure there's tons :).. > Your program, three bombers working in parallel if I understood well, has a *serious* bug that now I'll try to explain: >;redcode-b >;name Jezebel v2.0 >;author A. Nevermind >;assert 1 > >[equ removed, irrilevant for the problem] b1c dat 690 b2c dat 1400 >org start > >b1 spl 0, <4 ; slow down >b2 jmp 0 ; paralyze >b3 dat 0 ; and kill > >start spl b2run, <1000 > spl b3run, <2000 > > >b1run add i1, l1 > mov b1, @l1 > jmn -2, spl 0, <-40 > spl -1, <-41 > dat 0 To decrement b1c you have to use: djn.b b1run, blc This decrements the b-field of blc jumping to b1run if not zero. Or, better more, you can save a line djn.b b1run, #690 This one decrements it own b-field and jumps when zero -Beppe Bezzi Gaudeamus igitur ...