Welcome to GameHourz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Multi process qscan

 
   Game Forums (Home) -> Core War RSS
Next:  Help with a new game to play  
Author Message
Roy

External


Since: Jun 06, 2006
Posts: 5



(Msg. 1) Posted: Fri Jul 07, 2006 11:41 am
Post subject: Multi process qscan
Archived from groups: rec>games>corewar (more info?)

Hi everybody,

This evening Fluffy was talking to me about his qscan article and he
asked if I had any odd ideas he could explore. Thats when I suggested a
multi process qscanner. The big advantage is that is can withstand
simple dat attacks in the early phase.

After a lot of tinkering with the processes I came up with the
following design I'm quite proud of. It splits the qscan in half and
scans the upper and lower half seperatly....

OOPS! just realized something, the following warrior's qscan is
probably broken, the qz mutation isn't done in the right way... I hate
it I don't fully understand qscans Sad

But well, someone can probably fix that for me...! The point is my
following qscan is just simple cut in two and has a smart booting
mechanism for multi-process warriors. If the upper of lower half of the
qscan sees something or gets bombed the other part still starts the
warrior normally!

Without further bad english and blabla, the warrior: just look at how
it works Smile
Its just Maelstrom (one of my favourites) with the SplitQScan.

;redcode-94nop
;name
;author Roy van Rijn
;assert 1

zero equ qbomb

qtab3 equ qbomb
qbomb dat >qoff , >qc2

hDist equ 788
iDist equ hDist-1520
cDist equ hDist-3634

mov.i 2 , 3 ;might move 2,3 or 3,3 depends
on qEnd1 and qEnd2
sBoot spl 1 , {qb1
qtab2 spl 1 , <qb2
mov.i #0 , <qb3 ;filling

mov {pap2 , {1
pBoot1 spl bDist1 , }5747

mov {pap , {1
pBoot2 djn.f bDist2 , }4584

for 8
dat 0 , 0
rof

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

bDist1 equ 996
bDist2 equ 5354

iStep equ 1143
pStep equ 7342
sStep equ 5965


pap2 spl @8 , <pStep
mov.i }-1 , >-1
pStone spl #0
mov bomb , >ptr
add.x imp , ptr
ptr jmp imp-iStep*8 , >sStep-6
bomb dat >1 , }1
imp mov.i #sStep-1 , iStep


for 3
dat 0 , 0
rof

nstep1 equ 2413
cstep1 equ 4704
tstep1 equ 3278

pap spl @8 , }tstep1
mov.i }-1 , >-1
nothA spl cstep1 , 0
mov.i >-1 , }-1
nothB spl @0 , }nstep1
mov.i }-1 , >-1
mov.i #1138 , <1
djn.b -2 , #1618

for 25
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 ;qy*(qz-1)=1

;q0 mutation

qgo spl qGo2

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

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
;q1 mutation
sne qptr+qz*qb3 , qptr+qz*qb3+qb3
seq <(qtab2+1) , qptr+qz*(qb3-1)+(qb3-1)
jmp q0 , }q1

;start the warrior
;if qEnd2 is reached too do spl 1/spl 1/mov.i
;else do spl 1/spl 1/spl 1
qEnd1 jmp sBoot-1 , >qEnd2

qGo2 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 , 0

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

;q0 mutation
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

;start the warrior
;if qEnd1 is reached too do spl 1/spl 1/mov.i
;else do spl 1/spl 1/spl 1
qEnd2 jmp sBoot-1 , }sBoot-2

qoff equ -87
qstep equ -7
qtime equ 19

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
jmn.a sBoot-1 , pap2 ;if pap2 is not booted we need
to start the warrior
end qgo

 >> Stay informed about: Multi process qscan 
Back to top
Login to vote
Roy

External


Since: Jun 06, 2006
Posts: 5



(Msg. 2) Posted: Fri Jul 07, 2006 12:45 pm
Post subject: Re: Multi process qscan [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I've switched it around a little bit and added the final jmz line too
(I deleted it the first time). Now the qscan should work a little more
like it it supposed to do. But still not good enough... I'll just call
it a PoC (Proof of Concept) for now Wink

The problem is this:

sne/seq/jmp 2x becomes:

sne sne seq seq jmp jmp

But in the second 'seq' lines there are mutations Sad So the qscanner
isn't working properly.
What we really need (Fluffy pointed that out) are two seperate
scanlines with one common bomb-engine. Instead of the q4^5 then we can
have all sne/seq/jmp instead of seq/jmp's at the end. But I'll just
leave that as a challenge because I'm way to lazy for that right now Razz

The improved PoC:


;redcode-94nop
;name PoC q4.5/2
;author Roy van Rijn
;assert 1

zero equ qbomb

qtab3 equ qbomb
qbomb dat >qoff , >qc2

hDist equ 788
iDist equ hDist-1520
cDist equ hDist-3634

mov.i 2 , 3 ;might move 2,3 or 3,3 depends
on qEnd1 and qEnd2
sBoot spl 1 , {qb1
qtab2 spl 1 , <qb2
mov.i #0 , <qb3 ;filling

mov {pap2 , {1
pBoot1 spl bDist1 , }5747

mov {pap , {1
pBoot2 djn.f bDist2 , }4584

for 8
dat 0 , 0
rof

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

bDist1 equ 996
bDist2 equ 5354

iStep equ 1143
pStep equ 7342
sStep equ 5965


pap2 spl @8 , <pStep
mov.i }-1 , >-1
pStone spl #0
mov bomb , >ptr
add.x imp , ptr
ptr jmp imp-iStep*8 , >sStep-6
bomb dat >1 , }1
imp mov.i #sStep-1 , iStep


for 3
dat 0 , 0
rof

nstep1 equ 2413
cstep1 equ 4704
tstep1 equ 3278

pap spl @8 , }tstep1
mov.i }-1 , >-1
nothA spl cstep1 , 0
mov.i >-1 , }-1
nothB spl @0 , }nstep1
mov.i }-1 , >-1
mov.i #1138 , <1
djn.b -2 , #1618

for 24
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 ;qy*(qz-1)=1

;q0 mutation

qgo spl qGo2

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

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

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

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

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

jmn.f q0 , qptr+(qz+1)*(qb2-1)+(qb2-1)


;start the warrior
;if qEnd2 is reached too do spl 1/spl 1/mov.i
;else do spl 1/spl 1/spl 1
qEnd1 jmp sBoot-1 , }sBoot-2


qGo2 sne qptr+qz*qc2 , qptr+qz*qc2+qb2
seq <qtab3 , qptr+qz*(qc2-1)+qb2
jmp 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*qb2 , qptr+qz*qb2+qb2
seq <qtab2 , qptr+qz*(qb2-1)+(qb2-1)
jmp q0 , }2355

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

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

;start the warrior
;if qEnd1 is reached too do spl 1/spl 1/mov.i
;else do spl 1/spl 1/spl 1
qEnd2 jmp sBoot-1 , >qEnd1

qoff equ -87
qstep equ -7
qtime equ 19

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
jmn.a sBoot-1 , pap2
end qgo

 >> Stay informed about: Multi process qscan 
Back to top
Login to vote
iapdk

External


Since: Dec 21, 2005
Posts: 12



(Msg. 3) Posted: Tue Jul 11, 2006 3:32 pm
Post subject: Re: Multi process qscan [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Roy wrote:
> Hi everybody,
>
> This evening Fluffy was talking to me about his qscan article and he
> asked if I had any odd ideas he could explore. Thats when I suggested a
> multi process qscanner. The big advantage is that is can withstand
> simple dat attacks in the early phase.

Now that would be cheating on all the other qscans that depend on those
early shots for their high win scores.

When QuickFreeze was written it was obvious that the scan component was
giving up unnecessary losses because it was so big, so it got broken up
into two separate scans. Today's qscans are very compact, but still
give up a few particularly to the other qscans.

Paul K
 >> Stay informed about: Multi process qscan 
Back to top
Login to vote
Roy

External


Since: Jun 06, 2006
Posts: 5



(Msg. 4) Posted: Tue Jul 11, 2006 11:52 pm
Post subject: Re: Multi process qscan [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hehe thats not cheating, thats trying to get some more wins! But there
are a couple of problems with it:

1.It doesn't beat normal qscans (yet?)
2. When everybody uses it is becomes more useless tieing more instead
of win/loss (win/loss at 50/50 is much better for the scores)

So if it would work better it only works against normal qscans.

iapdk RemoveThis @admin.drake.edu wrote:
> Roy wrote:
> > Hi everybody,
> >
> > This evening Fluffy was talking to me about his qscan article and he
> > asked if I had any odd ideas he could explore. Thats when I suggested a
> > multi process qscanner. The big advantage is that is can withstand
> > simple dat attacks in the early phase.
>
> Now that would be cheating on all the other qscans that depend on those
> early shots for their high win scores.
>
> When QuickFreeze was written it was obvious that the scan component was
> giving up unnecessary losses because it was so big, so it got broken up
> into two separate scans. Today's qscans are very compact, but still
> give up a few particularly to the other qscans.
>
> Paul K
 >> Stay informed about: Multi process qscan 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Score Surface for 94nop - Hi, some anonymous person (still called "bvowk" for simplicity ;-) is so kind to provide access to a pile of computers. I have suggested to calculate one score surface for standard settings. It takes roughly 1000 times the time of one "no...

Bug in pMARS - Hi, either I don't know how EQUs work or I have found a bug in the parser of pMARS. So far I cound pin it down to: ;redcode-tiny ;name test ;assert CORESIZE == 800 v3 EQU 3 * (3 / 2 + 1) + 3 v4 EQU (CORESIZE - v3) dat.f v3, v4 With the..

KOTH.ORG: Status - ICWS Experimental 94 03/06/06 - Weekly Status on 03/06/06 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG ICWS Experimental 94..

KOTH.ORG: Status - MultiWarrior 94 03/06/06 - Weekly Status on 03/06/06 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG Multiwarrior 94 CoreWar..

KOTH.ORG: Status - 94 No Pspace 03/06/06 - Weekly Status on 03/06/06 -=- irc.KOTH.org is up! Meetings held in #corewars -=- Tons of new features on www.KOTH.org/koth.html pages -=- *FAQ* page located at: www.KOTH.org/corewar-faq.html Current Status of the KOTH.ORG 94 No Pspace CoreWar Hill...
   Game Forums (Home) -> Core War All times are: Ekaterinburg, Islamabad, Karachi, Tashkent (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]