This series of pages shows the steps in an A* search for finding a plan for key steps in managing a fire team for firefighting on a Navy ship. The team starts out in a repair locker, and returns their after the fire is extinguished. The goal of the team is to put the fire out, remove smoke and water, test the gases, return to the locker, and store their equipment. Before extinguishing, they must deenergize (turn the power off) and set boundaries. After extinguishing, they must test the gases, desmoke, and dewater. The possible actions in this simulation are extinguish, desmoke, dewater, set(boundaries), test(gases), estimate(water), go(fire), go(locker), equip, and store(equpiment). At each step in the demonstration, you are asked to figure out what it will do next.
The A* search algorithm keeps an "agenda" of states that it knows about but has not yet visited. The states on the agenda are weighted by the sum of the evaluation function and the cost to reach that state. In this demonstration, we sort the agenda so the first-listed state will always be the item picked next. Ties are broken by putting more recently-found states before older states with the same weight; actions are considered in the order listed above. After "visiting" a state, it is removed from the agenda and added to the "usedstates" list.
The evaluation function for this problem is the sum of numbers assigned to some of the facts and the absence of facts in states (i.e. it's a piece_eval): raging=34, smokey=27, watery=20, equipped=10, at(fire)=14, energized=7, boundaries=5, not(safe(gases))=9, not(estimated)=5.