Research Article

Strategic Team AI Path Plans: Probabilistic Pathfinding

Algorithm 2

Path QualityPathPlanForWholeTeam ()
     Path pathOfWholeTeamSoFar = null;
     While (TeamPathPlanNotComplete ())
      pathOfWholeTeamSoFar + =
   ProbabilisticPathForOne (pathOfWholeTeamSoFar);
  
    Return pathOfWholeTeamSoFar;
 Path ProbabilisticPathForOne (Path
 pathOfWholeTeamSoFar)
        Path currentMemberPath = null;
        Path temp = null;
        do
           currentMemberPath += selectANextNode ();
            do
                temp = pathOfWholeTeamSoFar +
 currentMemberPath.selectADifferentNode ();
      while (FitnessTest(temp) == fail);
   while
 (currentMemberPath.SearchNotComplete ())
   return currentMemberPath;