Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Boclr: Bombing scanner trick

109 views
Skip to first unread message

Roy van Rijn

unread,
May 6, 2013, 3:22:59 AM5/6/13
to
Hey all,

We all know the concept behind clear-directed scanners right? A scanner with a SPL-clear, when the scanner finds something the SPL-clear is redirected to that position and it keeps scanning.

The problem with this strategy is the initial state of the clear, it isn't very effective to just start clearing somewhere. That is why the Zooom-trick was invented. This warrior didn't start the clear until it found something, without more lines of code, very clever!

Yesterday I thought of a new strategy for the initial clear, instead of waiting with the clear like Zooom... I wanted a warrior that bombs scattered at the scan locations first, switching to a clear once a target has been found.

This is what I came up with, it doesn't score very well... but who knows, I might have missed some obvious improvements. It is based on Lux Aeterna:

;redcode-94nop quiet
;name Boclr
;author Roy van Rijn
;strategy Bombing clear scanner
;strategy New type of scanner trick
;assert 1

times equ 499
step equ 208
span equ 8

clrPtr dat shoot+1,0
scnPtr dat scan+3+(times*step) , scan+3+span+(times*step)

for 8
dat 0,0
rof

clear spl #step , }step+1
mov.i b , >clrPtr
djn.f -1 , >clrPtr
b dat <2667 , }16

for 10
dat 0 , 0
rof

att mov.x scnPtr , clrPtr
shoot mov.i clear , @scnPtr ;gets self-mutated in @clrPtr
incr sub.f clear , scnPtr
scan seq.i *scnPtr , >scnPtr
djn.b att , {clrPtr
loop jmp shoot , >clrPtr ;gets bombed with SPL bomb
gate jmp clear

end scan

pauld...@aol.com

unread,
May 7, 2013, 1:32:29 PM5/7/13
to
On Monday, May 6, 2013 2:22:59 AM UTC-5, Roy van Rijn wrote:
> This is what I came up with, it doesn't score very well...

It bombs a location whose neighbor was just determined to be empty, the small gain you get from sparse-coloring core may not be worth the extra instruction.

Maybe better to change seq to jmz, save a line and have .33c scanning with .33c bombing.

P. Kline

Roy van Rijn

unread,
May 8, 2013, 5:28:43 AM5/8/13
to
> > This is what I came up with, it doesn't score very well...
>
> It bombs a location whose neighbor was just determined to be empty, the small gain you get from sparse-coloring core may not be worth the extra instruction.
>

Exacly, I was trying to do this:

bomb spl #1 , }-bmboff

for 8
dat 0,0
rof

clear spl #step , }step
mov.i b , >bomb
djn.f -1 , >bomb
b dat <2667 , }16

for 11
dat 0 , 0
rof
nop >shoot , }adj
att mov.ab scan , adj
incr sub.f clear , scan
shoot mov.i bomb , @scan
scan seq.i scan+1+(times*step) , @scan+1+span+bmboff+(times*step)
adj jmp att-1
loop jmp incr , >adj
gate jmp clear

This allows for custom bomb placement, not one instruction next to the scan location... but it adds another line to adjust two parameters. I wan't able to solve this, still it feels like it should be possible some way or another. Ideally the adj-instruction needs to do jmp att, >shoot (but only once!)...

Roy van Rijn

unread,
May 8, 2013, 7:41:44 AM5/8/13
to
> It bombs a location whose neighbor was just determined to be empty, the small gain you get from sparse-coloring core may not be worth the extra instruction.

What might work better is the following, the only drawback is bombing backwards:

times equ 375
step equ 234;7523
span equ 8
bmboff equ 14

bomb spl #1 , }-bmboff

for 11
dat 0 , 0
rof

att mov.ab scan , adj
incr sub.f clear , scan
shoot mov.i bomb , <scan
scan seq.i scan+2+(times*step) , @scan+2-span+bmboff+(times*step)
adj jmp att , >shoot
loop jmp incr
gate jmp clear , #100

for 8
dat 0 , 0
rof

clear spl #step , }step-1
mov.i b , >gate
djn.f -1 , >gate
b dat <2667 , }16

end shoot

John Metcalf

unread,
May 14, 2013, 12:03:38 PM5/14/13
to
On Tuesday, May 7, 2013 6:32:29 PM UTC+1, pauld...@aol.com wrote:
> Maybe better to change seq to jmz, save a line and have .33c scanning with .33c bombing.
>
> P. Kline

Something like this? Only inc needs to be adjusted to switch from bombing to clear.

John

;redcode-94nop
;name Rusty
;author John Metcalf
;strategy scanner / bomber -> scan directed clear
;assert CORESIZE==8000

step equ (-536)
gate equ (scan-4)

scan mov sbmb, >ptr
add inc, ptr
jmz.f scan, *ptr

ptr mov.ab #step+1,#1-step
inc sub.b #step, #-step-1
djn scan, ptr

sbmb spl #1, 1
clr mov dbmb, >gate
djn.f clr, {gate
dbmb dat 1, 3-gate

end scan+2

P. Kline

unread,
May 15, 2013, 8:22:37 AM5/15/13
to
On May 14, 11:03 am, John Metcalf <digital.wildern...@googlemail.com>
wrote:
> Something like this?  Only inc needs to be adjusted to switch from bombing to clear.

Nice! You convert the bombing part of the bombing-scanner into a
forward spl-wipe.

With HSA I found this spl works pretty well:

spl #0,}0

which is invisible to the scanner unless it is being executed, and if
it is the tail of an imp then you get a repeated wiping effect.

That spl 1,1 might cause problems for the djn in the clear.

P. Kline

fizmo

unread,
May 16, 2013, 11:01:32 AM5/16/13
to
> Something like this? Only inc needs to be adjusted to switch from bombing to clear.
>

One could also use a sd-clear instead of a d-clear. That would give some extra points against paper/imps.

Except that one that are called "For John" ;-)
0 new messages