Friday, 31 October 2008

tiny Twilight

Here's the code for Twilight, my most successful tiny warrior so far. When this entered SAL's tiny hill in 24th place two years ago, I didn't expect it to last long!

I'm surprised to see it's still on the tiny hill age 79. Currently it's in 10th place, the best position to date :)

;redcode-tiny
;name Twilight
;author S.Fernandes
;strategy oneshot v1

;assert CORESIZE == 800

; entered the hill on 12 Mar 2006 in 24th place
; still on the hill on 31 Oct 2008, age 79, 10th place

org scan
step equ 24
gap equ 6
first equ loop+step*5

ptr dat first+gap-1 , first-1

dat 0 , 0

x dat 1 , 9
clr spl #350 , 12
mov *x , >ptr
mov *x , >ptr
djn.f clr+1 , }clr

for 2
dat 0 , 0
rof

loop add inc , ptr
scan sne *ptr , @ptr
djn.f loop , *ptr
djn.f clr , ptr
inc dat step , step
end

Wednesday, 22 October 2008

Neo's Mini Challenge - The Results

Neo's Mini Challenge is over and the results are in. Seven players entered, 6 of who discovered an optimal solution - 1 line, 1 process, 100% ties.

Neo and I entered the following code:
mov }0, }1

Ilmari and John entered this:
mov.i #1, *1

While Roy and Rashnok used a variation on the above:
mov.i #1, }1

Finally, mjp entered code which expands to a 6 line imp:
mov 2, @1
djn -1, #6
mov 0, >6

Roy suggested an interesting alternative which Neo will hopefully adopt as the next challenge.

Sunday, 19 October 2008

Neo's Mini Challenge

After a break of four years, Neo has relaunched the Mini Challenges, starting with Harmless Overrun.  To take part, you need to write an imp capable of passing through an imp gate:
gate: jmp 0,<-5
end gate

The aim is to tie 100% of the time with the shortest possible code. Good luck to everyone taking part.