Control several children

Composites own several child tasks and decide their traversal order, stopping rule, and final status. Use the simplest Composite whose rule matches the decision.

Composite Use it when
Selector Alternatives should be tried until one succeeds.
Sequence Ordered steps must all succeed.
Parallel Several branches should run together and all must succeed.
Parallel Selector Several branches should race until one succeeds.
Priority Selector GetPriority() should determine child order.
Utility Selector GetUtility() should be compared every tick so the highest-utility available child can replace the current branch.
Random Selector / Random Sequence Valid alternatives or independent steps should be shuffled.
Selector Evaluator Fixed-priority children should be reconsidered every update.

Parallel Complete finishes with the status of the first child that completes. Use Random Selector or Random Sequence only when every shuffled order remains valid.

Continue

Flow illustrates the main traversal rules. Common Behaviors shows how Composites express gameplay goals.