Path: ibmpcug!gwen.pcug.co.uk!dish.news.pipex.net!pipex!tank.news.pipex.net!pipex!newsfeed.internetmci.com!howland.reston.ans.net!news.sprintlink.net!in2.uu.net!newstf01.news.aol.com!newsbf02.news.aol.com!not-for-mail From: agserm@aol.com (AGSerm) Newsgroups: rec.games.corewar Subject: Beginner, needs help on first prog. Date: 29 Aug 1995 13:34:29 -0400 Organization: America Online, Inc. (1-800-827-6364) Lines: 49 Sender: root@newsbf02.news.aol.com Message-ID: <41vj35$1bo@newsbf02.news.aol.com> NNTP-Posting-Host: newsbf02.mail.aol.com X-Newsreader: AOL Offline Reader I really like corewars, but my progs keep getting thrashed. I've been submitting progs to the beginner's hill at pizza (prox. 1/wk for 2 mo. or so), and in all that time, 1 program made it on, and then was pushed off by the next challenger. If anyone could suggest what i'm doing wrong, or a better idea for a warrior, I would really appreciate it. TIA - Ansel Greenwood Sermersheim Here's the source: ;redcode-b ;name IcicleV2 1.14 ;author Ansel Greenwood ;strategy Saturation bombing with SPL 1, JMP -1, and cleaning up with DAT ;assert CORESIZE == 8000 ;1 3039 3359 ;2 2234 3094 ;4 3044 3364 ;5 2365 3315 ;8 2376 2936 org bloop1 tmp dat #1000 lookat dat #1, #1 bnew spl 1, #1 bnew2 jmp -1, #1 bloop1 mov bomb, @lookat mute1 add #1, lookat mute2 mov bomb2, @lookat add #2375, lookat djn bloop1, tmp bjump2 jmp bloop2, #1 bomb spl 1, $0 bomb2 jmp -1, $0 bloop2 sub #3039, lookat cmp.b bomb, @lookat jmp bloop2, #1 mov lookat, @lookat jmp bloop2, #1 end Path: ibmpcug!gwen.pcug.co.uk!dish.news.pipex.net!pipex!tank.news.pipex.net!pipex!in2.uu.net!news2.new-york.net!news.stormking.com!bezzi@iol.it From: bezzi@iol.it (Beppe Bezzi) Newsgroups: rec.games.corewar Subject: Re: Beginner, needs help on first prog. Date: 30 Aug 1995 07:13:33 -0400 Organization: Storm King Ind. Inc. Lines: 105 Sender: server@news.stormking.com Distribution: world Message-ID: <199508301154.MAA02080@iol-mail.iol.it> Reply-To: bezzi@iol.it NNTP-Posting-Host: valhalla.stormking.com Originator: corewar-l@stormking.com Ansel Greenwood Sermersheim wrote >I really like corewars, but my progs keep getting thrashed. I've been >submitting progs to the beginner's hill at pizza (prox. 1/wk for 2 mo. or >so), and in all that time, 1 program made it on, and then was pushed off >by the next challenger. If anyone could suggest what i'm doing wrong, or >a better idea for a warrior, I would really appreciate it. Let me try to help you and give some useful hint. Main problems of your program are: 1- it's too long, an easy target for opponents; 2- it's a bit slow in its bombing run. Let's try to fix the problems still keeping your strategy: bomb with spl 0/jmp -1 to slow opponent and then clear the core with dats to finish it. >;redcode-b >;name IcicleV2 1.14 >;author Ansel Greenwood >;strategy Saturation bombing with SPL 1, JMP -1, and cleaning up with DAT >;assert CORESIZE == 8000 > org bloop1 >tmp dat #1000 > >lookat dat #1, #1 ;you don't need that as pointer for bombs >bnew spl 1, #1 >bnew2 jmp -1, #1 >bloop1 mov bomb, @lookat >mute1 add #1, lookat ;better use indirect addressing a save a line >mute2 mov bomb2, @lookat > add #2375, lookat ;2365 is *far* better as bombing step > djn bloop1, tmp >bjump2 jmp bloop2, #1 >bomb spl 1, $0 >bomb2 jmp -1, $0 >bloop2 sub #3039, lookat ;In stead of this we'll clear core with 2 lines > cmp.b bomb, @lookat ;setting up an imp gate too > jmp bloop2, #1 > mov lookat, @lookat > jmp bloop2, #1 end ;name Icicle ;strategy spl 0 /jmp -1 bomber with core clear org bloop1 step equ 2365 ;better that 2375 bnew2 jmp -1, -1 lookat dat <-10, <-10 ;the < decrements kill imps dat 0,0 ;hit by spl 0 dat 0,0 ;hit by jmp -1 bloop1 mov bnew2, @mute2 ;puts a jmp -1 bomb 2365+3 cells away ;from mute2 mute2 mov bnew, *2365+3 ;puts a spl 0,in the cell pointed by ;the a-field of the jmp -1 ;i.e. just before it add #step, mute2 ;add and jump to repeat bombing run djn bloop1, #1599 ;hit by spl 0 we'll stop a bit before ;Now we have to clear the core and kill imps surviving the bombing. ;the spl #0 will generate processes to feed the mov instruction ;at last the mov will be overwritten but the spl will keep you alive bnew spl #0, <-9 mov lookat, TIA - Ansel Greenwood Sermersheim -Beppe Bezzi