University

08226 Artificial Intelligence

Assessed Coursework : Agents in Prolog

Contents

This is a report into the design and implementation of an agent world program, written in Prolog. This world contains agents, objects and energy units on a grid of fifty squares by fifty squares.

The agents move around the grid in a set direction until they bump into an obstacle (i.e. an object or another agent) or reach the edge of their known world (the edge of the grid). In both cases, the agents readjust their direction, by turning left, in order to continue moving about the grid.

Each agent has an initial energy of twenty-five, enough for twenty-five turns. This number decreases by one for every move the agent makes and for every turn the agent spends in a static state while turning. Located around the grid are fifty energy units. If an agent moves onto a square containing an energy unit, the energy unit is removed and the agent's energy credited by ten.

Once an agent has run out of energy, it is unable to continue, and is removed from the grid.

This report describes the design and implementation of the above in the following sections:

  1. Implementation of code for the basic FSM agents and their support functions.
  2. The Design of the Full specification agents and their support functions.
  3. The implementation of the Full specification agents.
  4. The testing of the FSM agents.
  5. Extension of the Full specification agents.
  6. Appendicies

 


© 2006 Chris Peck. All rights reserved
Website designed by Chris Peck (www.chrispeck.co.uk). All content by Chris Peck unless otherwise stated.

Search


powered by FreeFind