Implementing behaviors using schema theory and OOP
We can easily define and implement behaviors using schema theory and Object Oriented Programming. The basic idea is to have a Schema class with three derived classes: Perceptual Schema, Motor Schema and Behavior. The Schema class will only have an optional method to control any other methods or schemas on that class.
- Perceptual Schemas have, at least, one function that takes some input data and returns a percept.
- Motor Schemas have, at least, one function that takes a percept as input and returns some data that represents an action.
- Behaviors have, at least, one perceptual and one motor schema,
and acts as the placeholder for local data.
- Behaviors can be primitive behaviors, which have only one perceptual and one motor schema.
- Behaviors can have multiple schemas or behaviors, acting as an “abstract behavior” for coordination.
- Releasers are implemented as separated perceptual schemas not tied to any motor schemas. Coordination of the releasers is implemented on the control method of the behavior, which will activate the proper motor schema when the releaser is satisfied.
Abstract behaviors and assemblage of behaviors
As stated before, abstract behaviors are used to encapsulate how to coordinate different behaviors that hace to be executed secuencialy or in parallel. However, for the formal representation, there are different ways to do so:
- Skills. Collect behaviors as a Reaction-Action Packages and combines them in a “sketchy plan.” → Need more info, investigate further
- Finite State Automatas. States determine a list of behaviors that are active. The releasers act as the input and the transition functions specifies next state for the given state and input.
- Scripts. A similar mechanism like FSA that uses templates of behaviors to abstract, using a causal-chain and a if-else chain (causal chain) to specify the main sequence of behaviors, which can be extended by using other sub-scripts → Need more info, investigate further
Notes References
20211217202757 Robot behaviors
20211229200605 Schema theory and behaviors
20210514183815 INDEX - Robotics
References
(Murphy 2000)
Murphy, Robin. 2000. Introduction to AI Robotics. Intelligent Robotics and Autonomous Agents. Cambridge, Mass: MIT Press.