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

  1. avoid collisions
  2. run away from dog (fast) - back away?
  3. follow other sheep (match direction)
  4. move randomly - idle
  5. move to tasty grass

Updated:    18 Nov 2022 / Responsible Officer:    Director, School of Computing / Page Contact:    Josh Milthorpe / License:    CC BY-NC-SA 4.0