Planning with the USA-Advisor Marcello Balduccini, Michael Gelfond, Richard Watson Department of Computer Science Texas Tech University Lubbock, TX 79409, USA e-mail:{balduccini,mgelfond,rwatson}@cs.ttu.edu Monica Nogueira Department of Computer Science The University of Texas at El Paso El Paso, TX 79968, USA e-mail:monica@cs.utep.edu Abstract In this work we discuss planning performed by the USA- Advisor decision support system for the Space Shuttle. The USA-Advisor is a medium size, planning application for use by NASA flight controllers. This system contains over a dozen domain dependent and domain independent heuristics. A number of experimental results are presented, illustrating how this knowledge helps improve both the quality of plans as well as overall system performance. Introduction This paper is a report on the development of the USA- Advisor 1 - a decision support system for the Space Shut- tle flight controllers. The system is an example of the ap- plication of the answer set programming paradigm (Marek & Truszczynski 1999). Our goals in creating the USA- Advisor were two-fold. From a scientific standpoint we wanted to test if the rapidly developing answer set program- ming methodologies, algorithms, and systems could be suc- cessfully applied to the creation of medium size, knowledge intensive applications. From the standpoint of engineering, the goal was to design a system to help flight controllers plan for correct operations of the shuttle in situations where mul- tiple failures have occurred. While the methods used in this work are general enough to model any of the subsystems of the shuttle, for our initial prototype we modeled the Reac- tion Control System (RCS). The project consisted of two largely independent parts: modeling of the RCS and development of a planner for the RCS domain. In this paper we mainly concentrate on the lat- ter. More details of the modeling on the RCS can be found in (Barry & Watson 1999; Balduccini et al. 2001). In section 2 of the paper we discuss the RCS. Section 3 gives a general description of the USA-Advisor. In section 4 we describe the basic version of the planner. Section 5 explains how the basic planner was extended using control knowl- edge. Section 6 gives an overview of our results from exper- iments. Conclusions are given in section 7. 1 The USA-Advisor was created with the support of, United Space Alliance under Research Grant 26-3502-21 and Contract COC6771311. The authors would like to thank Matt Barry of the USA Advanced Technology Development Group for his technical support. The Reaction Control System The RCS is the system used to maneuver the Space Shut- tle while it is in orbit. It consists of jets, fuel tanks, pipes, and valves used to deliver fuel to the jets, and the associated circuitry required to control the system. The RCS is divided into three subsystems: the forward RCS, the left RCS, and the right RCS. In order for the Space Shut- tle to perform a given maneuver, a set of jets, belonging to the correct subsystems and pointing in the correct directions, must be prepared to fire. Preparing a jet to fire involves pro- viding an open, non-leaking path for the fuel to flow from pressurized fuel tanks to the jet. The flow of fuel is con- trolled by opening and closing valves. Valves are opened and closed by either having an astronaut flip a switch or by instructing the computer to issue special commands. In a very simplified form, the RCS can be viewed as a directed graph (see figure 1) whose nodes are tanks, jets and pipe junctions, and whose arcs are labeled by valves. Switches are connected to valves through fairly complex electrical cir- cuits. When everything is operating correctly, there are pre- scripted plans for each maneuver. When some components of the system fail, the situation becomes more difficult. There are many single failures that plans have been created for, but in general it is impossible to create plans for every possible situation. Continued correct operation of the RCS in such circumstances is vital to ensure the safety of the crew and to allow for completion of the mission. An intelligent system to assist in verification and generation of plans would be helpful. It is within this context that the USA-Advisor fits. The USA-Advisor The USA-Advisor consists of a collection of largely inde- pendent modules, represented by programs of A-Prolog - a language of logic programs under stable models (answer sets) semantics (Gelfond & Lifschitz 1988; 1991), and a graphical Java interface, J . The interface gives a simple way for the user to enter information about the history of the RCS, its faults, and the task to be performed. At the moment there are two possible types of tasks: checking if a sequence of occurrences of actions satisfies a goal, G, and finding a plan for G of a length not exceeding some num-