top of page
Amoeboids  <Scroll to bottom for a download link>
 
Introduction
The original intent of this project was to create a system that uses an oscillating signal to create an emergent behavior - inspired by a Ted talk about the slime mold physarum polycephalum. A link to more details about this slime can be found in the references. The resulting application does not achieve this in full, but provides a foundation on which this could in the future be implemented. The Ameoboids project does however, demonstrate how emergent behaviors can form from agents following simple rules.                    

Amoeboids Overview

What is an Amoeboid?

An Amoeboid is an amoeba-like structure consisting of multiple agents

who link together and use cooperation to avoid predators and seek out food.

 

 

 

 

 

 

 

The amoeboid exists within a system that comprises of the three following parts:

 

 

 

                   Agent - The main body of an amoeboid consists of agents. An agent forms links with nearby other agents and can only move by manipulating the push/pull forces between itself and its nearest neighbors. Parameters for fear and attraction dictate the behaviors of the connections between agents. More detailed analysis of agents and their behaviors can be found below.

 

 

 

                   Food -  Food attracts agents and is consumed on contact. The amount of food present at a given time is set to a fixed amount. When one is eaten, another one is randomly placed somewhere else on the field.

 

 

 

                   Monster - Monsters are independent creatures who seek out agents and other smaller monsters to eat. They have much larger vision range than agents and do not form any connections. Upon reaching a certain size a monster becomes two monsters, each at half the size.

 
Agent Behavior
Single Agent Physiology
Agents have the following characteristics (listed alphabetically):
  • Alpha Signal  - Higher alpha increases separation strength. This signal is denoted by the color green.
  • Beta Signal - Higher beta increases cohesion strength. This signal is denoted by the color red.
  • Bravery - a multiplier which reduces the effect of the beta signal (fear).
  • Gamma Signal - Denoted as blue, this is transmitted from agents with at least 6 neighbors. Has no effect on behavior.
  • Hunger - a multiplier which reduces the effect of the alpha signal (attraction).
  • Noise - randomly adds or subtracts small amounts from the stored alpha, beta, and gamma values.
  • Number of Neighbors - the number of links between itself and other agents
  • Size - the size of the ellipse which represents the agent
  • Vision Range - number of pixels within which an agent may sense its surroundings
  • Decay Rates - Individual decay rates for alpha, beta, and gamma that differ based on number of neighbors
 
Agents can perform the following actions:
 
  • Pulse a signal - sends current alpha, beta, or gamma signals to neighbors and sets current value to 0 for a short duration
  • Sense surroundings - checks for food, monsters, and other agents
 
 
Link Strength Algorithm
 
 
 
 
 
 
 
Cohesion:
For each neighbor:
1. Determine a vector towards that neighbor
2.  Multiply that vector by the following
DistanceScaling:             visionRange/( distance - visionRange)^2
FearScaling:                    1/(1-beta/bravery)
Cohesion Intensity:          constant set by slider
InnerAgent Multiplier:     0.7 if agent has 6 neighbors, otherwise is 1
3. Constrain the resulting vector between realistic bounds. (I used -3 and 3 pixels)
4. Subract the cohesion vector from the current location vector
 
Design thoughts:
This algorithm results in a cohesion strength that is maximal when the neighboring agent is near the edge of vision range.
Also, there is less cohesion if an agent has 6 neighbors because it can be held mostly in place by trying to separate from all its surrounding neighbors. If cohesion is too high for an inner agent then the amoeboid is likely to clump up.
 
Separation:
For each neighbor:
1. Determine a vector towards that neighbor
2.  Multiply that vector by the following
DistanceScaling:             1/distance
AttractionScaling:           1/(1-alpha/foodLevel)
Separation Intensity:       constant set by slider
InnerAgent Multiplier:     1.2 if agent has 6 neighbors, otherwise is 1
3. Constrain the resulting vector between realistic bounds. (I used -3 and 3 pixels)
4. Add the separation vector from the current location vector
 
Design thoughts:
This algorithm results in a separation strength that is maximal when the two agents are near each other. Using the cohesion and separation algorithms in conjunction with each other results in an equilibrium distance between agents that can withstand some pushing and pulling before breaking.
 
 
Agent Communication
 
Each signal type has a value between 1 and 255, corresponding to a red,green, and blue value of the agent's outline. Pulse functions for each signal type are unique with specific resting periods and pulse frequency.
 
Alpha - green - increases separation
Beta - red - increases cohesion
Gamma - blue - can be used for agents to estimate amoeboid size (not implemented)
 
Pulse Function :
If the respective signal is above a low firing threshold (set to 20) then:
For each neighbor:
If the pulse counter for this signal type is greater than its resting time:
1. Targeted neighbor's signal value becomes the sum of the pulsing agent and its current value
2. Reset the pulse counter to 0 for the target neighbor
3. Set current value of that signal type to 0 and current pulse counter to 0.
4. Tell the neighbor to pulse. (this makes the function recursive until the signal decays)
 
Design thoughts:
Recursion is key for the pulse to propagate through multiple agents. A resting period during which the agent cannot pulse allows time for the amoeboid to react to the signal.
 
 
Agent Decision Logic
Agents do nothing unless there is a presence within its short range of vision. There are a few types of stimulus that can affect an agent. The important note here is that sensing a monster sets the attraction parameter, alpha, to 0.
 
Sensing Food - an agent will become green and will increase its separation with its neighbors
Sensing Monster - all signals related to food are set to 0,the agent will become red and cohesion will increase with neighbors
Sensing Agent - an agent will form a link if it has less neighbors than is allowed
 
 
References and Credits
All algorithms produced for this project are based entirely on heuristics and are without any formal mathematical foundation. Inspiration for the algorithms came from class lectures for this module taught by Professor Nasuto and from the book "Web of Life" by Frijt Capra. Additional inspiration came from a Ted.com talk about physarum polycephalum titled "What humans can learn from semi-intelligent slime" by Heather Barnett.
 
Download the application & source code
 
 
Amoeboid
Cohesion distance scaling
Cohesion Distance Scaling
y-axis: multiplier
x-axis: distance
Inner Agent, surrounded by 6 neighbors
A link between agents
Example of an Amoeboid eating as a result of increased separation of an outer agent.
Example of an Amoeboid fleeing as a result of increased cohesion of an outer agent.
bottom of page