• [88] Nemesis

    From John Metcalf@21:1/5 to All on Mon Nov 30 04:00:35 2020
    Nemesis is a continuous hydra (based on Hordes of Microwarriors) paired with a paper/imp (based on Evil Spirit). It scores pretty well against stone/imps but loses to Agony-style scanners (e.g. Monolith and Sting).

    The code is also available here:

    https://corewar.co.uk/nemesis.htm

    ;redcode
    ;name Nemesis
    ;author John Metcalf
    ;strategy qscan -> hydra/paper/imp
    ;assert CORESIZE==8000

    ; qscan - 36 scans in 48 instructions

    qfirst equ (qp2+2*qstep)
    qdist equ qfirst+130
    qstep equ 260

    qi equ 7
    qr equ 7

    qbomb dat <qi/2-qi*qr, <qi*qr-qi/2

    qa equ qstep*16
    qb equ qstep*5+2
    qc equ qstep*10
    qd equ qstep*2
    qe equ qstep*1

    qscan cmp qdist+qc, qfirst+qc
    jmp qfast, <qa
    cmp qdist+qe+qd, qfirst+qe+qd
    qp1 jmp <qfast, <qc
    qp2 cmp qdist, qfirst
    qp3 jmp qskip, <qe

    cmp qdist+qb, qfirst+qb
    q1 djn qfast, #qp1

    cmp qdist+qd+qc, qfirst+qd+qc
    jmp qslow, <qfirst+qd+qc+4
    cmp qdist+qd+qb, qfirst+qd+qb
    x1 jmp qslow, <q1
    cmp qdist+qc+qc, qfirst+qc+qc
    q2 djn qslow, #qp2
    cmp qdist+qd, qfirst+qd
    jmp qslow, <qfast
    cmp qdist+qa, qfirst+qa
    jmp q1, <q1

    cmp qdist+qa+qd, qfirst+qa+qd
    jmp x1, <q1
    cmp qdist+qc+qb, qfirst+qc+qb
    jmp q2, <q1
    cmp qdist+qe+qd+qc,qfirst+qe+qd+qc
    jmp qslower, <qfirst+qe+qd+qc+4
    cmp qdist+qe+qd+qb,qfirst+qe+qd+qb
    jmp qslower, <q1
    cmp qdist+qe+qc+qc,qfirst+qe+qc+qc
    jmp qslower, <q2
    cmp qdist+qd+qd+qc,qfirst+qd+qd+qc
    q3 djn qslower, #qp3
    cmp qdist+qe+qc, qfirst+qe+qc
    jmp <qfast, <q2
    cmp qdist+qd+qd, qfirst+qd+qd
    jmp <qfast, <q3
    cmp qdist+qd+qd+qb,qfirst+qd+qd+qb
    slt <q3, <q1

    jmz warr, qdist+qe+qd+qc+10

    qslower add @q3, @qslow
    qslow add @q2, qkil
    qfast add @q1, @qslow

    qskip cmp <qdist+qstep+50, @qkil
    jmp qloop, <1234

    add #qdist-qfirst, qkil
    qloop mov qbomb, @qkil
    qkil mov <qfirst+qstep+50, <qfirst
    sub #qi, @qloop
    djn qloop, #qr+2

    warr spl 1, <1000
    spl 1, <3000
    spl 1, <5000
    mov <tdjn+2, <hboot
    mov <tdjn+2, <pboot
    hboot spl @0, warr+5452
    pboot jmp @0, warr+6608

    ; paper with vortex launch based on Evil Spirit

    istep equ 1143
    pstepa equ 6502
    pstepb equ 1708
    size equ 8

    mov <size, <papa
    papa spl @0, pstepa
    mov <size, <papb
    papb spl @0, pstepb
    spl 0
    add #istep, launch
    launch jmp @0, imp-istep*size
    imp mov 0, istep

    ; continuous hydra based on Hordes of Microwarriors

    first equ 7068
    step equ 1808

    tspl spl 0, <boot
    mov 0, <boot
    boot mov tdjn, first
    add #step, boot
    mov tspl, @boot
    djn @boot, <-100
    tdjn djn -2, #4014

    end qscan

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)