Intelligent Agents
Following on from our previous session on agent-based modeling, in these two sessions we’ll work on implementing a system in which a goal-directed agent (sheepdog) aims to herd a collection of unintelligent agents (sheep).
Environment
Our starting environment is very simple: a square, flat field in which locations can be specified using Cartesian coordinates (x,y). Unlike the previous agent simulations, coordinates are continuous (agents can be located at any point in the simulation space). This means that when considering interactions between agents, we need to think carefully about distance and collisions.
Agents
Our agents are all animals: a flock of unintelligent sheep, and a single (hopefully, intelligent) sheepdog. Each animal has the following state:
- location (x,y)
- direction (angle, where 0 radians == due east/right)
- speed
Beyond that, our agents may have different behaviours, based on rules followed in order of priority. Some example rules include:
Sheep
- avoid collisions
- run away from dog (fast) - back away?
- follow other sheep (match direction)
- move randomly - idle
- move to tasty grass