Behavior Types

From ABL
Revision as of 15:06, 1 April 2015 by Andrew (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

ABL has three basic behavior types: sequential, parallel, and collection. Additionally, sequential and parallel behaviors may be joint, meaning that entering the behavior must be coordinated with external agents.

This document explains what occurs when a behavior is chosen for execution by the ABL Decision Cycle. Initially the behavior is inserted into the Active Behavior Tree. The following sections cover what happens next for the appropriate behavior type.

Sequential

A sequential behavior is in closest analogy with the function call in traditional single-threaded programming. Without behavior annotations, in a behavior with n steps, the ABL Decision Cycle will root the first step in the behavior at that behavior in the Active Behavior Tree. Behaviors are required to have at least one step. When the step is executed, then

  • if it succeeded, the next step in the behavior is rooted at that behavior.
    • if there is no next step, the behavior is succeeded, and success propagates up the Active Behavior Tree as necessary.
  • if it failed, the behavior is failed, and failure propagates up the Active Behavior Tree as necessary.

Syntax

sequential behavior Identifier ( ( AblSimpleType (, AblSimpleType )* )? ) { ( Step )+ }

Parallel

When a parallel behavior is chosen for execution, every step in it gets added to the conflict set.

Syntax

parallel behavior Identifier ( ( AblSimpleType (, AblSimpleType )* )? ) { ( Step )+ }

Collection

A collection behavior is a parallel behavior in which each step is implicitly effect only.

initial_tree is a collection behavior.

Footnotes

<references/>