NetLogo banner

Home
Download
Help
Forum
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

  Donate

NetLogo User Community Models

(back to the NetLogo User Community Models)

[screen shot]

Download
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".(The run link is disabled for this model because it was made in a version prior to NetLogo 6.0, which NetLogo Web requires.)

This program uses a genetic algorithm to evolve an optimal forager.
The foraging goal is find the most red pixels.

Agent Behavior:
Agents are each given a genome which assigns values to three parameters:
1)off-food turniness
2)on-food turniness and
3)memory depth
Agents decide how much to turn by interpolating between on and off food
turniness, using their memory. If an agent has just seen food, it will turn
according to a tent function with a width equal to two times the value of the gene.
The tent function is always centered at the animals present heading. If an
agent hasn't seen food in a long time, then it will do the same using its
off food turniness gene. Agents use their memory depth gene to determine
how quickly they move from on food behavior to off food behavior. Agents with
a higher value, will behave as if they are near food for longer than agents
with a low memory depth value.

Algorithm Behavior:

Agents are created for each new generation using a combination of better genomes from the last generation.
The "evolve" button does the following:
set generation (generation + 1)
if (generation > generations ) [stop]
compete
do-best-of-generation-plot
grow-landscape
mate-recombine
mutate
rebirth

compete: agents move around and collect resources by bumping into them.
do-best-of-generation-plot: plots the best harvest
grow-landscape: regrows the landscape to prepare it for the next generation
mate-recombine: this procedure only allows the best half of the agents to create offspring.
the offspring are the recombined genomes of these genomes.
mutate: this goes through genomes and randomly changes genes based on the mutation rate.
rebirth: this assigns genomes to new agents.

I'm sure I forgot a few things in explaining this, but that's basically what it does. There are
a lot of different assumptions that go into any genetic algorithm; I make different assumptions
on different days. There are still a few things I would like to fix but have never had the time
to do so. If you'd like to contact me, please do at thills@mail.utexas.edu.

Created by Thomas Hills.

(back to the NetLogo User Community Models)