Agents can be thought as small algorithms based on a set of rules whereby different reactions can be simulated when encountering different situations.
There are two main type of agents : dumb agent and intelligent agent. The former behaves according to the same rules and cannot modify them, the second one is able to learn from the environment in which is placed and infer decisions.
There are several type of agents which are classified according to the type of mechanism that drives their behaviour. This can be constituted by simple movement rules, trail formation or even physical particle properties.
One of the most interesting type of autonomous agents are what what is called “Boids”, first conceived by Craig Reynolds. Every entity of this system behaves according to only three rules: cohesion within the swarm, alignment to the direction of flock members, and repulsion when another entity comes too close in order to avoid collision.