Code Monkey home page Code Monkey logo

cyberbiology3's Introduction

CyberBiology

Artificial evolution

This is a little entertainment project, evolution simulator. Every little cell on screen ("a bot") has its own little neural net. Bot makes moves based on output layer data, it can produce energy via photosynthesis, attack other bots, move and divide. When dividing bot creates a copy of his brain, but there is a chance it will mutate a little in the process.

What's new?

  • World is now larger than the screen, use arrow keys to move your camera

  • You can now save entire worlds, including parameters set in Adaptation window!

    You already have a super cool world in "SavedObjects/" directory called the Divers! In it bots have to dive to the bottom of the screen to multiply and photosynthesis is only available above water, so they dive up and down and evolve! I only saved a small fraction of it because othervise the file was too large. But it doesn't matter, they will fill the world quickly.

Screenshots

Screenshot1 Screenshot2

What you need to build it

  • SDL

  • Dear Im GUI

  • ImPlot

Interface

Main window

Contains all info about simulation

Controls

  • Start/Stop button (Pause/unpause)
  • PS reward - how much energy a bot gets with one tick of photosynthesis
  • skip - how many turns you calculate before you draw new frame (set to 0 if you want to render every frame)
  • brush - brush size for mouse actions sich as remove (eraser tool)

Selection

Info about selected bot, some useful buttons to mess with it

Display

Rendering method.

  • Bot natural color (just its color)
  • Bot rations (carnivores red, herbivores green, grey if never ate, blue if eats apples or organics)
  • Energy (yellow = low energy, red = maximum energy)
  • No render means you only compute without rendering, starts to simulate very fast

Mouse function

Choose what to do with your mouse clicks

Aditional

Some more windows

Keyboard

Using keyboard is more handy because interface becomes laggy during simulation

  • "Space" - Start/Pause
  • "Plus sign near numpad" - make 1 step
  • "F1" - Spawn a group of random bots
  • "F2" - Create vertical wall
  • "Numpad 1-4" - Select rendering method
  • "Home" - Set camera at X = 0
  • Arrow keys (left, right) - Move camera
  • "Page Up", "Page Down" - Move camera fast
  • "End" - Find first bot on screen

How to use Settings file

First of all you need to setup your screen resolution, otherwise you wouldn't see the interface. After that you change your rendering area width ("FieldRenderCellsWidth") and world height ("FieldCellsHeight") to match your screen. World can be wider than your render area, but you have to keep its width divisible by 16 without a remainder, it's needed for multi threading.

All changable parameters are listed in that file.

cyberbiology3's People

Contributors

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