On 19 Dec 2008, at 08:37, Kerim Aydin wrote:
Ok, I've got a Brainfuck Joust tournament runner working. Before
making this
an official contest I'd like to see if the rules are interesting.
(I tried a
few random warriors and it looks ok, or at least it seemed like it
wasn't
wholly degenerate). Anyone willing to write a warrior or three?
(I wrote
three in about 20 minutes, all less than 20 characters). If
submitted to
me to help test before the "Agoran" contest begins, I won't share
or study
the code. Tournament runner code available on request. When I get
five or
more warriors and/or a few days have passed I'll run a test
tournament and
share results (though will not share code until some Official Agoran
Contesting).
Rules for test:
1. A Jousting Match between two BF programs consists of 20 Charges.
For each Charge:
2. Two BF programs face off on the "jousting" array (the standard BF
memory space, shared). Each BF's code is not part of the array.
No code
size limit. The length of the array is 151 +/- 16 (uniform random
each
Charge, exact length is unknowable to the code). No code length
limit.
3. Each program's array pointer starts at one far end of the array,
on its flag. Each flag starts at 128. All the other cells
(between the
two opponents' flags) initialized to 0 (reminder: these are unsigned
chars with 255+1=0).
4. Standard BF code, except that IO (. and ,) do nothing.
5. 'The enemy's gate is right'. > is defined for each program as the
direction (at the start of the round) towards the enemy's flag, and
< is
the direction away from the enemy's flag.
6. Code execution is simultaneous between competitors, but [ and ]
comparisons for both competitors occur before + and - (only place
order matters in a cycle). + and - are cumulative. Every symbol
takes
one cycle to execute.
7. Winning The Charge:
a. If your flag is set to exactly 0, you lose (tested after each
cycle).
b. If your pointer runs off either end of the array (one step
past either flag) you lose.
c. If you both lose simultaneously, you both lose.
d. If you cease execution (reach end of your code), you do not
lose, though of course the opponent then has free reign on
the array for the remainder of the charge.
e. If 1000 cycles pass with no winner as above, you both lose.
f. If the opponent loses and you don't, you win!
8. Scoring: 1 point for winning a Charge, 0 for ties or losses.
9. A full tournament is a full pairwise round robin of jousting
matches, with scores summed for the final winner.
-Goethe
seems very easy
[129 +s, then a large, large amount of >s]