In general this is just a Brainfuck Virtual Machines. But there are some differences to Urban Müller's Brainfuck:
* Von-Neumann architecture: Code and Data reside in same memory
* Multi-threading: This Brainfuck VM supports multi-threading (command 'Y' forks)
* Stack: I've added commands to push ('^') and pop ('V') data from a stack (command '$' sets stack pointer to current data pointer)
* Memory is simulated to be endless in both directions. Therefore there is a command to terminate a thread ('*')
* I've also added statistical errors (mutations): 1) Cosmic-ray mutation: Random bits in memory are mutated 2) Instruction error: Some instructions are ignored
(but errors/mutations are of course very rare)
* Command ',' doesn't read from keyboard, but from a random number generator
* Also note that all memory is initialized randomly (except for locations where a program is loaded)
Then I wrote some basic programs, which were able to reproduce and started the Virtual Machines. It's quite interesting to see how programs compete while overwriting each other. The random mutations then are a motor for evolution and some different programs evolve. Sometimes two programs reproduce to the same location and therefore do secual reproduction. If the resulting program is able to reproduce itself, a new species evolved, and I viewed a lot of newly-evolved species.
Source code is now available at GitHub:
https://github.com/jgraef/replifuck
@aljoshabre
The source code can be found at GitHub. I've put the URL into the video description.
There is no documentation at all (except for the F1 key in the program). But I wrote some comments into the source code - especially into the source code of the brainfuck programs.
schneemann1991 3 months ago
I'd love to see the source code of this VM of yours; if it's well commented/documented(?).
aljoshabre 3 months ago