Friday 20 April 2012

Intelligent Agents in a simulated environment

The following video and the description is about a Agent simulation that I have designed and implemented. I would like to give my gratitude to the "Intelligent Agents" module director 
Dr. Sam Steel at the University Of Essex for his supervision throughout the module.

The simulation shows an "Agent-world" represented by a grid of squares. Agents survive in this world by eating plants. There are four types of plants that occur in various quantities. Agents are able to consume a combination of plants and gain more energy. The energy levels decreases as they live and as they roam to other squares in the gird. Creatures can carry a limited amount of plants so then can eat when it is needed. If the creatures can create two combinations at once then the most energetic combinations of plants will be eaten first.



In the “Agent world” there could be maximum of two types creatures in the world.

The agent types:

SimpleCreature: Less intelligent creature.

IntelCreature: Most intelligent creature.

SimpleCreature:

A simple creature will be born in the agent world with a limited amount of energy. The creatures move around the world in random directions in a consecutive manner, for random amounts of times, with an intention to feed to survive. A simple creature can carry a limited amount of plants. This creature eats plants when it's energy goes down less than it's energy limit. (When it feels hungry) The creature is able to consume compounds(CP)of plants (P) of varied types (t) that they carry, and gain more energy than it would if it eats them individually. Such that:

CP = {Pt1, Pt2, Pt3, Pt4}

Creatures can only see the plants in the same square as it is. When the world has been resized, eventually the creatures will follow back in to the world. Each individual creature has got a unique ID. This phenomenon has been recorded on the video.

The simulated environment in which the creatures act:
The “Agent world” is a grid of squares. The plants and the creatures will be in this grid.


IntelCreature: 

Only an IntelCreature can look around. These creatures can only see only one square around ahead, as well as the square it is interpolated. They can also see the the plants as well as the creatures in its range of vision.



The creature can remember the creatures and the plants in the squares that it can see (This memory is limited). Although the vision is perfectly accurate only within its local square. Just after it has been born, IntelCreature will be in an Observation mode, so that it will observe the world by capriciously observing the world until it finds more than one plant. Then it will start going after the plants intentionally that it sees around. A creature may decide to go after plants that are more therapeutic than the others. Such plants may be the plants that could complete a combination.

If two creatures meet together in one square they start talking to each other, asking about the plants that the other creature carry. Then the first creature will propose to the other creature for a shared combination, with the amount that it would like to share. Such that:

Assume:
combo1 = P1 + P2 + P2
Ag1:Plants = {P1, P3, P3, P1}
Ag2:Plants = {P2, P2, P3}

Then:

Ag1: Ag2.requestCombo(<share_amount>, <plant>)

If the other creature agrees then they will consume the plants and share the energy amount. When they share the plant combinations, they will get the double the amount of the normal combination, hence it is more desirable for the creatures to share. The creatures can decide to be partners with another one, and go for other plants that one of the creatures have seen. Furthermore when the creatures are in the same square, they may request other creatures to be parters, a creature will request to be a partner of another creature, if the plant the second creature is going after, interests the first creature. If the second creature agrees to be partners, then it will make a leader and partner relationship between each other. The first creature that made the request will be the partner and the other will be the leader.  After the leader gets the plant, the energy amount will be shared. Finally the partnership will end and the two creatures will go their own ways. In the situations where the plants that are subject to the partners engrossment have been taken by some other creature, the partnership will immediately end. When the partnership has been made, the colour of the red circle, will change to a light yellow colour if it is a partner, and the colour of the leader's circle will change in to dark yellow. This is demonstrated in the figure blow.


A creature can make partnership with another one, only if the both of the creatures are neither a partner or a leader. If the creatures do not carry any plants and it can not remember any plants, it goes back to the Observation mode to collect information about the world(Grid). If the creature can not carry any more plants, it will stop travelling to save the amount of energy that it will loose by going to other squares.

What are plants?:
  • There are four types of plants in the world.
  • Green plants, Red plants, Yellow plants, and Magenta plants.
  • The plants are represented in small squares with the colour of their names.
  • Each plant holds different energy levels.
  • A plant set consists of a set of random types of plants.
  • The plant sets appears in the “Agent world” in arbitrary places.
  • The amount of the plants that will be put in to the grid is variable. 
  • In the world there will be a constant amount of plants at a time.
  • The size of the “Agent world” is variable.
  • The number of types of plants are in the world are variable.
  • The energy of creatures will be consumed until it dies. The energy consumption speed is variable.
  • If the creature moves to a different square, more energy will be consumed than if it stays in the same square.
The log output of the software which show
  • what a particular simple creature does
  • what a particular creature that looks around does
  • the interaction of a two creatures who meet 

The above description about the "AgentWorld" is just a brief introduction about the project. Accordingly there are many other theoretical and technical details that I have not introduced to you in this article. Although if you are interested, I am happy to supply you with further details on this project.

1 comment:

  1. Great information.Thanks for sharing this useful information about Project simulation

    ReplyDelete