Coder Social home page Coder Social logo

cells's Introduction

Principle

Fun little cellular automata simulation with cells, viruses and food particles. This project is highly inspired from carykh's virus simulator, except that cells are round, move, can divide (and some other things). Also this is optimized to allow simulations to run very fast (with a reasonable number of objects).

Quick explanation:

  • Cells have codons which are all describing an action like eat, move hand or repair itself. They repeat all their codons in circle and eventually divide or die whether they were able to get enough energy (mainly from food) or not.
  • Viruses are inactive packs of codons floating in space forever until they meet a cell in which case they infect them by injecting all the codons they contain. With the right codons, you can make a virus that exploits a cell into making more viruses.
  • Food particles are very simple, they wander in space and can be eaten by cells when they are in range. Cells and viruses keep track of the food that was eaten by them (cells) or put into them (viruses) such that when they disappear they give back to the space to amount of food they took, thus allowing to maintain conservation of energy and not making the simulation go too much crazy.

Build

Requirements

  • cmake
  • sfml

Instructions

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j4
./cells

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.