Behaviors and the Subsumption Architecture
The subsumption architecture provides a way for designers to organize independent behaviors that combine to produce the desired result [Brooks91]. This approach has the advantage that it's very simple to implement and remains fully predictable.
The subsumption architecture is known as an arbitration mechanism. The technique is used to select—or arbitrate—between multiple agents (for instance, behaviors or components) that compete over control for the same outputs.
Augmented Finite-State Machines
The subsumption architecture is based on a detailed process that involves creating intricate control networks. These are known as augmented finite-state machines (AFSMs), which are essentially finite-state machines with built-in timers that allow the state to change after a short delay [Wray94].
The inputs to the AFSMs are sensory values, and the outputs correspond to the effectors. When the inputs exceed a certain threshold, the AFSM is activated and an output is produced.
This approach makes it easy to manipulate the flow of information. Two techniques are used: suppression overrides inputs, and inhibition restricts the output. Multiple AFSMs can collaborate together using these mechanisms. This makes subsumption architectures well suited to controlling robots and animats.
Despite being seemingly complex under the hood, conceptually the architecture is interpreted as a layered approach. Each layer corresponds to a behavior associated particular output. The behaviors are layered vertically; the ones at the top have the highest priority and have the luxury of subsuming layers with lower priority—as shown in Figure 45.2.
The layered approach also allows for simpler integration of existing components. Each layer can be considered as a black box whose output can be overridden by other layers. The passing of control between the layers can be understood as a Boolean condition.
Implementation and Optimizations
The implementation of an AFSM is very similar to a standard state machine, except there are timers built in that can trigger state changes. By using message-passing mechanisms as the transitions, inhibition and suppression are supported by overriding messages.
Because the behaviors are considered as components with a hidden implementation, however, we'll take a layered approach that does not depend on AFSMs. Instead, each level of the hierarchy can override the output of layers with lower priorities. This is implemented by a traversal of the layers, starting with the highest priority and traversing downward. When the component is active (that is, the condition is true), the output inhibits all other layers and the iteration stops. The output of the highest priority behavior is used as the action.
As far as optimizations go, the original model suggests that each layer is run asynchronously. With the layered approach, the traversal identifies the active behavior, and only that will be simulated. Also, during the traversal, common Boolean tests can be cached to prevent recomputation, and each of the lower layers can assume the higher-priority tests are false.