Busy-Beaver Interpreter

by Ricardo Fernández Serrata

Version 1 (March 29, 2021)

Download (6 downloads)

2/3 symbol BB Turing Machine. Supports base 2 and 3 (binary and ternary) alphabets.

Source code must be written using the same language and format as shown in Wikipedia, EXCEPT that each state is inputted separately (cleaner code and easier to parse), AND each "OPCode" is delimited by spaces to allow arbitrary state names (without spaces)

There's support for BrainFuck-like pointer-shifting/head-movement (this "< >" and "- +" chars). Staying still (static head/pointer) is allowed, even though it's considered against the rules.

The 2-state BB shown in Wikipedia can be inputted like this:
A
1 + B
1 L B
[*Press OK button*]
B
1 0 A
1 > H
[*Press OK button, then CANCEL button*]

{ptr & 0x80000000} is used to get the sign bit of the pointer. The standard defines the tape as unbounded on both sides, this is internally implemented as 2 arrays, the left being reversed.

ℹ en.wikipedia.org/wiki/Busy_beaver

4.5 average rating from 2 reviews

5 stars
1
4 stars
1
3 stars
0
2 stars
0
1 star
0
Reports
0

Reviews and ratings can be submitted in the app.