# Procedural reasoning system

In artificial intelligence, a procedural reasoning system (PRS) is a framework for constructing real-time reasoning systems that can perform complex tasks in dynamic environments. It is based on the notion of a rational agent or intelligent agent using the belief–desire–intention software model.
A user application is predominately defined, and provided to a PRS system is a set of knowledge areas. Each knowledge area is a piece of procedural knowledge that specifies how to do something, e.g., how to navigate down a corridor, or how to plan a path (in contrast with robotic architectures where the programmer just provides a model of what the states of the world are and how the agent's primitive actions affect them). Such a program, together with a PRS interpreter, is used to control the agent.
The interpreter is responsible for maintaining beliefs about the world state, choosing which goals to attempt to achieve next, and choosing which knowledge area to apply in the current situation. How exactly these operations are performed might depend on domain-specific meta-level knowledge areas. Unlike traditional AI planning systems that generate a complete plan at the beginning, and replan if unexpected things happen, PRS interleaves planning and doing actions in the world. At any point, the system might only have a partially specified plan for the future.
PRS is based on the BDI or belief–desire–intention framework for intelligent agents. Beliefs consist of what the agent believes to be true about the current state of the world, desires consist of the agent's goals, and intentions consist of the agent's current plans for achieving those goals. Furthermore, each of these three components is typically explicitly represented somewhere within the memory of the PRS agent at runtime, which is in contrast to purely reactive systems, such as the subsumption architecture.

## History

The PRS concept was developed by the Artificial Intelligence Center at SRI International during the 1980s, by many workers including Michael Georgeff, Amy L. Lansky, and François Félix Ingrand. Their framework was responsible for exploiting and popularizing the BDI model in software for control of an intelligent agent. The seminal application of the framework was a fault detection system for the reaction control system of the NASA Space Shuttle Discovery. Development on this PRS continued at the Australian Artificial Intelligence Institute through to the late 1990s, which led to the development of a C++ implementation and extension called dMARS.

## Architecture

The system architecture of SRI's PRS includes the following components:
* Database for beliefs about the world, represented using first order predicate calculus.
* Goals to be realized by the system as conditions over an interval of time on internal and external state descriptions (desires).
* Knowledge areas (KAs) or plans that define sequences of low-level actions toward achieving a goal in specific situations.
* Intentions that include those KAs that have been selected for current and eventual execution.
* Interpreter or inference mechanism that manages the system.

## Features

SRI's PRS was developed for embedded application in dynamic and real-time environments. As such it specifically addressed the limitations of other contemporary control and reasoning architectures like expert systems and the blackboard system. The following define the general requirements for the development of their PRS:
* asynchronous event handling
* guaranteed reaction and response types
* procedural representation of knowledge
* handling of multiple problems
* reactive and goal-directed behavior
* focus of attention
* reflective reasoning capabilities
* continuous embedded operation
* handling of incomplete or inaccurate data
* handling of transients
* modeling delayed feedback
* operator control

## Applications

The seminal application of SRI's PRS was a monitoring and fault detection system for the reaction control system (RCS) on the NASA space shuttle. The RCS provides propulsive forces from a collection of jet thrusters and controls altitude of the space shuttle. A PRS-based fault diagnostic system was developed and tested using a simulator. It included over 100 KAs and over 25 meta level KAs. RCS specific KAs were written by space shuttle mission controllers. It was implemented on the Symbolics 3600 Series LISP machine and used multiple communicating instances of PRS. The system maintained over 1000 facts about the RCS, over 650 facts for the forward RCS alone and half of which are updated continuously during the mission. A version of the PRS was used to monitor the reaction control system on the NASA Space Shuttle Discovery.
PRS was tested on Shakey the robot including navigational and simulated jet malfunction scenarios based on the space shuttle. Later applications included a network management monitor called the Interactive Real-time Telecommunications Network Management System (IRTNMS) for Telecom Australia.

## Extensions

The following list the major implementations and extensions of the PRS architecture.
* UM-PRS
* OpenPRS (formerly C-PRS and Propice)
* AgentSpeak
* Distributed multi-agent reasoning system (dMARS)
* GORITE
* JAM
* JACK Intelligent Agents
* SRI Procedural Agent Realization Kit (SPARK)
* PRS-CL