Sunday, 9 November 2008

Thoughts on Corewar...

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

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.