Skip to content

A program which writes its own programs in the brainfuck language using genetic programming techniques. The user specifies a desired output and this program generates a brainfuck program capable of producing that output.

Notifications You must be signed in to change notification settings

void4/Brainfuck-Evolved

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brainfuck-Evolved

A little while back I had learned about genetic algorithms, and became very excited with the concept. After researching them a bit and playing around with them, I figured it'd be cool to see if I could apply genetic programming techniques myself. I didn't expect much initially, but I was impressed with the final result.

The program uses a genetic algorithm to select and breed brainfuck programs that are scored by how closely their output matches the desired output, using an internal brainfuck interpreter I wrote. Beginning with an initial randomly generated population, this process is repeated over and over again, until finally a brainfuck program is created that can output strings such as "Hello, world!" or whatever else the user wants.

Usage

To make the script executable:

chmod +x run.sh

To compile and launch the program:

./run.sh

About

A program which writes its own programs in the brainfuck language using genetic programming techniques. The user specifies a desired output and this program generates a brainfuck program capable of producing that output.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.8%
  • Shell 0.2%