Extendibility and Reusability

There was one prime goal during this whole project: To make the whole program and concept extendible. There are many abstract classes providing uniform interfaces to allow very different environments to run side by side in one world or allow identical access to agents of different environments.

Some functions (like the abstract environment classes functions) need to be implemented by every subclass of the superclass. Others, like the communication concept for environments and agents (Percepts and Actions), are optional. It is recommended that the current functions are used for future implementations of different environments, but other solutions are always possible.

Using the World class to display different environments

World was specifically designed to allow any round by round environment simulations. Many Environments can be set within one applet, whether they are Wumpus or Vacuum environments or a three-dimensional simulation of our solar system. Each environment gets its own display area and is simply called upon to proceed one simulation step.

The example MxN and Wumpus Environments

The MxN environment and its Wumpus subclass are designed as examples for two-dimensional grid environments. With only relatively small changes, it could be changed into a Vacuum environment, or new features like agents shooting each other could be added.

The Percept and Action system

The Percept and Action system used for communication between environment and agent should be useful for any round-based simulation with active objects in it.

The Field class

The Field class also can be used in many environments, though it needs to be subclassed for graphical reasons (different environments will paint their fields objects different).

The Resource Loader

The purpose of this Resource Loader is simple: To provide easy access to images (and, in the future, other resource types), and also to save memory and loading time by only keeping one instance of every resource.

Navigation:


Last modified June 97