Boolfuck: Difference between revisions
Jump to navigation
Jump to search
Loader3229 (talk | contribs) |
Loader3229 (talk | contribs) No edit summary |
||
| (4 intermediate revisions by 3 users not shown) | |||
| Line 104: | Line 104: | ||
|} | |} | ||
''' | '''BlF(n)''' returns the maximum runtime of a halting program with n instructions. | ||
{| class="wikitable" | {| class="wikitable" | ||
!n | !n | ||
! | !'''BlF(n)'''<ref>https://discord.com/channels/960643023006490684/1243312334907375676/1346489746787926056</ref> | ||
!Example Champion | !Example Champion | ||
|- | |- | ||
| Line 120: | Line 120: | ||
|- | |- | ||
|3 | |3 | ||
| | |= 3 | ||
|<code>*>*</code> | |<code>*>*</code> | ||
|- | |- | ||
|4 | |4 | ||
| | |= 4 | ||
|<code>*>*></code> | |<code>*>*></code> | ||
|- | |- | ||
|5 | |5 | ||
| | |= 5 | ||
|<code>*>*>*</code> | |<code>*>*>*</code> | ||
|- | |- | ||
|6 | |6 | ||
| | |= 8 | ||
|<code>*>*[<]</code> | |<code>*>*[<]</code> | ||
|- | |- | ||
|7 | |7 | ||
| | |= 10 | ||
|<code>*>*[*<]</code> | |<code>*>*[*<]</code> | ||
|- | |||
|8 | |||
|= 14 | |||
|<code>*[>*>*<]</code> | |||
|- | |||
|9 | |||
|= 18 | |||
|<code>*[[>]<<*]</code> | |||
|- | |||
|10 | |||
|= 30 | |||
|<code>*[>*[<]>>]</code> | |||
|- | |||
|11 | |||
|= 35 | |||
|<code>*[>*[<]*>>]</code> | |||
|- | |||
|12 | |||
|= 72 | |||
|<code>*[>*[<<*<]>]</code> | |||
|- | |||
|13 | |||
|≥ 120 | |||
|<code>*[>*>*[<*<]>]</code> | |||
|- | |||
|14 | |||
|≥ 158 | |||
|<code>*[>>*[<<<*<]>]</code> | |||
|- | |||
|15 | |||
|≥ 276 | |||
|<code>*[[>*[<<<]>]>>]</code> | |||
|- | |||
|16 | |||
|≥ 352 | |||
|<code>*[>>*[[<<<]*<]>]</code> | |||
|- | |||
|17 | |||
|≥ 871 | |||
|<code>*[[>*>*[<]<]>*>>]</code> | |||
|- | |||
|18 | |||
|≥ 7,981 | |||
|<code>*[[>>*[<]*<]>>>*<]</code> | |||
|- | |||
|19 | |||
|≥ 32,167 | |||
|<code>*[>*[>>*>]<[<<]*>>]</code> | |||
|- | |||
|20 | |||
|≥ 4,359,966 | |||
|<code>*[*>*[<<]*>>>*>[>]<]</code> | |||
|- | |||
|21 | |||
|≥ 505,033,483,078 | |||
|<code>*[>>*[[<]*<[>>]*>*]>]</code> | |||
|} | |} | ||
[page under construction] | [page under construction] | ||
== References == | |||
[[Category:Functions]] | [[Category:Functions]] | ||
Latest revision as of 11:33, 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 is False
|
]
|
Jump back to matching [ if current cell is True
|
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 | *[>*[>>*[<<]*>]>]
|
BlF(n) returns the maximum runtime of a halting program with n instructions.
| n | BlF(n)[1] | Example Champion |
|---|---|---|
| 1 | = 1 | *
|
| 2 | = 2 | *>
|
| 3 | = 3 | *>*
|
| 4 | = 4 | *>*>
|
| 5 | = 5 | *>*>*
|
| 6 | = 8 | *>*[<]
|
| 7 | = 10 | *>*[*<]
|
| 8 | = 14 | *[>*>*<]
|
| 9 | = 18 | *[[>]<<*]
|
| 10 | = 30 | *[>*[<]>>]
|
| 11 | = 35 | *[>*[<]*>>]
|
| 12 | = 72 | *[>*[<<*<]>]
|
| 13 | ≥ 120 | *[>*>*[<*<]>]
|
| 14 | ≥ 158 | *[>>*[<<<*<]>]
|
| 15 | ≥ 276 | *[[>*[<<<]>]>>]
|
| 16 | ≥ 352 | *[>>*[[<<<]*<]>]
|
| 17 | ≥ 871 | *[[>*>*[<]<]>*>>]
|
| 18 | ≥ 7,981 | *[[>>*[<]*<]>>>*<]
|
| 19 | ≥ 32,167 | *[>*[>>*>]<[<<]*>>]
|
| 20 | ≥ 4,359,966 | *[*>*[<<]*>>>*>[>]<]
|
| 21 | ≥ 505,033,483,078 | *[>>*[[<]*<[>>]*>*]>]
|
[page under construction]