Killer Frogs (stone -> paper/imp)
From
John Metcalf@21:1/5 to
All on Thu Dec 9 14:49:38 2021
Killer Frogs is a stone -> paper similar to Killer Instinct, Leapfrog and Genocide without the anti-vamp / clear. It launches a small stone which switches to paper if an opponent is detected. Hopefully the stone will
deal with any scanners and the paper should tie everything else.
I created 88 and 94 versions which entered the hills briefly. Any ideas
how to improve these, or is stone -> paper no longer viable?
;redcode-94nop
;name Killer Frogs 94
;author John Metcalf
;strategy stone -> paper/imp
;assert CORESIZE==8000
qfac equ 3449
power equ 3199
for 20+!(r=1)*(x=qfac)*(n=power)
for n%2
for !r=(r*x)%CORESIZE
rof
rof
for !x=(x*x)%CORESIZE+!n=n/2
rof
rof
qdec equ (r+1)
qa equ (qfac*(qtab0-1-qptr)+1)
qb equ (qfac*(qtab0-qptr)+1)
qc equ (qfac*(qtab1-1-qptr)+1)
qd equ (qfac*(qtab1-qptr)+1)
qe equ (qfac*(qtab1+1-qptr)+1)
qf equ (qfac*(qtab2-qptr)+1)
qtime equ 18
qstep equ -7
qgap equ 87
qdecode mul.b *q1, qptr
q0 sne <qtab0, @qptr
q1 add.b qtab1, qptr
q2 mov qtab2, @qptr
qptr mov qtab2, *qdec
add #qstep, qptr
djn q2, #qtime
jmp paper, qc
qtab1 dat 4000, qd
dat 4000, qe
qscan sne qptr+qdec*qe, qptr+qdec*qe+qe
seq <qtab1+1, qptr+qdec*(qe-1)+qe-1
jmp qdecode, }q1
sne qptr+qdec*qb, qptr+qdec*qb+qd
seq <qtab0, qptr+qdec*(qb-1)+qd
jmp qdecode, {qdecode
sne qptr+qdec*qa, qptr+qdec*qa+qd
seq <qtab0-1, qptr+qdec*(qa-1)+qd
djn.a qdecode, {qdecode
sne qptr+qdec*qf, qptr+qdec*qf+qd
seq <qtab2, qptr+qdec*(qf-1)+qd
jmp qdecode, }qdecode
sne qptr+qdec*qc, qptr+qdec*qc+qc
seq <qtab1-1, qptr+qdec*(qc-1)+qc-1
jmp qdecode, {q1
sne qptr+qdec*qd, qptr+qdec*qd+qd
seq <qtab1, qptr+qdec*(qd-1)+qd-1
jmp qdecode, qa
qtab0 jmp warr, qb
qtab2 dat qgap, qf
for 52
dat 0,0
rof
warr equ boot
sstep equ 7585
bdist equ (paper+8+sstep)
boot mov stone+3, bdist
mov stone+2, <boot
mov stone+1, <boot
mov stone, <boot
jmp @boot
stone mov {4000, sstep-1
add inc, stone
inc jmz.f stone, <sstep
jmp paper-bdist
step1 equ 1480
istep equ 1143 ; (CORESIZE+1)/7
paper spl 1, <-300 ; 8 parallel processes
spl 1, <-400
spl 1, <-500
papera spl @0, {step1
mov }-1, >-1
spl 0 ; vortex launcher
add.a #istep, launch
launch djn.f imp-istep*8, {6*100
imp mov.i #1, istep
end qscan
; -----------------------------------------------------------
;redcode
;name Killer Frogs
;author John Metcalf
;strategy stone -> paper/imp
;assert CORESIZE==8000
stone mov <4300, sstep-1
add inc, stone
inc jmz stone, <sstep
jmp paper-bdist
sstep equ 3095
bdist equ (paper+8+sstep)
boot mov stone+3, bdist
mov stone+2, <boot
mov stone+1, <boot
mov stone, <boot
jmz @boot, bdist-4
; qscan - 36 scans in 48 instructions
qfirst equ (qp2+2*qstep)
qdist equ qfirst+qeee
qstep equ (qeee*2)
qeee equ 197
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
qgo 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 pgo, 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
pgo equ boot
step1 equ 1832
istep equ 1143 ; (CORESIZE+1)/7
paper spl 1 ; 8 parallel processes
spl 1
spl 1
mov <8, <papera
papera spl @0, step1
spl 0, <4000 ; vortex launcher
add imp, launch
launch jmp @0, imp-istep*8
imp mov 0, istep
end qgo
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)