The final rules are not yet agreed upon; this is a draft version.
The Brainfuck implementation
There is no standard for Brainfuck, and different implementations usually vary
in memory size, cell size and wraparound rules. The implementation used for
Brainfuck Golf is a rather strict one.
- The only instructions used are < > - + , . [ ], anything
else is a comment and not considered a part of the program (including newlines).
- No special terminating character is used.
- Cells can contain values from 0 to 255.
- Incrementing 255 or decrementing 0 results in a fatal error.
- Memory is unbounded to the right.
- Attempting to go to the left of the starting cell is a fatal error.
- "," returns 0 on EOF.
- Unbalanced brackets are a fatal error.
- After EOF is reached ("," returns 0), further atempt to use
"," will result in a fatal error.
- If the problem specifies that input is not used, "," cannot be used
at all. Trying to use it will result in, you guessed it, a fatal error.
- Programs are limited to 64K.
The shortest (fewest Brainfuck instructions) program wins. If many authors
submit the same program, they all win.
If two or more different programs are tied for the first place, the one that uses the
least memory wins. This is determined by the rightmost position of the memory
pointer reached during execution.
If programs are still tied, each one is considered a winner.