![]() |
|
Navigation
![]() Last updated: 2004-04-28
|
The agent framework
![]()
Introduced in: 0.3 Refactorings: 0 Developed by: Treefinger Latest iteration in: 0.3 Latest iteration by: Treefinger Overview
The agent framework contains classes and interfaces for building agents. An agent is some sort of actor in the world, be it an adventurer, a rabbit or a talking tree. Anything goes. The framework uses a controller to submit "actions" to the world and registers "sensors" which subsequently receives information from the world. Controllers
The controller can either be an AI that decides what to do, or it can be a human controlling it through some sort of interface. We have implemented a GUI for controlling the Haphazard agent and abstracted common functions to the GUIController. This includes for example notification on resize. To be able to show controller specific information to the user, we implemented an interface HUD (Heads-up display) which can draw information on top of the normal view a user has. Actions
When an action terminates (succeeds, fails, stops), its controller is notified and can take an appropriate action if it has chosen to implement the callbacks provided. An action that involves more than the "performer" is called an interaction. If an object in the world can take part of an interaction, it must implement the interface Interactable To facilitate reuse and be nice to the memory, there is an ActionPool which reuses actions. Sensors
|