From news-rocq.inria.fr!univ-lyon1.fr!howland.erols.net!newsfeed.internetmci.com!news.albany.net!news.sprintlink.net!news-dc-10.sprintlink.net!news.azstarnet.com!news Fri Nov 15 16:51:02 1996 Article: 6533 of rec.games.corewar Path: news-rocq.inria.fr!univ-lyon1.fr!howland.erols.net!newsfeed.internetmci.com!news.albany.net!news.sprintlink.net!news-dc-10.sprintlink.net!news.azstarnet.com!news From: Franz Newsgroups: rec.games.corewar Subject: Dr. Gate v2 Date: Wed, 13 Nov 1996 17:15:36 -0700 Organization: Starnet Lines: 88 Message-ID: <328A64A8.11D0908D@azstarnet.com> NNTP-Posting-Host: usr6ip31.azstarnet.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (X11; I; Linux 2.0.25 i586) Dr Gate / Self Recovery Once there was a discussion on the newsgroup about serial proccess and self checking. This is my latest warrior that does all that ... It is fairly well documented, though the mechanism isn't all that simple. I recomend stepping through it a couple of times ... This one is very different from Golden Gate which ironically gets much better scores. The boot is slightly slower the Dr. style but it's a lot smaller .. Golden Gate uses binary launch and golden gate is a pure dat bomber while Dr.Gate is spl/spl/mov ... yes it's freaky how that works too ... I have tried optimizing as hard as I could and this is the result .. fits in 21 lines with boot and launch ... This is without loss of speed, it is one cycle slower then the original, but the smaller footprint fools more quickscans, The boot itself isn't too quick, but there isn't a way to do it faster, I think. Golden Gate is over 30 lines long ... Dr. Gate gets much better scores with papers but there aren't that many on the hill so Golden Gate can do better. ;redcode ;name Dr. Gate v2 ;author Franz ;strategy Airbag bomber(.6c)->d-clear ;strategy I should start numbering the versions :) ;url http://www.azstarnet.com/~franz ;assert CORESIZE==8000 opt EQU 155 stbm EQU 2 ;of course this isn't the true value :) INSTALL EQU 1352 check EQU align-40 org boot boot b1 spl 1,>-127*2 mov.i >b2,}p2 ;2 times (bombs) b2 mov.i b1,#sl mov.i -127*3 mov.i p1,#1 ;first fall through to become 6th s6 spl *p1,#stone+8 ;jump to 6th process ;this boot creates proccesses as ;1,6 ;2 ;3 ;4 ;5 ;make 1,1 to kill pointers / slow djn trains p1 div.f #stone+INSTALL,#stone+INSTALL-1 p2 div.f #check+INSTALL,#stone+INSTALL+8 dbomb dat >2667,>25 ;this is the part that can be hit (dat,spl?,incedenary(some)...) stone mov.i check+1,stbm+(opt*3),{stbm+(opt*4)+1 add.f jump,where mov.i {stone,{where ;this is the check for hits in main loop, imps and papers align jmz.f stone,}stone ;just a regular d-clear jump spl #opt*3+1, >opt*3+1 clr mov.i dbomb, >align-20 djn.f clr, >align-20 ;these are the bombs, the spl is also used for checking and the checking ;mov instruction can also use the spl to bomb so it bombs (mov/spl/spl) sl spl 0, 0 mv mov opt+1, <10 datz end