Article 1675 of rec.games.corewar: Path: hellgate.utah.edu!caen!saimiri.primate.wisc.edu!usenet.coe.montana.edu!ogicse!flop.ENGR.ORST.EDU!prism.CS.ORST.EDU!wangsawm From: wangsawm@prism.CS.ORST.EDU (W. Mintardjo) Newsgroups: rec.games.corewar Subject: Sphinx v2.8 Message-ID: <1ne4lkINNdrs@flop.ENGR.ORST.EDU> Date: 8 Mar 93 00:40:20 GMT Article-I.D.: flop.1ne4lkINNdrs References: <1993Mar5.165959.1@acad.drake.edu> Distribution: rec Organization: CS Dept, Oregon State University Lines: 146 NNTP-Posting-Host: prism.cs.orst.edu Here is Sphinx v2.8 This is another spiral/stone program which manages to beat other spiral/stone programs. The way it differs from Imprimis 6 in terminating spiral is that Imprimis 6 used 2667 increment (shorter code) while Sphinx v2.8 uses its core-clear to gate imps (bigger chance but longer code). Some outlines of how this program works: 1. Bootstrap the stone. Very useful against PLASMA like programs 2. Set up spiral Using binary routine to set up spiral. At the same time, it launches into stone. This is the most vulnerable point. 3. Bombing A self-splitting bomber at ~67% of c. Using modulo 4 pattern bomber, this hopefully cripples most programs before core-clear. Its stone is not a high-tech one. Also, in practice, 6+7 lines are used for both bombing and core-clearing. 4. Return to the lair When DJN timer expired, it attempts to go into multi-pass core clearing with the trick of using JMP instruction as both returning code and bomb increment. Also, the JMP is also used to switch from pattern bombing to core-clearing. The core-clear is located at the start-up code and is not bootstrapped. 5. Core-clear A challenge for this program: how to implement a full core-clear while at the same time it blocks enemy's incoming spirals? So far is to use a forward and multi-pass core-clear. Forward: - Speed up core-clear. This tries to wipe opponent's functional bomber as as fast as possible. - Get most of cycles for modifying memory. Instead of spiralling. This delays the advance of its own spiral and thus preventing the clash between anti-imp and imp. - Gating the incoming imp. Because most of the cycles are used to decrement one spot, this should help stopping any advance of the opponent's spiral. Multi-pass: - To cover any spot it missed with forward core-clear, an 'SLT' instruction is used to check the core-clear and reset it before the core-clear reaches its own code. The result is a pseudo core-clear. Unless the checker gets bombed, the core-clear practically would cover 95% of the area - This also helps reducing the incoming opponent's spiral bits by bits. Gating: - The forward core-clear already acts as it - If for some reasons the checking code doesn't work quite right, the self- bombing that leaves SPL 0, <-3 and DAT <-4, <-5 would keep functioning as the gate without interfering its own spiral. This is possible. Because most of the cycles are now used for gating and only a fraction of it is used for spiraling. Ok, that's all for Sphinx. Enjoy Mintardjo W. -------------------------------------------------------------------------------- ;redcode quiet ;name Sphinx v2.8 ;author W. Mintardjo ;strategy Stone/Spiral program with multi-pass core clear ;strategy Optimizing the constants. See how this one does IMP0 EQU IMP IMP1 EQU IMP+2667 IMP2 EQU IMP+2667+2667 Init EQU Wait+2584 launch MOV Stone+4, Init-0 MOV Stone+3, Init-1 MOV Stone+2, Init-2 MOV Stone+1, Init-3 MOV Stone+0, Init-4 MOV Stomp+0, Init-5 SPL Init-5, <7115 SPL Init-5, <6304 SPL Init-5, <5303 SPL Init-5, <5902 SPL Init-5, <4061 SPL 16, <3708 SPL 8, <1935 SPL 4, <1814 SPL 2, <2011 JMP IMP0, <7370 JMP IMP1, <6013 SPL 2, <5812 JMP IMP2, <4811 JMP IMP0+1, <3910 SPL 4, <7517 SPL 2, <4916 JMP IMP1+1, <2215 JMP IMP2+1, <7214 SPL 2, <7013 JMP IMP0+2, <6712 JMP IMP1+2, <6511 SPL 8, <6110 SPL 4, <5617 SPL 2, <5216 JMP IMP2+2, <3511 JMP IMP0+3, <1910 SPL 2, <2417 JMP IMP1+3, <3316 JMP IMP2+3, <4603 SPL 4, <3602 SPL 2, <4161 JMP IMP0+4, <3104 JMP IMP1+4, <2903 SPL 2, <2172 JMP IMP2+4, <1517 JMP IMP0+5, <1011 Stone MOV <4+2584+2584, -2584-2584 SUB 3, -1 DJN -2, #886 MOV 1, -2 JMP -2584, 2584 DAT #0 DAT #0 DAT #0 DAT #-2200 DAT #0 DAT #0 DAT <-4, <-5 Stomp SPL 0, <-3 MOV -2, <-4 JMP -1, <-5 Wait SLT #-3195, @Stomp+1 MOV #-6, @Stomp+1 JMP -2, <-8 IMP MOV 0, 2667