
Wednesday, 19 November 2008
nanoWarrior #03

Wednesday, 12 November 2008
Neo's Mini Challenge - Roy's Idea
Roy suggested a tricky extension to Neo's Mini Challenge in rec.games.corewar:
Lets try to find a solution for this gate:
djn.f #0,>-5
(I haven't got one yet)
It appears a one instruction solution isn't possible. However, 5 players found a solution in two instructions. Congratulations to Ilmari, John, Rashnok, Roy and me! Also, well done to German and Lukasz who also discovered solutions, albeit slightly longer.
I discovered a five line imp:
imp mov.i #4, *1By adding a loop, I managed to reduce the initial size to two instructions:
mov.i #4, *1
mov.i #4, *1
mov.i #4, *1
mov.i #4, *1
imp mov.i #4, *1
djn.a imp, #0
John and Rashnok discovered the same 3 line imp and used a loop to reduce the size. Ilmari discovered a 2 line imp. Roy wrote a program to find 58 solutions by brute force!
Full details are on Neo's page for the Harmless Overrun Mini Challenge.
Sunday, 9 November 2008
Thoughts on Corewar...

Thoughts on Corewar is John Metcalf's Redcode programming blog, hosted at http://impomatic.blogspot.com. Since John's blog was last reviewed, both the name and design have changed.
The standard template has gone and the sidebar now contains a selection of useful rss feeds, including the latest posts from rec.games.corewar and the most recent additions to the infinite nano and tiny hills.
The most interesting recent posts have been about Semaphores in Redcode, which provide a means of implementing mutual exclusing in Corewar.
What I liked:
- Covers advanced programming topics
- The feeds make it easy to keep up-to-date
Room for improvement:
- More comments on the code would be handy
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
Subscribe to:
Posts (Atom)