Showing posts with label neogryzor. Show all posts
Showing posts with label neogryzor. Show all posts

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,   *1
mov.i #4, *1
mov.i #4, *1
mov.i #4, *1
mov.i #4, *1
By adding a loop, I managed to reduce the initial size to two instructions:
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.

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.