Disharmonious

G

Guest

Guest
Archived from groups: rec.games.corewar (More info?)

With all these stone/papers on the hill, I was thinking how to kill
'em. Maybe I've reinvented an already existing strategy, but a t least
I haven't seen such warrior yet: sd-clear running in parralel with
imps. Yes, I stun my own imps, but I have enough time to unstun them (I

have double spl in clear). I was quite surprised when it worked. Just
look at some scores against papers and paper/stones:


Opponent Score Given W% L% T%
-------- ----- ----- ------ ------ ------
Reepicheep 94,8 132,3 7,3 19,8 73,0
Rot Papers 80,3 154,5 5,0 29,8 65,3
Hullabaloo 80,0 161,0 7,0 34,0 59,0
nPaper II 75,5 155,8 2,3 29,0 68,8


It just eats them; against p/s it's better than oneshot! Unfortunately
it looses to anything else. Maybe you have any ideas on how to improve
it? (I guess Q^3 is wrong choice). Here is the source of v0.4. It made
it to the hill, but was pushed off after 1 challenge. (To C. Birk: I
don't want it to be published at Koenigstuhl right now.)


;redcode-94nop
;author inversed
;name Disharmonious[v0.4]
;strategy Qscan -> sd-clear/imps (!)
;assert (CORESIZE==8000) && (MAXPROCESSES==8000)


istep equ 2667
iinc equ 2771
bd1 equ 3733
bd2 equ 2553
zclear equ 32
djofs equ 10


org qgo


cptr dat s, zclear


for 1
dat 0, 0
rof


s spl #kill-cptr, 0
spl #0, <cptr-djofs
mov *cptr, >cptr
mov *cptr, >cptr
djn.f -2, <cptr-djofs
kill dat kill-cptr, 8


is spl #istep, iinc
add is, iptr
iptr jmp imp-istep-1,{iinc
imp mov.i #0, istep


wgo spl 1
spl 1
mov }bp2, >bp2
mov }bp1, >bp1
mov }bp1, >bp1
spl is+bd2, 0
jmp s+bd1, 0
bp1 dat cptr, cptr+bd1
bp2 dat is, is+bd2


for 55
dat 0, 0
rof


A equ 6
B equ 3
C equ 9


qf equ qkill
qs equ qh*2
qh equ 106
qi equ 7
qnum equ 11


qgo seq qf+qs+qh, qf+qs ;1
jmp qskip, {qf+qs+qh+qi
seq qf+B*qs+qh, qf+B*qs ;B
jmp qfast, {qf+B*qs+qh+qi
seq qf+(B-1)*qs+qh, qf+(B-1)*qs ;B-1
jmp qfast, <qbomb
seq qf+(B+1)*qs+qh, qf+(B+1)*qs ;B+1
jmp qfast, >qbomb
seq qf+(A-1)*qs+qh, qf+(A-1)*qs ;A-1
djn qfast, {qfast
seq qf+A*qs+qh, qf+A*qs ;A
jmp qfast, {qfast


sne qf+B*C*qs+qh, qf+B*C*qs ;BC
jmz.f wgo, qf+B*C*qs+qh-10


qslow mul #C, qkill
qfast mul.b qbomb, @qslow
qskip sne {4096, @qkill
add #qh, qkill
qloop mov qbomb, @qkill
qkill mov qbomb, *qs
sub #qi, qkill
djn qloop, #qnum
jmp wgo, {A
qbomb dat {qi*qnum-10, >B
 
G

Guest

Guest
Archived from groups: rec.games.corewar (More info?)

Hey, that's a brilliant idea. I've never expected that this could work
so well. There are just a few points for improvements. I think a Q^4
quickscanner would give some few extra points. The boot sequence could
be changed a bit to save the dat's and maybe there is some space in
optimizing the constants. Well, as I was really curious I already made
some changes to see how much potential it has (I hope it was ok and am
still curious how well it would score on the 94nop hill. But I am
optimistic to see it in the upper half). Below is the code for it, but
I think there are plenty of possibilities for further improvements. Did
you test it with 7-pt imps as well? Interesting would be to write a
oneshot version of it, but I haven't a clue how it would score then.

;redcode-94nop
;author inversed
;name Disharmonious
;strategy Qscan -> sd-clear/imps
;assert (CORESIZE==8000) && (MAXPROCESSES==8000)

iinc1 equ 7182
iinc2 equ 220
bd1 equ 5799
bd2 equ 2398

zclear equ 32
djofs equ 10

istep equ 2667

zero equ qbomb
qtab3 equ qbomb

qbomb dat >qoff, >qc2
bp1 dat cptr, cptr+bd1
dat 0, <qb1
pGo
qtab2 spl 1, <qb2
spl 1, <qb3

mov <bp2, {bp2
mov }bp1, >bp1
mov }bp1, >bp1
bp2 spl qbomb+bd2, is+4
djn.f s+bd1, <6694

is spl #istep, <iinc1
add.f is, iptr
iptr djn.f imp-istep-1, <iinc2
imp mov.i #0, istep

for 7
dat 0, 0
rof

dat zero - 1, qa1
qtab1 dat zero - 1, qa2

cptr dat s, zclear
dat 0, 0
s spl #kill-cptr, 0
spl #0, <cptr-djofs
mov *cptr, >cptr
mov *cptr, >cptr
djn.f -2, <cptr-djofs
kill dat kill-cptr, 8

for 42-8
dat 0, 0
rof

qc2 equ ((1 + (qtab3-qptr)*qy) % CORESIZE)
qb1 equ ((1 + (qtab2-1-qptr)*qy) % CORESIZE)
qb2 equ ((1 + (qtab2-qptr)*qy) % CORESIZE)
qb3 equ ((1 + (qtab2+1-qptr)*qy) % CORESIZE)
qa1 equ ((1 + (qtab1-1-qptr)*qy) % CORESIZE)
qa2 equ ((1 + (qtab1-qptr)*qy) % CORESIZE)
qz equ 2108
qy equ 243

qgo sne qptr + qz*qc2, qptr + qz*qc2 + qb2
seq <qtab3, qptr + qz*(qc2-1) + qb2
jmp q0, }q0

sne qptr + qz*qa2, qptr + qz*qa2 + qb2
seq <qtab1, qptr + qz*(qa2-1) + qb2
jmp q0, {q0

sne qptr + qz*qa1, qptr + qz*qa1 + qb2
seq <(qtab1-1), qptr + qz*(qa1-1) + qb2
djn.a q0, {q0

sne qptr + qz*qb3, qptr + qz*qb3 + qb3
seq <(qtab2+1), qptr + qz*(qb3-1) + (qb3-1)
jmp q0, }q1

sne qptr + qz*qb1, qptr + qz*qb1 + qb1
seq <(qtab2-1), qptr + qz*(qb1-1) + (qb1-1)
jmp q0, {q1

sne qptr + qz*qb2, qptr + qz*qb2 + qb2
seq <qtab2, qptr + qz*(qb2-1) + (qb2-1)
jmp q0

seq >qptr, qptr + qz + (qb2-1)
jmp q2, <qptr

seq qptr+(qz+1)*(qc2-1),qptr+(qz+1)*(qc2-1)+(qb2-1)
jmp q0, }q0

seq qptr+(qz+1)*(qa2-1),qptr+(qz+1)*(qa2-1)+(qb2-1)
jmp q0, {q0

seq qptr+(qz+1)*(qa1-1),qptr+(qz+1)*(qa1-1)+(qb2-1)
djn.a q0, {q0

jmz.f pGo, qptr + (qz+1)*(qb2-1) + (qb2-1)

qoff equ -87
qstep equ -7
qtime equ 14
q0 mul.b *2, qptr
q2 sne {qtab1, @qptr
q1 add.b qtab2, qptr
mov qtab3, @qptr
qptr mov qbomb, }qz
sub #qstep, qptr
djn -3, #qtime
jmp pGo

end qgo
 
G

Guest

Guest
Archived from groups: rec.games.corewar (More info?)

Thanks a lot for your help, it's N4 at 94nop! Often it even beats
stone/imps.
First version had 7-pt imps, but I've changed it to 3-pt because 7-pt
hit gate faster; this increased scoring against anything with d-clear.
Other possible variation: add a stone? Main reason of decrease of clear
speed is stunning of imp launcher. If launcher is suicidal/killed by
stone, then clear is performed with almost no speed loss. I've tried
it, but overall performance decreased. After adding a stone, it lost
it's anti-paper abilities.
And are there any docs on how q^4 works?

inversed
 

TRENDING THREADS