We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

EdgeBounce

From Esolang
Jump to navigation Jump to search

EdgeBounce is an esolang by User:ChuckEsoteric08.

Description

It uses a binary array as data, initially having a single zero. It also has a direction, which is a boolean with values "left" and "right", initially being "right". It has following instructions:

  • * - flip current bit.
  • > - if data pointer would not overflow if it is moved it is moved one step in the current direction. If it would it adds a new zero bit as the next bit in the current direction, moves to it and reverses the direction.
  • [...] - a loop which runs while current bit is 1. Can be nested

Computational class

EdgeBounce is Turing-complete as it can simulate Cyclic tag system without halting. First define as length of initial data queue. Start program with >>>, define integer as 3 and then until would become do:

  • add >'s.
  • increment by 1.

Then add >>*>>>>>>, then initialize initial data, 0 becoming *>>> and 1 becoming *>>*>, then after it is initialized, add >>>*>>>>>> and then >'s. Then add >>>>>>>>>[ and then we translate the productions:

  • 0 becomes:
>[>>>]>[
 >[>>>] *>>>
 >>> >>>>>> [>>>] >>> [>>>] >>> [>>>]
 > >>>> [>>>] >>> [>>>] >>> [>>>] 
 >>>> >>>>>>> [>>>] >>> [>>>] >>> [>>>]
 >> >>>> [>>>] >>> [>>>] >>> [>>>] 
 *>>>>> >>>>> [>>>] >>> [>>>] >>> [>>>]
 *>>> >>> [>>>] >>
]
>[>>>]>>>[>>>]
>>> >>>>>> [>>>] >>> [>>>] >>> [>>>]
> >>>> [>>>] >>> [>>>] >>> [>>>] 
>>>> >>>>>>> [>>>] >>> [>>>] >>> [>>>]
>> >>>> [>>>] >>> [>>>] >>> [>>>] 
*>>>>> >>>>> [>>>] >>> [>>>] >>> [>>>]
*>>> >>> [>>>] >>>
  • 1 becomes:
>[>>>]>[
 >[>>>] *>>*>
 >>> >>>>>> [>>>] >>> [>>>] >>> [>>>]
 > >>>> [>>>] >>> [>>>] >>> [>>>] 
 >>>> >>>>>>> [>>>] >>> [>>>] >>> [>>>]
 >> >>>> [>>>] >>> [>>>] >>> [>>>] 
 *>>>>> >>>>> [>>>] >>> [>>>] >>> [>>>]
 *>>> >>> [>>>] >>
]
>[>>>]>>>[>>>]
>>> >>>>>> [>>>] >>> [>>>] >>> [>>>]
> >>>> [>>>] >>> [>>>] >>> [>>>] 
>>>> >>>>>>> [>>>] >>> [>>>] >>> [>>>]
>> >>>> [>>>] >>> [>>>] >>> [>>>] 
*>>>>> >>>>> [>>>] >>> [>>>] >>> [>>>]
*>>> >>> [>>>] >>>
  • Each production ends with:
>[>>>]* >[>>>]>>>[>>>] 
>>> >>>>>> [>>>] >>> [>>>] >>> [>>>]
> >>>> [>>>] >>> [>>>] >>> [>>>] 
>>>> >>>>>>> [>>>] >>> [>>>] >>> [>>>]
>> >>>> [>>>] >>> [>>>] >>> [>>>] 
*>>>>> >>>>> [>>>] >>> [>>>] >>> [>>>]
*>>> >>> [>>>] >>>

Program ends with ].

Reading current state

If length of the initial data was odd tape remains the same, if even it is reversed. Then our tape looks like;

000 100 100 ... 100 000 edv edv ... edv 000 100 100 ... 100 000
    trash bits          data queue           trash bits

When we look at the data queue it is represented by a triplet edv

  • e is 1 for all bits
  • d is 1 if deleted, 0 if not
  • v represent the value

This structure also does * once per each bit, which means it is Turing-complete even with this restriciton.

See also

  • Brainfuck minus - - proves that Brainfuck with the same restriction is Turing-complete.