Skip to content

A program which generates its own simple brainfuck programs using a genetic algorithm.

License

Notifications You must be signed in to change notification settings

kurtjd/brainfuck-evolved

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brainfuck: Evolved

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.

As of now, the program is only really capable of producing trivial brainfuck programs that simply output a string. Perhaps in the future I will tweak it to be able to incorporate actual logic into the brainfuck programs that it evolves.

Build Procedures

g++ interpreter.cpp interpreter.h main.cpp -o bfevolved

Run

./bfevolved

About

A program which generates its own simple brainfuck programs using a genetic algorithm.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages