Boolfuck: Difference between revisions

From BusyBeaverWiki
Jump to navigation Jump to search
Loader3229 (talk | contribs)
No edit summary
HelpMe (talk | contribs)
added more values
Line 2: Line 2:


== Language Overview ==
== Language Overview ==
Boolfuck operates on an array of memory cells, each initially set to false.
Boolfuck operates on an array of memory cells, each initially set to <code>False</code>.


Like in a [[Turing machine]], there is a pointer, initially pointing to the first memory cell.
Like in a [[Turing machine]], there is a pointer, initially pointing to the first memory cell.
Line 22: Line 22:
|-
|-
|<code>[</code>
|<code>[</code>
|Jump forward past matching <code>]</code> if current cell is zero
|Jump forward past matching <code>]</code> if current cell isn't
|-
|-
|<code>]</code>
|<code>]</code>
|Jump back to matching <code>[</code> if current cell is non-zero
|Jump back to matching <code>[</code> if current cell
|}
|}


== BB_boolf ==
== Boolfuck Busy Beaver ==
'''BB_boolf(n)''' returns the maximum true cells count a program with n instructions can have when halting.
'''Σ<sub>boolf</sub>(n)''' returns the maximum <code>True</code> cells count a program with n instructions can have when halting.
{| class="wikitable"
{| class="wikitable"
!n
!n
!BB_boolf(n) (Score)
!Σ<sub>boolf</sub>(n)
!Score Champion
!Example Champion
|-
|-
|1
|1
|1
|= 1
|<code>*</code>
|<code>*</code>
|-
|-
|2
|2
|1
|= 1
|<code>*></code>
|<code>*></code>
|-
|-
|3
|3
|2
|= 2
|<code>*>*</code>
|<code>*>*</code>
|-
|-
|4
|4
|2
|= 2
|<code>*>*></code>
|<code>*>*></code>
|-
|-
|5
|5
|3
|= 3
|<code>*>*>*</code>
|<code>*>*>*</code>
|-
|-
|6
|6
|3
|= 3
|<code>*>*>*></code>
|<code>*>*>*></code>
|-
|-
|7
|7
|4
|= 4
|<code>*>*>*>*</code>
|<code>*>*>*>*</code>
|-
|8
|= 4
|<code>*>*>*>*></code>
|-
|9
|= 5
|<code>*>*>*>*>*</code>
|-
|10
|= 5
|<code>*>*>*>*>*></code>
|-
|11
|= 6
|<code>*>*>*>*>*>*</code>
|-
|12
|= 7
|<code>*[>*>>>*<<<]</code>
|-
|13
|≥ 8
|<code>*[>*>>>*<<<]*</code>
|-
|14
|≥ 11
|<code>*[>>*[<<<*<]>]</code>
|-
|15
|≥ 12
|<code>*[>>*[<<<*<]>]*</code>
|-
|16
|≥ 15
|<code>*[>>*[[<<<]*<]>]</code>
|-
|17
|≥ 31
|<code>*[>*[>>*[<<]*>]>]</code>
|}
|}



Revision as of 09:22, 8 November 2026

Boolfuck is a variation of Brainfuck where cells store booleans instead of integers. Boolfuck is Turing complete.

Language Overview

Boolfuck operates on an array of memory cells, each initially set to False.

Like in a Turing machine, there is a pointer, initially pointing to the first memory cell.

Programs are composed of commands, represented with symbols:

Command Operation
> Move pointer right
< Move pointer left
* Flip current cell
[ Jump forward past matching ] if current cell isn't
] Jump back to matching [ if current cell

Boolfuck Busy Beaver

Σboolf(n) returns the maximum True cells count a program with n instructions can have when halting.

n Σboolf(n) Example Champion
1 = 1 *
2 = 1 *>
3 = 2 *>*
4 = 2 *>*>
5 = 3 *>*>*
6 = 3 *>*>*>
7 = 4 *>*>*>*
8 = 4 *>*>*>*>
9 = 5 *>*>*>*>*
10 = 5 *>*>*>*>*>
11 = 6 *>*>*>*>*>*
12 = 7 *[>*>>>*<<<]
13 ≥ 8 *[>*>>>*<<<]*
14 ≥ 11 *[>>*[<<<*<]>]
15 ≥ 12 *[>>*[<<<*<]>]*
16 ≥ 15 *[>>*[[<<<]*<]>]
17 ≥ 31 *[>*[>>*[<<]*>]>]


[page under construction]