All composite goals call this method each update step to process their
subgoals. The method ensures that all completed and failed goals are
removed from the list before processing the next subgoal in line and return
ing its status. If the subgoal list is empty,
completed is returned.
template <class entity_type>
//remove all completed and failed goals from the front of the subgoal list
while (!m_SubGoals.empty() &&
(m_SubGoals.front()->isComplete() || m_SubGoals.front()->hasFailed()))
Goal-Driven Agent Behavior
Figure 9.7. The final design. The figure shows three examples of concrete classes used
by the Raven bots.