SugarScape

Here is the daddy of The Sims and Animals from Animal Crossing. It is one of the first simulation based on intelligent agents. Each agent is a program which follows simple rules of life. Our agents live in a sugar field and have to survive by eating sugar. Each box in the space contains 0 to 4 servings of sugar. Sugar grows back regularly. The darker the box, the more sugar it contains. Each box accepts a maximum number of sugar.

You can see at the bottom of this page the process I followed to program them.
For more information on Sugarscape, visit wikipedia.
Click on the 'launch' button to begin the simulation

Agents procreation

Launch
Reset parameters

Mechanisms

The agents (Sugarscapiens)

The game will be enriched in stages. Every agent (called Sugarscapien) born with a field of view, sugar stock and metabolism.
  • - He observes his surroundings and goes to the hut that contains the most sugar.
  • - It collects all the sugar
  • - It consumes sugar according to its metabolism.
  • - He is trying to have a child with a partner
To be continued...

Birth

An agent can have children if he is of the minimum age and has a certain amount of sugar. If he finds a partner of the opposite sex in an adjacent square, a new Sugarscapien appears.
At birth, this child inherits half of the sugar stock from his parents and their characteristics (vision, metabolism ...)

Starting parameters

  • Initial population : Population at the beginning
  • Agent vision: Number of cells within the maximum vision radius of agents
  • Sugar growth time: Time before adding a unit in each box.
  • Minimum age: Minimum limit for procreation
  • Minimum sugar stock : below this limit, an agent can't have a children

The dashboard

  • Current population
  • Population distribution: Under childbearing age / in childbearing age / above maximum age
  • Stock of the richest : sugar !
  • Oldest's age : the age of the oldest of living agents
ArcadeVillage.com 1999 - 2024