GithubHelp home page GithubHelp logo

mavjs / erikdoe-crellinor-rust Goto Github PK

View Code? Open in Web Editor NEW

This project forked from erikdoe/crellinor-rust

0.0 0.0 0.0 164 KB

An artificial life / genetic programming simulation

License: GNU General Public License v3.0

Shell 3.44% Rust 86.13% JavaScript 5.22% HTML 3.42% CSS 1.79%

erikdoe-crellinor-rust's Introduction

Crellinor

Crellinor is an Artificial Life / Genetic Programming simulation. It places creatures into a world in which they have to survive. The creatures lose one energy point per cycle, and they can eat plants to regain a number of energy points. That's the artificial life part. The creatures have individual programs that determine their behaviours. These programs are made up of simple instructions such as EAT or TUL (for turn left). When two creatures run into each other and certain criteria are met then they mate and produce offspring. The offspring's program is created from the programs of both parents. That's the genetic programming part.

You've probably ended up here because you saw my Ready for Rust talk and wanted to see more of the code. Well, here it is. The actual version used in the talk is tagged rfr-talk.

If you want to run the simulation you'll notice that there isn't much documentation. Your best bet it is to read the source code and get an idea of how the simulation works. The tests in tests/integration_tests.rs could be a good entry point.

Once you get a feel for the simulator you should edit multiverse.rs. At the top of the file you can set how many simulations you want to run and how many threads should be used in parallel. Just below is a function named make_world(). It creates the worlds that should be simulated. The name given to the world is used as a directory name in which the individual simulation results are stored as JSON files.

You might find the scripts in the scripts directory useful to process the results. They produce CSV files which lend themselves to be loaded into spreadsheets.

Once you have identified an interesting run, you can restart the run with a web UI to observe what happened. Add the command line options to load the log file as a starting point and to run the web UI.

cargo run --release -- -wf output/<name>/log-<UUID>.json

The UI is available at http://localhost:3000.

erikdoe-crellinor-rust's People

Contributors

erikdoe 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.