Code Monkey home page Code Monkey logo

picdna's Introduction

PicDNA v0.6.2

A ReLogo intelligent* agent based simulation

Tries to gracefully link two randomly generated two-dimensional maps of objects with different shapes, sizes and colors.

In package picdna.relogo you will find:

Anything else you will see on this repo is pretty much a bunch of tweaks on a default Relogo Framework for Repast Simphony 2.1 Eclipse project.

How to use

  • Install Repast Simphony 2.1
  • Clone the repo on Repast Simphony 2.1 bundled Eclipse workspace: git clone https://github.com/elcodedocle/PicDNA
  • Create a new ReLogo project on Repast Simphony 2.1 bundled Eclipse named PicDNA (File->new->ReLogo Project)
  • Run the simulation from Eclipse (CTRL+F11 runs the last selected profile)

OR

(If installer hangs on 5th or 6th step just close it, the program will be installed anyway. Versions up to v0.5 run nice on Repast Simphony 2.0 using Java SE 6 U31)

How it looks

It looks different every time! This is a snapshot after a few steps running on default settings:

Simulation snapshot

How it works

The first approach was:

Pressing power (+Setup button before v0.6) button does the following setup:

  • Divide the whole 2D-world area horizontally into three parts of equal size
  • Generate two static random maps, one on the left side and one on the right side, represented by locked (passive, never change their position, shape, color or size) visible agents
  • Make a hidden superposition of both maps in the middle area (by cloning left and right agents on their relative positions and setting their visibility to hidden)

After this, the simulation runs by pressing > play button (Go button before v0.6) for continuous playback or >> button (Step button before v0.6) for one-step playback.

Then, on each step:

  • Generate a random number of dynamic (can move along the middle area, have a random lifespan) agents at random positions with random color/shape/size on the middle area
  • Passive hidden agents on middle area act as attractors/repellers of dynamic agents with similar/different properties (size/color/shape)
  • Passive, not hidden, agents on left and right areas and active (dynamic) agents on middle area act as repellers/attractors of dynamic agents with similar/different properties (like magnets, just the opposite from above)
  • Active agents who have reached their (random) step lifespan die

Only one extra feature was later added to this approach:

  • Apart from their position, active (dynamic) agents can change their other properties (color/shape/size) on each step to better fit their environment according to the previously defined rules

Also, many controls were added to allow runtime modification of the weights, randomness and random distributions of the behavior-defining heuristics associated with each property of the agents (color/shape/size/position).

TODO

  • Use simpler and more visually recognizable patterns in left and right Maps generation**
  • Dynamic lifespan (when a dynamic agent is in a good/bad environment its lifespan increases/decreases)

* Intelligent meaning independent state machines that sense and interact with the environment, changing their internal state accordingly, but without any long term memory based learning capacities (as in some sort of combination between reinforcement learning and decision tree machine learning techniques)
** Rather than just taking samples from common probability distributions, in order to easily appreciate how the agents combine both maps' properties generating an original brand new pattern which, under these conditions, should also be easily recognizable when looking at the simulation output.

picdna's People

Contributors

elcodedocle avatar

Watchers

 avatar  avatar

Forkers

blackaceatzworg

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.