From news-rocq.inria.fr!jussieu.fr!math.ohio-state.edu!howland.reston.ans.net!newsfeed.internetmci.com!in2.uu.net!despina.neptune.com!news.new-york.net!news.stormking.com!PK6811S@ACAD.DRAKE.EDU Wed Apr 3 13:33:43 1996 Article: 4657 of rec.games.corewar Path: news-rocq.inria.fr!jussieu.fr!math.ohio-state.edu!howland.reston.ans.net!newsfeed.internetmci.com!in2.uu.net!despina.neptune.com!news.new-york.net!news.stormking.com!PK6811S@ACAD.DRAKE.EDU From: PK6811S@ACAD.DRAKE.EDU Newsgroups: rec.games.corewar Subject: Gem of the Ocean Date: 2 Apr 1996 12:20:24 -0500 Organization: Storm King Ind. Inc. Lines: 180 Sender: server@news.stormking.com Distribution: world Message-ID: <01I328TVQDQA00M0X0@ACAD.DRAKE.EDU> Reply-To: PK6811S@ACAD.DRAKE.EDU NNTP-Posting-Host: valhalla.stormking.com Originator: corewar-l@stormking.com Very funny. Someone, possibly with the aid of Scott or Tuc (?) sent me some phoney results from a 'submission' of Gem of the Ocean, 'killing' it off the Hill. They even put in some bad English to implicate my good friend Beppe, who I'm sure had no part in it. Anyway April 1 is now past, so here is the real Gem of the Ocean along with some comments on pspace. And a plea for others to please post their code, cause it sure is hard to work in the dark. Hey, Frontwards has been published for months and is still flying high, even though he is easily defeated. Paul Kline pk6811s@acad.drake.edu ---------------- A few thoughts on pspacing. Since brainwashing can be the fatal weakness in a pspace plan, you have to address it. Nobody can afford to lose 160 battles against a single opponent (except Frontwards :-), so a pspacer must have a good plan to deal with brainwashing. In Gem's case that is to use a table-based switcher. Brainwashing just repositions the table reference, which will be anywhere and therefore unpredictable to the washer. Also, since it really does not occur that often, and the table-based switcher quickly gets back in sync, it is not very dangerous. BTW, washing with #2520 MAY be useful, since it gives zero when mod'ed with anything up to 10 as well as other low numbers and therefore a predictable result. #2521, #2522,... would also work to give 1, 2,... The possible advantage of using these instead of 0, 1 or 2, is to trigger a brainwash detect like Clisson's which watches for out-of-range values. With the coming of pspace, a larger number of fighting components become viable, things like Clisson and the sweep, which can't stand alone but work well when switched. And other components like paper can be tuned to serve a specific role in the sequence, from very aggressive to super-tie. With the plogic matching the appropriate component to the expected opponent, it can be tuned to beat that one fighter irrespective of its performance against others. So an old 3-line 33% bomber may be just the thing to take out a scanner. For example, I just got back results from a SPL/DJN two-liner that scored 140/60 against Memories :-) Against a program like Chameleon which appears to simply rotate fighters, a pspacer which repeats after a win will be at a disadvantage. Gem usually scores 50/100 against him, so more work could be done there. (My SPL/DJN test did almost as well :-) And qscanners are always a threat due to the huge amount of code in Gem. ------------------------- Here is Gem, a table-based pspacer with all the latest components. The Stone is based on Blue Funk, with a MOV line added after the SPL creating a sequential core-clear to clean up any left-over SPL's or JMP-0's. After one mod-4 pass the DJN is bombed so the clear runs right along with the remaining passes. This version of Clisson uses a 4-line self-contained killer, including its own pointer and without a fall-through DJN.B. The sweep is modelled after Pink, using a 66% forward SPL/SPL/DAT clear and a 33% backward DJN.B. Gets enough wins against papers like Impfinity and Hector to be boost Gem's score. Usually ties paper-imps like Evol Cap and Die Hard. Any time Gem gets a tie he assumes a paper opponent and goes right to the sweep for the next round. Since paper follows sweep in the table, any time opposing paper beats the sweep Gem runs paper and gets a tie which triggers the sweep again. So paperish opponents get stuck fighting Sweep and Paper and have little opportunity against Stone and Clisson. A 'lucky' win against Gem's Paper gives a program like Evol Cap a few runs at Stone and Clisson which is unfortunate, but there you go. The paper is also designed to have a low tie rate against stones, since that would cause Sweep to be run against the stone resulting in a loss. One of the problems with this table-based switcher is 'loss creep'. The odd loss by stone to scanner causes the next component to be selected. Gem puts several stone/Clisson combinations early in the table to offset this somewhat, but eventually the Scanner gets to go against a couple of easy targets - Sweep and Paper - before getting back to the stone. The same thing happens against Lithium. The Clisson component works fairly well, but loses sometimes, giving Lithium a run at the other components against which it is more successful. ----------------------------------- ;redcode-94 ;name Gem of the Ocean ;kill Gem of the Ocean ;author P.Kline ;assert CORESIZE == 8000 ;strategy pswitching stone, clisson, paper, sweep ;strategy using table-based switcher ;strategy the final one! PFLAG equ 320 choose1 equ slStone choose2 equ slSweep choose3 equ slClisson choose4 equ slPaper slStone Stone spl #-76,#76 ; self-splitting, unbooted stone mov -2,<-13 ; with sequential core clear add Stone,1 mov >0,-3 djn.f -2,{-1501 for 11 dat 0,0 rof parray dat 0,choose1 ; table for pswitching dat 0,choose3 ; - stay after win dat 0,choose1 ; - go to ptie after tie dat 0,choose4 ; - move up one after loss dat 0,choose1 dat 0,choose3 ptie dat 0,choose2 dat 0,choose4 presult ldp.ab #0,#0 ; pswitch code, nice and short pselect ldp.ab #PFLAG,#0 sne.ab #0,presult ; advance table selection after a loss add.ab #1,pselect sne.ab #2,presult ; go to Sweep after a tie mov #ptie-parray,pselect stp.ba pselect,pselect mod.ab #presult-parray,pselect add.ba pselect,pchoice pchoice jmp @parray,{pselect ; jump to selection for 4 dat 0,0 rof slSweep mov Sweep-4 mov @1,>Sweep-4 djn.b -2,{Sweep watch2 dat 0,0 dat 1,1 for 18 dat 0,0 rof slClisson mov #watch2-(datone+40),(datone+40) Clisson sne {watch1,{watch1 ; Clisson to beat fast bombers jmz.f -1,@(datone+40) add.a #3,watch1 mov s0 s1 spl @0,>1907 mov.i }-1,>-1 spl -1,{-500 mov datone,>s1 mov datone,{-502 datone dat 1,1 end presult