Looks like the contest has some reasonable rules, so a proto:

Brainfuck Joust

This is a [PROTO-] public contract and (if permitted by the Rules) a 
Contest.  Goethe is the contestmaster; members and Agoran courts SHOULD 
generally defer to eir adjudication of disputes if the need arises.  
Goethe CAN terminate the contract by announcement.  Any section of the 
contract text may be changed by Goethe w/o three objections from members.  
The section of the contract labeled "CURRENT TOURNAMENT" may be changed 
by Goethe by announcement, provided e has announces eir intent to make 
the specific change a week or more in advance.  Any player may join this
contract by announcement.

A "program" is a program written in the Brainfuck (BF) programming 
language, with possible modifications specified in the CURRENT TOURNAMENT.

The Hill is a list of the current top ten highest-ranked BF programs 
submitted to the Current Tournament.  

Any player (member or non-member) may submit up to three BF programs a week 
for Challenges by emailing them to Goethe.  Once a program is submitted, it 
CANNOT be withdrawn.  Goethe CAN submit programs up to three/week as well, 
but CANNOT receive points for them, and SHOULD only do so to keep the 
tournament interesting for all.  Goethe CAN remove or add programs to the 
Hill (other than through Challenges, below) only by announcement by 
giving a week's notice of specific intent to add/remove.

A Challenge consists of competing a submitted program (the Challenger)
against each program on The Hill, and competing all programs on The Hill
against each other, and the programs ranked according to the CURRENT 
TOURNAMENT.  The program with the lowest rank is dropped from The Hill, 
and the challenger is added to The Hill if it is not the lowest scorer.  
Goethe shall run a challenge for each legally submitted program in the 
order it is received, and announce the results of each challenge.  The
time that the challenge is deemed to occur is the time of Submission.

REVEALING:
  1. When a program has been on the hill continuously for a month, 
     Goethe SHALL publish its code.  Goethe SHALL NOT otherwise reveal 
     players' code (that Goethe did not write) to each other.
  2. When a program is dropped from the hill after being on the hill
     for two weeks or more, the submitter SHOULD reveal the code,
     but need not.
  3. A submitter MAY always share eir own code.
  
POINTS:
  When a program has been on the hill continuously for one week, or has 
  survived 5 challenges from other players (whichever comes first), it 
  becomes a Knight.  The Standing Rank of a knight in a given Nomic
  week is the rank it held at the beginning of the Nomic week if it was
  a knight at the beginning of that week, and 0 (lowest) otherwise.
  
  Each Nomic week, Goethe SHALL publish a message attempting to award
  points to contest members for each of the member's programs that
  were knights at the beginning of the Nomic week, according to the
  following schedule for the standing rank of each knight:
      8 points for highest ranking program;
      5 for second;
      3 for third;
      2 for fourth;
      1 for fifth;
      0 otherwise.
      
  It is expected that within submission limits, players might use
  multiple programs to achieve the highest aggregate score.
  
    
CURRENT TOURNAMENT (numbered items)
0.   The starting Hill shall consist of 10 programs, joust0..9, written
     by Goethe.  When the contest begins, any programs submitted to Goethe 
     before this tournament (or contest) started shall be entered as 
     Challenges in the order they were received, unless the submitter 
     retracted them before the contest started.
    
1.   A Jousting Match between two BF programs consists of 20 Charges.
     Each match is scored in Touches.  After all competitors on the
     hill (and the challenger) have faced each other in a match, programs 
     are ranked from most touches across all matches (best, highest) to 
     fewest touches (worst, lowest).

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.
For a single challenge, a single sequence of 20 array lengths will be
selected and the same sequence used for all matches in the challenge.
Between challenges, a new sequence will be chosen.

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 384000 cycles pass with no winner as above, you both lose.
    f.  If the opponent loses and you don't, you win!

8.  Scoring:  1 Touch for winning a Charge, 0 for ties or losses.  




Reply via email to