This page is to demo a basic Robot Controller Architecture work using a general-purpose logic programming language, Prolog.
An Agent is to act the wold. It has an ability to visualize the world, and make up of a body and a controller.
- The body likes a nerve of the system that affects and perceive the world.
- The controller likes a brain agent perceiving or responding command. It has to reason, compute, make a decision, and response.
- Perceive: what going in the world (giving information)
- Reason: Think about given information, come with a plan, and make decisions.
- Act: Strategies, take actions and impact the environment.
Figure 1. Controller Architecture
The general controller architecture is described in Figure 1 which includes Top layer Controller, Middle Layer Controller and Environment.
The robot trap is run as a demo in Figure 2. The robot is started at its position, and is given a goal to G.
The logic is followed:
- Top layer issue that goal to the middle layer.
- The middle layer tried to forward the goal to the right.
- However, it sees the obstacle, and cannot keep going, then it moves to the left.
- Then, the obstacles again, turn into left.
- It always keeps tacking to move the right because the goal is in the right until it is actually moving to the right.
- Then, it heads to obstacles again and again.
- Top layer Controller
- Middle Layer Controller
- Environment
if whisker sensor = on
then steer := left
else if straight ahead(robot pos, robot dir, current target pos)
then steer := straight
else if left of (robot position, robot dir, current target pos)
then steer := left
else steer := right
end if
See documentation of robot Controller Architecture here
Agent Architectures and Hierarchical Control in: Poole, D. L., & Mackworth, A. K. (2010). Artificial Intelligence: foundations of computational agents. Cambridge University Press. Available online at http://artint.info/