Fuzzy Brainfuck

From Esolang
Jump to navigation Jump to search

Fuzzy Brainfuck is an extension of Brainfuck inspired by the success of recurrent neural networks. It is a programming language with a continuous program space and its interpreter is end-to-end differentiable and compatible with normal Brainfuck program, specifically the 8-bit wrap-around dialect. It is meant to be a proof-of-concept for differentiable programming language.

The interpreter being differentiable allows training of programs with gradient-based methods.

The language is directly inspired by Neural turing machines. The difference is that neural turing machines have black-box neural network controller, meanwhile, Fuzzy brainfuck has an explicit instruction set.

Interpreter

Here's an implementation of Fuzzy brainfuck in Tensorflow: https://github.com/Py10lolz/Fuzzy-Brainfuck.

Inner Workings

In Fuzzy Brainfuck, instructions are probability distribution over Brainfuck's instruction set. Bytes are replaced by probability distribution over all the possible 256 values and this change applies input, memory, and output.

How these instructions influence input, output, memory, and the instruction flow are better explained at https://github.com/Py10lolz/Fuzzy-Brainfuck/blob/main/INNERWORKINGS.md.

In summary, Fuzzy brainfuck softens a binary circuit Brainfuck interpreter with cannonical softening of boolean operations: NOT(x) = 1-x, AND(x, y) = xy, and OR(x, y) = 1-(1-x)(1-y).