Coder Social home page Coder Social logo

biovm's Introduction

BioVM

Artificial life using the Brainfuck-like language, which mimics Tierra.

screen shot

Instruction Set

Extended Brainfuck by adding pointer registers r1 and r2.

Defined in Form1.cs:

private string[] mnemonic = new[]
{
    /* 0 */ "halt",
    /* 1 */ "inc r0",
    /* 2 */ "inc r1",
    /* 3 */ "inc r2",
    /* 4 */ "dec r0",
    /* 5 */ "dec r1",
    /* 6 */ "dec r2",
    /* 7 */ "mov r0, [r1]",
    /* 8 */ "mov r0, [r2]",
    /* 9 */ "mov [r1], r0",
    /* a */ "mov [r2], r0",
    /* b */ "while [r1]",
    /* c */ "while true",
    /* d */ "wend",
    /* e */ "rand r2",
    /* f */ "join r2",
};

Code Template

Self-replicating code that starts the mutation. r1 points to the address of the self, and copies it to the random address r2. join r2 gives it life.

Defined in Form1.cs:

private byte[] Template = new byte[]
{
    0xc, // while true
    0xb, //   while [r1]
    0x7, //     mov r0, [r1]
    0x2, //     inc r1
    0xa, //     mov [r2], r0
    0x3, //     inc r2
    0xd, //   wend
    0x5, //   dec r1
    0xb, //   while [r1]
    0x5, //     dec r1
    0x6, //     dec r2
    0xd, //   wend
    0x2, //   inc r1
    0xf, //   join r2
    0xe, //   rand r2
    0xd, // wend
    0x0, // halt
};

biovm's People

Contributors

7shi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.