G
Guest
Guest
Archived from groups: rec.games.corewar (More info?)
Behold Assault and Battery. Submitted to 94nop, it scores a
respectable but insufficient 110.
;redcode-94nop
;name Assault and Battery v0.1
;author Andrew Hunter
;strategy stun bomber
;strategy original version
;assert CORESIZE==8000
;-----------BOMBER-----------
step equ 2223
throw top bmbBootPtr mov.i {0,#0
ptr mov.i step,@2*step
mov.i sbmbP,{ptr
sub.f incrP,ptr
start mov.i sbmbP,@ptr
mov.i }mbmbP,*ptr
jmz.a ptr, {mbmbP
tail jmp clrBP,tail+1
;------------------------------
;-----------BOMBS-------------
sbmb spl #2,#1
mbmb mov.i @0,}-1
;-----------------------------
;positioning and weird boot needed
;for successful airbag.
;-----------D-CLEAR------------
gate equ (clrB-1)
clrB incr spl #-step*2-1,<-step*2
clr mov bomb,>gate
djn.f clr,>gate
bomb dat >2667,bomb-gate+1
;------------------------------
clrPtr dat 0,clrOff+1
bomberOff equ (tail+3240)
clrOff equ (tail+2844)
bombsOff equ (tail+1372)
sbmbP equ ((bombsOff-bomberOff)+tail-(clr-sbmb))
mbmbP equ ((bombsOff-bomberOff)+tail-(clr-mbmb))
incrP equ ((clrOff-bomberOff)+tail-(bomb-clrB))
clrBP equ incrP
;----------BOOTING CODE--------
boot bombsPtr spl 1,clr+1
bombsOffPtr spl 1,bombsOff+1
;boots the Bombs.
mov <bombsPtr,<bombsOffPtr
;boots the clear.
mov {clrPtr,<clrPtr
bomberOffPtr spl 1,bomberOff+1
mov <tail,<bomberOffPtr
djn.b >bomberOffPtr, #8
;------------------------------
;TODO: add decoy/decoymaker? Q-scan?
end boot
A bunch of questions for y'all. I picked a step of 2333 cause that's
what Behomot, which I based this off, used...but I'd like to optimize
it. Dumb brute force tends to work for that kind of stuff...BUT, not
here. You see, the boot distances are placed so
a. the clear never gets hit
and b. the bombs will get hit late in the bombing cycle, in such a way
that the airbag will fall through.
(Just so you know, that's why I boot a bit of the clear along with the
bombs.
after booting, the bombs look like this:
spl #2,#1
mov.i @0,}-1
spl #3553,#3554
mov 2, >2
The idea is that late, once a good spread has been layed down, a spl
#2,#1 bomb will land on the mov half of the incendiary (mov.i @0,}-1).
When it does, the airbag will check to see if mov 2,>2 is 0, which
it's not, and will jump to clear. (As a side note, can anyone see a
way I can get that to work w/o the two stolen lines from the clear?
If I do it the same way, then the spl line which lands points to empty
core, which is of course 0. Any ideas?)
The more important reason I'm telling you this is that it prevents me
from optimizing steps, because when I change the step, I have to hand
tune the boots to work. Any ideas on that?
Oh yeah, speaking of that, anyone got a program (I hear people talking
about such things) which randomizes certain constants and then
automatically tests them against a suite of warriors? I've got a
program I was given which can randomize the constants, but then I have
to hand benchmark them which takes a LONG time.
Oh yes, and speaking of benchmarking them...I test against the
warriors in the Wilfiz suite. Is this a good test suite?
Lastly, the Q^4.5 scan... I have a copy of this, given to me in my
warrior Cacodemon by Fizmo. I was warned that moving around the "tab"
locations could mess up the scan, and I looked at the scan code, and
can't make head nor tail of it. I'd like to add the scan to Assault
and Battery, but I don't know enough about how Q^4.5 works to safely
modify it to add my warrior and boot code. Help?
Behold Assault and Battery. Submitted to 94nop, it scores a
respectable but insufficient 110.
;redcode-94nop
;name Assault and Battery v0.1
;author Andrew Hunter
;strategy stun bomber
;strategy original version
;assert CORESIZE==8000
;-----------BOMBER-----------
step equ 2223
throw top bmbBootPtr mov.i {0,#0
ptr mov.i step,@2*step
mov.i sbmbP,{ptr
sub.f incrP,ptr
start mov.i sbmbP,@ptr
mov.i }mbmbP,*ptr
jmz.a ptr, {mbmbP
tail jmp clrBP,tail+1
;------------------------------
;-----------BOMBS-------------
sbmb spl #2,#1
mbmb mov.i @0,}-1
;-----------------------------
;positioning and weird boot needed
;for successful airbag.
;-----------D-CLEAR------------
gate equ (clrB-1)
clrB incr spl #-step*2-1,<-step*2
clr mov bomb,>gate
djn.f clr,>gate
bomb dat >2667,bomb-gate+1
;------------------------------
clrPtr dat 0,clrOff+1
bomberOff equ (tail+3240)
clrOff equ (tail+2844)
bombsOff equ (tail+1372)
sbmbP equ ((bombsOff-bomberOff)+tail-(clr-sbmb))
mbmbP equ ((bombsOff-bomberOff)+tail-(clr-mbmb))
incrP equ ((clrOff-bomberOff)+tail-(bomb-clrB))
clrBP equ incrP
;----------BOOTING CODE--------
boot bombsPtr spl 1,clr+1
bombsOffPtr spl 1,bombsOff+1
;boots the Bombs.
mov <bombsPtr,<bombsOffPtr
;boots the clear.
mov {clrPtr,<clrPtr
bomberOffPtr spl 1,bomberOff+1
mov <tail,<bomberOffPtr
djn.b >bomberOffPtr, #8
;------------------------------
;TODO: add decoy/decoymaker? Q-scan?
end boot
A bunch of questions for y'all. I picked a step of 2333 cause that's
what Behomot, which I based this off, used...but I'd like to optimize
it. Dumb brute force tends to work for that kind of stuff...BUT, not
here. You see, the boot distances are placed so
a. the clear never gets hit
and b. the bombs will get hit late in the bombing cycle, in such a way
that the airbag will fall through.
(Just so you know, that's why I boot a bit of the clear along with the
bombs.
after booting, the bombs look like this:
spl #2,#1
mov.i @0,}-1
spl #3553,#3554
mov 2, >2
The idea is that late, once a good spread has been layed down, a spl
#2,#1 bomb will land on the mov half of the incendiary (mov.i @0,}-1).
When it does, the airbag will check to see if mov 2,>2 is 0, which
it's not, and will jump to clear. (As a side note, can anyone see a
way I can get that to work w/o the two stolen lines from the clear?
If I do it the same way, then the spl line which lands points to empty
core, which is of course 0. Any ideas?)
The more important reason I'm telling you this is that it prevents me
from optimizing steps, because when I change the step, I have to hand
tune the boots to work. Any ideas on that?
Oh yeah, speaking of that, anyone got a program (I hear people talking
about such things) which randomizes certain constants and then
automatically tests them against a suite of warriors? I've got a
program I was given which can randomize the constants, but then I have
to hand benchmark them which takes a LONG time.
Oh yes, and speaking of benchmarking them...I test against the
warriors in the Wilfiz suite. Is this a good test suite?
Lastly, the Q^4.5 scan... I have a copy of this, given to me in my
warrior Cacodemon by Fizmo. I was warned that moving around the "tab"
locations could mess up the scan, and I looked at the scan code, and
can't make head nor tail of it. I'd like to add the scan to Assault
and Battery, but I don't know enough about how Q^4.5 works to safely
modify it to add my warrior and boot code. Help?
