On Sat, 20 Dec 2008, Alex Smith wrote: > On Fri, 2008-12-19 at 00:37 -0800, Kerim Aydin wrote: >> 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. > Not that it probably matters, but: there are multiple equivalent > definitions of [ and ], which are the same except when counting cycles. > If the cell is 0 the first time round, is [ executed or both [ and ]? If > the cell is not 0 and it reaches a ], is just the ] executed or is the > [ executed as well? (Imagine a loop [-] where a different program > decrements the cell from 1 to 0 on the same cycle as the ] looks at the > cell and sees a 1; does the [ now run and see it as 0, or does the - run > next?)
Yes I should have included that: [ is executed as JMZ <matching ] +1> ] is executed as JMN <matching [ +1> So in your case [-] on a 1: Cycle 1: ] sees a one and loops, then competitor decrements to 0. Cycle 2: [ is skipped, - is executed decrementing to 255. (Note: chose the above implementation as it's probably most interesting for when we start allowing attacks on opponent's JMZ,JMN targets). -Goethe