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

unpit

78 views
Skip to first unread message

pauld...@aol.com

unread,
Nov 25, 2014, 4:50:37 PM11/25/14
to
Flashback to the 70's: "These are cola nuts... these are un-cola nuts..."

(fyi, actor/dancer/director Geoffrey Holder passed away on October 5 this year)

Unpit is a streamlined version of TearsOfNu. Instead of jumping to a djn it jumps directly to the pit which is a dat 0,0 - the 'unpit'. Executing a fang increments the unpit which triggers the ssd wipe. If you are a single-process warrior you will arrive before the wipe and die, if you are slow like paper the unpit will be spl-wiped before you arrive and you will be trapped.

Examining recently published vampires showed a difference in the ssd-clears. Some use } and some use >. The first is more effective against a-imps and the second against b-imps. The 94nop hill currently holds 2 silks with b-imps, and several stones with a-imps, so you have to choose which to suffer most. Looking at the big array at koth.org you can easily tell which vamps are using which form of clear and which imps are in play. Neither is really good at killing imps but there is a clear difference.

After much testing and dithering I finally concluded that a 3-line wiper is not more effective than a 2-line one so eliminated one of the mov lines.

Before this week I was using a step-size that was picked after a short optimization run. Today I found better steps! One of them is on the hill, and another is here:

;redcode-94nop
;name Unpit
;kill Unpit
;author P. Kline
;assert 1==1
;strategy vamping with unpit

step equ 7389
first equ (unpit+step*491)

vamp sub.x incr ,}unpit
mov fang ,*fang
mov {unpit ,@fang
jmz.f 0 ,unpit
jmp wipes ,<wipeg

for 11
dat 0 ,0
rof
wipeg dat 0 ,0
wiped dat 1 ,#8
wipes spl #3600 ,#wipen-wipeg
mov *wiped ,>wipeg
mov *wiped ,>wipeg
djn.f -2 ,}wipes
dat 0 ,0
wipen dat 0 ,0

for 88-CURLINE
dat 0 ,0
rof
fang jmp >unpit-first ,>first
unpit dat 0 ,0
incr dat #step ,#-step

for 5
dat 0 ,0
rof
ps equ (2916)
airbag spl 2 ,{unpit+ps+step
spl 1 ,{unpit+ps+step*2
djn.f {vamp+3 ,{unpit+ps

end airbag




inversed

unread,
Nov 28, 2014, 4:51:29 PM11/28/14
to
Very nice vampire, perhaps the strongest one published. Maybe you should increase the spacing between the (un)pit and the airbag launch code just to be safe. Imagine the situation when a scanner finds the launch code, wipes it and the pit because it is so close and forces your warrior into clear mode prematurely.

On Wednesday, November 26, 2014 12:50:37 AM UTC+3, pauld...@aol.com wrote:

> Unpit is a streamlined version of TearsOfNu. Instead of jumping to a djn it jumps directly to the pit which is a dat 0,0 - the 'unpit'. Executing a fang increments the unpit which triggers the ssd wipe. If you are a single-process warrior you will arrive before the wipe and die, if you are slow like paper the unpit will be spl-wiped before you arrive and you will be trapped.

There is a nice side effect of using jmp > fangs. Half of the fangs are "broken" - they do not point to the pit. When some multi-process code is hit with a broken fang, it will spill its processes over the core because of the > addressing. There is a chance that some processes are spilled over the proper fangs and thus end up in the pit. So the broken fangs are not entirely useless in terms of stun power. Testing confirms: jmp > fangs work much better than jmp $ fangs and dat >0, 0 pit.

inversed

pauld...@aol.com

unread,
Nov 28, 2014, 6:53:09 PM11/28/14
to
On Friday, November 28, 2014 3:51:29 PM UTC-6, inversed wrote:
> Very nice vampire, perhaps the strongest one published. Maybe you should increase the spacing between the (un)pit and the airbag launch code just to be safe. ...

Thanks inversed. As a matter of fact one of the last things I did was to move the airbag launch from unpit by a few spaces and it did improve scoring against my scanner benchmark. I also tried to dat-zero the airbag launch but even those 3 little cycles with disappearing mov dropped the overall score.

> There is a nice side effect of using jmp > fangs. Half of the fangs are "broken" - they do not point to the pit. When some multi-process code is hit with a broken fang, it will spill its processes over the core because of the > addressing. There is a chance that some processes are spilled over the proper fangs and thus end up in the pit....

I hadn't thought about that but you are right on. I studied the 'dud' fangs with the possibility that they could be made to point to actual fangs but the math doesn't work:

d....c....b....a....FP....A....B....C....D

Where F=fang, P=pit, ABCD=fangs, abcd=duds. The gap grows with every cycle so there's no way to make one point to the other. You can throw a jmp bomb instead which you can arrange to point to real fangs, let 'd' = jmp >step*8+1 for example. Then after the 4th fang they will overlap for 4 fangs. Or 8 for 8 or 100 for 100, but there is a delay before the overlap which only lasts that long. And outside the overlap it's just a jmp into space and won't trigger the core-wipe. Against silk you want the core-wipe as soon as possible even if you don't get a jump into the pit.

unpit kills scanners very effectively now. Also other vampires :-) Oneshots are a problem and silk-imps and a-imp stones are the worst. Also Negative Thinking :-/ Reverse core-wiping was a bit better against NT, but unfortunately does not kill imps for me. More investigation required...

Another angle is to make incr and wipes the same instruction. Bring the wipe code up to the vamping loop and delete 'jmp wipes'. Change wiped to a mod, >wipe to }wipe, and reverse the a/b pointers. Now vamp falls through mod which reduces the step in incr/wipes to an appropriate wiping value. spl-spl-mod is an effective wipe, and it's two instructions smaller than unpit. But the remaining code makes a bigger target for scanners than the isolated vamp loop. I didn't spend a lot of time on it, maybe it could be made stronger.

P. Kline

inversed

unread,
Dec 3, 2014, 11:03:03 AM12/3/14
to
Tried the unpit with Carmilla, but there was no improvement compared to djn 0 pit. Anyway, here she is:
http://www.corewar.eu/corepaste/id.php?id=26

;redcode-94nop
;name Carmilla
;author inversed
;strategy One-hit scanning vampire
;assert CORESIZE==8000

; Defensive techniques employed:
; - Anti-trace: fangs point to the pit indirectly, making
; it less vulnerable to { or } bombing.
; - Spl instead of jmp to clear, leaving one process in the
; djn stream. If the clear is destroyed, there is still a
; chance of a draw.

step equ 5851
time equ 471
phaze equ step*time
dtrace equ 2*step

safe equ 16
djs equ -1
zclear equ (pit-cptr-2)
cptr equ (bptr-5)

gap1 equ 3
gap2 equ 7
gap3 equ 71

org start

bptr dat 0 , safe
cs0 spl # djs , zclear
clear mov @ cref , > cptr
mov @ cref , > cptr
cref djn clear , { cs0

for gap1
dat 0 , 0
rof

loop add inc , ptr
mov ptr , @ ptr
jmz.f loop , * ptr
mov ptr , * ptr
mov.x ptr , * ptr
jmz.f loop , pit
spl cs0 , < cptr
inc djn.f #-step , < step

for gap2
dat 0 , 0
rof

ptr jmp @ phaze , pit+dtrace-phaze
pit djn # 0 , # 0

for gap3
dat 0 , 0
rof

atrace jmp @ 0 , -dtrace
start mov atrace, > setup
mov atrace, @ setup
setup jmp loop+1, < pit+dtrace

pauld...@aol.com

unread,
Dec 3, 2014, 2:20:46 PM12/3/14
to
On Wednesday, December 3, 2014 10:03:03 AM UTC-6, inversed wrote:
> Tried the unpit with Carmilla, but there was no improvement compared to djn 0 pit. Anyway, here she is:...

Indirect jump works to prevent tracing the pit, but the fang is still vulnerable. And most a-bombing will be from silks which you WANT to trigger the core-wipe. Two thoughts at a cent apiece.

At Koenigstuhl unpit barely outscores Vamps are Back! So of course I'm continuing to develop it :-)

P. Kline
0 new messages