Git Product home page Git Product logo

simulation's Introduction

simulation

Simple life simulation

description

Creatures spawn randomly on canvas with 0.5% chance. Instead of brain, they have simple neural network that receives as input: id of their generation, remaining energy, direction, and if there is another creature nearby, other id and energy. Initially they have 10 energy points. Each turn, they can do one of following actions: move (spends 2 energy points), reproduct (spends 4 energy points and creates new creature in empty cell), attack (spends 1 energy point and kills chosen creature in cell near them), and rest / healing (spend 1 energy point). When energy runs out, creature dies. If creature is born: it has 10% chance to be born with full energy, otherwise it will have same amount of energy as parent. There is also 1% chance of "mutation", one of neurons in newborn creature will chang.

image

Legend

  • Creature inner background color is generated randomly when mutated
  • Green border color - reproduction
  • Yellow border color - movement
  • Red border color - attack
  • White border color - healing

image image

simulation's People

Contributors

arfost avatar ya7on 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.