Skip to content

AIMA3e Agent Framework

Rüdiger Lunde edited this page Jul 14, 2019 · 21 revisions

About the design of the agent framework

AIMA3e does not force developers to use special classes to implement agents and environments. It only requires to implement some fundamental interfaces defined in package aima.core.agent, e.g. Agent and Environment. For convenience some quite general implementations are provided in package aima.core.agent.impl, e.g. SimpleAgent and AbstractEnvironment. Most classes and interfaces are generic. Parameter P defines the type for percepts and A the type for actions. The type parameters can be bound to any type without restrictions. However, the return type Optional<A> allows all agents to say "I don't want to do anything" in a standardized way. As can be seen from the following class diagram, responsibilities are defined as suggested in the textbook with one exception: The environment is additionally responsible for controlling the simulation. For this purpose, a step method was introduced and a general implementation added to AbstractEnvironment.

Agent framework classdiagram

The following sequence diagram shows how environment and agents collaborate during one simulation step.

AbstractEnvironment step sequence diagram

Domain-specific examples of agent and environment implementations can be found in other packages, e.g. aima.core.environment.vacuum. The aima-gui sub-project contains many graphical applications and command line demos which support experiments with all kinds of agents. The aima.gui.demo.agent package provides a good starting point (see e.g. the TrivialVacuumDemo).