SequentialAndLink

From OpenCog
(Redirected from SequentialOrLink)
Jump to: navigation, search

The SequentialAndLink and SequentialOrLink are a type of Link which are used to group a set of Atoms in a sequential manner, such as in the case of action execution through Embodiment.

Evaluation of a SequentialAndLink wrapped inside a SatisfactionLink will proceed in sequential order, one by one, until the first clause that evaluates to false. In this case, the SatisfactionLink returns false as well; if all clauses succeed, the SatisfactionLink returns true.

Evaluation of a SequentialOrLink proceeds similarly, except that termination halts with the first successful evaluation. Thus, SequentialOr is a kind of fallback device. It is logically equivalent to (NotLink (SequentialAndLink (NotLink ...))).

The behavior tree page shows an example of using a SequentialAndLink to trigger a series of actions; the actions are run in order; the next action is not performed unless the previous action returned TRUE_TV. A working example can be found in the SequentialAnd unit test. A large application can be found in the ROS behavior tree code.

PLN Semantics

In PLN a SequentialAndLink is used in temporal reasoning as well, see Temporal_Reasoning#AndSeq for more info.

See also