The challenge is to write a brainf*** program that searches sequentially through memory for the first NON-zero cell.
The program should start somewhere in fairly low memory (there will probably be some overhead/counters/etc.). Once the program starts checking cells, it should continue to the right, checking every cell in sequence until it reaches the first non-zero cell, then stop.
Testing will be performed for several random cells and values. Examples might look like: m(13) = 1, or m(144) = 137, or m(983) = 231. The actual values will be randomly generated once and used for all entries. The cell values of 1 and 255 will also be tested.
Scoring - different from the usual
- code golf, lowest score wins
- in the case of a tie, earlier entry wins
- any continuous series of identical commands that changes pointer position or cell value counts as 1 point.
> 1 point > > 1 point > > > > > > > > > > > > > > > > > > > > > > > > > > 1 point < < < < < < < < < < < 1 point + + + + + + 1 point - - 1 point [ opening a loop = 1 point ] closing a loop required, so 0 points one point for EACH input or output . . 2 points . . . . . . 6 points , 1 point , , 2 points (not that anyone would ever do this)
The python 3 program I will use for scoring is found here: