You are on page 1of 8

Design Considerations for COSA2

Stefan Brüggenwirth, Wolfgang Pecher and Axel Schulte


Institute of Flight Systems
Bundeswehr University
85577 Munich, Germany
{stefan.brueggenwirth, wolfgang.pecher, axel.schulte}@unibw.de

Abstract—In this article, we present the architectural and describe each of its constituting subfunctions and the syntactic
algorithmic details for a COgnitive System Architecture that and algorithmic details. Throughout the article we illustrate
uses a Centralized Ontology with Specific Algorithms (COSA2 ). the concepts by an example taken from the intelligent system
COSA2 is a layered intelligent agent framework on the basis of
the modified Rasmussen model of human performance. It encom- configuration management, described in depth in section IV.
passes integrated algorithmic support for goal-driven situation The article concludes with open research questions.
interpretation, dynamic planning and plan execution, as well as
provisions for reactive behavior. A unique feature is the claim II. T HE C OGNITIVE P ROCESS
for an expressive, centralized ontology representation, used by all The cognitive process describes the information processing
functions to ensure consistency. The framework is being applied
to different problems in the domain of uninhabited aerial vehicles. scheme that is used within the Cognitive System Architecture
The modeling and processing details described in this article are (COSA). It is based on a model of human performance in
illustrated by a simplified example from the intelligent onboard information processing published by J. Rasmussen [6] in 1983.
systems management domain. It furthermore serves as a guideline for knowledge acquisition
Keywords—Intelligent agents; Knowledge modeling; Plan exe- from domain experts and as an ontology guideline for domain
cution, formation, and generation; Rule-based processing
specific modeling.
I. I NTRODUCTION Human Performance
procedure-based concept-based

NCREASING demand for highly automated, uninhabited


I COSA Concepts Motivational Contexts Task Options
matching goals & task
behaviour

systems requires the development of generic, yet flexible identification-


relevant Identification
concepts Goal constraints
Planning
agenda
Determination
software frameworks to provide these systems with intelligent cues

decision making capabilities. The Institute of Flight Systems Task Situations Procedures
current task action
has successfully applied its Cognitive System-Architecture Task Task
behaviour

(intent) instructions
Determination Execution
(COSA) [1] in various domains, ranging from multiple un- task-relevant
cues
inhabited aerial vehicle (UAV) guidance [2], [3] to intelligent
Cue Models Sensori-Motor Patterns
system configuration management [4]. Applications developed
skill-based
behaviour

Feature Action
for COSA follow a conceptual processing scheme, called Formation control-relevant cues Control
the cognitive process, that is meant to resemble the human
way of information processing. By using this analogy we sensations sensations
effector
Work commands
belief, that (1) the modeling and ontology creation by human Algorithmic classes within COSA: Environ-
ment
domain experts, as well as the interface to a human operator Inference-Based Search-Based Pattern-Based

may benefit from the semantics used in the cognitive process


Figure 1. The cognitive process illustrating the processing scheme of COSA2
and (2) intelligent agents using the COSA framework have
the ability to act in a flexible and comprehensible way. The
original COSA framework uses the cognitive processor Soar A. The Modified Rasmussen-Scheme
[5] as a rule-based inference engine. Beside inference however, The modified Rasmussen scheme [7] shown in Fig. 1,
it was found that the individual conceptual processing steps laid the intellectual foundation in the attempt to establish
specified in the cognitive process may benefit from further an analogous computation paradigm for intelligent software
algorithmic support provided by a generic cognitive system agents. The inner, light-blue box represents the subset of
architecture. In this article, we describe a novel COgnitive human cognitive capabilities that are algorithmically supported
System Architecture with a Centralized Ontology and Specific by COSA2 . Note, that human skill-based behavior (e.g. visual
Algorithms (COSA2 ) to facilitate each such processing step, perception occurring as part of the human Feature Formation
along with the embracing architecture to connect these sub- process) is only partially covered by the architecture.
processes into an intelligent processing framework.
This article is organized as follows: First, we describe B. Related Work
the cognitive process and the resulting overarching agent From an agent-theoretical point of view, the approach
architecture as the basis for the COSA2 framework. Then, we resembles a hybrid agent architecture [8] with horizontal

978-1-61284-060-4/11/$26.00 ©2011 IEEE


layering, as found in Fergusons TouringMachines [9] or other modeling guideline for the cognitive process and describes the
Three-Tier architectures [10]. The lowest layer (skill-based) is functional requirements on each cognitive subfunction.
reduced to converting subsymbolic input data to an abstract 1) Feature Formation: The human Feature Formation
symbolic representation (and vice versa). These symbols are process encompasses elaborate perception and signal process-
then fed in parallel into a reactive layer1 with prestored ing tasks, in order to assemble semantic information from
procedures (procedure-based) and a deliberative, goal-oriented an initially unfiltered stream of sensations. Within COSA2
layer (concept-based) comparable to a BDI-agent design [11], it is assumed that appropriate preprocessing steps take place
augmented with dynamic planning capabilities [12], [13]. outside the framework, so that assigning meaningful symbols
A major challenge for the centralized knowledge represen- to incoming input-data becomes trivial. Feature Formation
tation of COSA2 is a tight integration between action planning is then reduced to being the first subfunction, that starts
and reasoning about the consequences within a single world a new execution cycle by sampling the input interface of
model. Among the first to address this issue was the possible the agent. It uses a-priori knowledge on C UE M ODELS to
worlds approach by Ginsberg and Smith [14]. Classical plan- transform subsymbolic, numeric input data from the work
ning languages like STRIPS [15] handle the framing problem environment into a symbolic representation. These symbols are
[16] well, but still suffer from the ramification problem [17]. then provided as identification relevant cues to the concept-
That is, all consequences of executing an action, including based layer or as task-relevant cues to the procedure-based
indirectly inferred effects, must explicitly be listed as postcon- layer. A CUE MODEL rule may for example specify that an
dition. Derived predicates, introduced later with the Planning input voltage of 0-5V is translated into the ’low voltage’
Domain Definition Language (PDDL) [18] help relief this symbol, which is then processed by subsequent subfunctions.
pitfall, but intentionally restrict the expressiveness of indirect 2) Identification: The Identification subfunction assembles
effects. A framework described in [19] uses PDDL techniques a high-level representation of the situation perceived by the
and focuses on the dependencies between planning and plan agent. Typically the subfunction matches upon identification
execution. A reactive planner, that can handle indirect effects relevant cues created by the Feature Formation subfunction,
was developed by Williams [20] and applied in embedded and applies its a-priori knowledge on C ONCEPTS to interrelate
intelligent systems. The COSA2 framework offers the full these and expand a broader, comprehensive situational picture.
expressiveness of its inference engine to derive indirect effects. As shown in Fig. 2, the result is written into the matching
C. Central Knowledge Representation concepts namespace in working memory.
The cognitive process distinguishes static, a-priori knowl-
Concepts
edge specified during design time (shown in blue in Fig. 1, e.g.
C ONCEPTS or TASK O PTIONS) and situational knowledge, C1
C2

..
Cn
generated during runtime and stored in the agent’s working

.
memory (shown in red in Fig. 1, e.g. identification relevant Identification
identification- matching concept = C1
cues or matching concepts). Gray boxes in Fig. 1 represent relevant cues

the cognitive subfunctions that constitute the cognitive process.


situational
A cognitive subfunction performs a specific algorithm on the feature space

basis of the indicated a-priori knowledge.


An important claim of the cognitive process is for a central
knowledge representation. This means, that both situational Figure 2. Identification expands a comprehensive situational picture [7]
and a-priori knowledge are specified exactly once, and acces-
sible from all the different subfunctions. As a consequence, A well suited domain to demonstrate the strength of this
each cognitive subfunction may generally read all situational approach are network problems (e.g. a hydraulic network that
knowledge elements available in working memory. However, supplies pressure to an engine), in particular when it comes
it writes specifically only into the situational knowledge in- to deriving internal network states (represented as matching
dicated by the outgoing arrow. For example, the cognitive concepts) from measurable input sensory data (represented as
subfunction Identification, is implemented as an inference identification relevant cues). A class definition of a hydraulic
algorithm which uses C ONCEPTS as a-priori knowledge. It valve may for example contain two integer attributes, position
may read from anywhere in working memory (with its primary and power. A C ONCEPT may say that, if an instance of valve
source being identification relevant cues) and exclusively in the closed position and powered on is matched in the
modify the situational knowledge on matching concepts. situational feature space, then the input pressure of the valve
D. Functional Description of the Cognitive Processing Steps will propagate through to the output side. There might also be
an embracing network class which can be used to infer internal
Each cognitive subfunction is responsible for certain aspects pressure states. Another example from the multi-UAV domain
within the human cognition process. This analogy serves as a might be the assessment of a tactical situation, where a rule
1 Reactive behavior is not yet completely realized in our framework and subsumes the existence of a close-by threat by instantiating a
mentioned here for completeness matching concept ’danger’.
3) Goal Determination: The concept-based layer of this knowledge ensures consistency between the deliberation
COSA2 is driven by goals. The Goal Determination step process on future states during planning, and the reaction of
checks the perceived situation for a violation of desirable states the agent to it, when the state will actually be encountered
and constraints, modeled as M OTIVATIONAL C ONTEXTS by during plan execution.
the designer. Like C ONCEPTS, these are described as classes, In the pressure network example above, the agent might
with attributes to hold specific information on the goal and have two TASK O PTIONS: to command a valve to close
rules, that describe the condition under which the goal be- and to switch its power on. The valve needs power and a
comes instantiated. The semantic is here, that an instance of command signal to switch to the closed position, otherwise it
a goal in the working memory is created, when the agent is remains open. If the valve is closed, then it cannot propagate
in an undesirable state. This drives further action by the agent the pressure through to the engine interface, resulting in an
to remove the goal-instance from the working memory. instance of the supply-engine goal. With this knowledge, the
A goal rule might for example specify that, if the engine in- planning subfunction can derive, that both TASK OPTIONS, to
terface pressure is below 5 bar, then an instance of the supply- command the valve to close and to power it on, are required
engine-goal is created. Vice versa, the agent then knows that to satisfy the supply-engine goal.
it needs to take action in order to retract the instance of the 5) Task Determination: According to Rasmussen [6], hu-
supply-engine-goal by taking the engine-interface pressure to man behavior is dominated by routine procedures, optimized
a value greater or equal than 5 bar. with respect to every-day situations. This procedure-based
4) Planning: Planning describes the problem of creating a behavior increases performance in environments with recur-
sequence of tasks, to be executed by the agent with the aim of ring situational patterns, that trigger a predetermined action-
transitioning from the current environmental state into some sequence as reaction. In the modified Rasmussen scheme [7],
desired target state. The current environment state is primarily the task-determination subfunction is responsible for matching
described by the matching concepts, whereas the target state such patterns (TASK S ITUATIONS) and associating with it a
results from the goals & constraints identified during the Goal predefined, routine action-procedure (not yet implemented).
Determination phase. The set of possible actions of the agent This layer is also responsible for executing the task agenda,
is described as TASK O PTIONS. If the planning process was generated by the Planning subfunction. The situational pattern
successful, a subset of these is selected for execution as entries matching is here focused on recognizing task relevant cues,
of the task agenda. that trigger the execution of the next task from the task agenda.
Once a task agenda is generated, the planning subfunction If, for example the task agenda requires a pump to be activated
is reduced to determining, whether the existent agenda is after a certain valve is closed, Task Determination would
still valid and progressing with its execution is still in line recognize the logical condition of the valve being closed and
with the goals. Comparable to the long-lasting intentions initiate the procedure to activate the pump.
of a BDI-agent design, we follow the convention to stick 6) Task Execution: A high level task, such as a pump
to a generated agenda as long as possible. This avoids the activation procedure might be composed of several low-level
computationally expensive recomputation of a plan and gives actions, that represent physical skills the agent is able to apply.
the framework a certain long-term momentum that prevents In our current implementation these are mostly realized by
numeric oscillations with minimal operational benefit. the atomic instructions or commands available at the output
interface. The knowledge on P ROCEDURES is used to relate
Simulated Environment tasks with sequences of such low-level actions.
Projection
7) Action Control: Once Task Execution has broken down
the current task into its low-level actions, the Action Control
Concepts Motivational Contexts Task Options subfunctions translates the action into subsymbolic, numeric
matching goals & task
identification-
relevant Identification concepts Goal constraints
Planning
candidate instructions and sends them to the output interface. The
Determination
cues
task Action Control subfunction is the equivalent to the Feature
agenda
Formation subfunction on the input-side.
Figure 3. The projection based planning approach reuses knowledge on
C ONCEPTS and M OTIVATIONAL C ONTEXTS III. I MPLEMENTATION OF C OGNITIVE S UBFUNCTIONS
Within the COSA2 framework, the cognitive subfunctions
The idea of central knowledge representation suggests that used in the modified Rasmussen scheme are categorized into
a-priori knowledge used elsewhere to describe portions of the three algorithmic classes, shown by the different shadings in
ontology is reused when applicable. As shown in Fig. 3, the the blocks of Fig. 1 on page 1: Inference-based, search-based
projection based planning algorithm simulates the anticipated and based on reactive pattern-matching. This reflects a general
effects, that a task executed by the agent would have on division of the cognitive process into the functional building
the environment. The agent then interprets this projected blocks: situation identification, planning / decision and action
environment by its a-priori knowledge on C ONCEPTS and execution. For each of these functional blocks, there are
M OTIVATIONAL C ONTEXTS, i.e. the identical knowledge that dedicated tools available: situation identification and selection
is used to interpret the perceived real world. The reuse of of goals is traditionally a BDI-agent domain [11], planning can
be accomplished by PDDL automated planning tools [18] and and e2 . Note, that multiple combinations of facts may match
plan execution languages like Plexil [21] perform the action. the condition, and are hence found as individual instances.
COSA2 tries to combine the functional aspects into a uni-
fied framework, built around an expressive inference engine. B. Inference-Based Cognitive Subfunctions
According to the processing specifics, the a-priori knowledge The three inference-based cognitive subfunctions Feature
representation of each subfunction differs semantically and Formation, Identification and Goal Determination provide
syntactically, while the situational knowledge is generally rep- the symbolic situational understanding, including relevant
resented as a semantic net as explained in the next paragraph. goals, necessary for subsequent decision and action processes.
1) Endsley’s Model of Situation Awareness: To illustrate
A. Working Memory Representation
the design choices made for the inference-based subfunctions,
The situational knowledge is split up into the individ- it is worthwhile looking at a different perspective on human
ual namespaces ns = {IC, M C, GC, T A, T C, CT, AI}, as cognition based on Endsley’s model [22] (Fig. 5). The concept
shown in Fig.1 (e.g. identification relevant cues, in the fol- focuses on the elements of situation awareness (SA) as ob-
lowing abbreviated as IC, or matching concepts M C). All served by human operators. It provides some analogies to the
situational knowledge SK(t) available to the agent at a certain inference-based cognitive subfunctions responsible within the
time t during runtime forms the S working memory content cognitive process to draw the situational picture. As shown in
of the agent, W M = SK(t) = SKn (t). The working the figure, she distinguishes three levels of SA with increasing
n∈ns
memory is represented as a graph W M = (V, E) which complexity.
organizes the situational knowledge of the agent into an ob-
Inference-Based Search-Based Pattern-based
jected oriented, semantic net. Like in traditional objected ori-
ented programming languages, we distinguish between static, Perception of
elements in
Comprehension
of current
Projection of
future status Planning
State of the Performance
situation and
prototypical class definitions and concrete instantiations of environment
current situation
Decision
of actions
Level 1 Level 2 Level 3
these classes as unique objects. During runtime, the agent
may instantiate an arbitrary number of concrete objects from • Goals
these class templates, each in an individual state described by • Objectives
• Expectations

the value of its attributes as shown in Fig. 4. Each instance


of an object is associated with a namespace and represented Figure 5. Interpretation of situation awareness based on Endsley’s model
as a vertex v ∈ V in working memory. Weighted edges
e ∈ E = (source ∈ V, target ∈ V, type, value) represent
Level 1 simply represents the elementary building blocks
the attributes of an object. Attributes hold a certain value
of a perceived situation, comparable to Identification Relevant
and may either be of a primitive type, such as I NTEGER or
Cues generated by Feature Formation. Level 2 SA combines
S TRING, or may link to an instance of another class.
the different elements to derive a comprehensive representation
of the situation, analogous to Matching Concepts as deduced
V1:Valve P1:Pump XF:Valve
by Identification. In addition, Endsley includes goals and
string name = V1
connection
string name = P1
connection
string name = XF objectives into level 2 SA, since they critically influence
int pos = 1 int speed = 10000 int pos = 0
int cmd = 1 Int cmd = 10000 int cmd = 0 the interpretation of a situation. Finally, level 3 SA takes a
real p_in = 5 real p_in = 5 real p_in = 5
real p_out = 5 real p_out = 0 real p_out = 0
projection of future environment states into account. Based on
bool pwr = true bool pwr = false bool pwr = false this interpretation of Endsley’s model, Feature Formation,
Identification and Goal Determination create SA within the
Figure 4. A semantic net is used to describe the situational knowledge cognitive process.
2) A-Priori Knowledge Representation: Within the cog-
Each edge in the WM graph represents a certain nitive process, the three subfunctions Feature Formation,
fact in agent’s world knowledge. An edge e1 = Identification and Goal Determination use an inference
(valve1 , valve1 , pin , 5) may represent the fact, that valve1 mechanism to build up the situational understanding of the
has an attribute pin with the value 5, and e2 = agent, that sets the basis for subsequent computation processes.
(valve1 , valve2 , connection, true) may indicate a connec- Rule-based production systems have successfully been used in
tion by a link from valve1 to valve2 . A condition is a set expert systems and apply an inference mechanism to deduce
of propositional expressions connected by logical connec- new information from a known set of facts. A production sys-
tives, that allow the matching of complex patterns including tem dynamically stores facts in its working memory, whereas
AND, OR, NOT relationships and path-expressions. The cen- the production rules are static and specified in a production
tral pattern-matching algorithm for all cognitive subfunctions memory. A rule-interpreter controls the application of rules
GET M ATCHING I NSTANCES (condition, WM) search the WM and resolves conflicting facts [23].
for all sets of facts, called instances, that match a certain The a-priori knowledge for the inference-based subfunctions
condition. For example, the condition “find a valve with is given as a set of class definitions. A class definition
pin > 2 and a connection to valve2 ” returns the facts e1 encapsulates the attributes that describe the state of an object
and its behavior, expressed as production rules. A production 1: procedure I NFERENCE(knowledge, wm)
rule is an instruction that is generally given in the form: 2: while ruleAgenda 6= empty do
rule : [name, priority] : if [condition] ⇒ then [action]. 3: rule ← DEQUEUE F RONT(ruleAgenda)
A rule is active for each instance in the WM, that matches 4: matches ← GET M ATCHING -
the rule condition (sec. III-A). Once the set of active rules I NSTANCES(rule, wm)
has been identified, the interpreter selects one and fires it 5: for each instance in matches do
by applying the associated action. Actions can either create, 6: modF acts ← FIRE RULE(instance)
modify or delete facts in the WM. A regular rule is called 7: SUBMIT T OWM(modF acts, wm)
o-supported [5], that is, its modifications are permanent in 8: touchedRules ← GET T OUCHED -
the WM. Modifications performed by i-supported rules on the C ONDITIONS(modF acts, knowledge)
other hand are withdrawn (retracted), once the condition of 9: ruleAgenda ← ADD(touchedRules)
the rule is no longer valid in WM. 10: end for
As indicated in sec. II-D3, a special semantic convention 11: end while
for M OTIVATIONAL C ONTEXTS applies: An object instance 12: end procedure
in the goals & constraints namespace indicates a violated
constraint or an undesired state, that requires action by the Figure 6. Inference algorithm used in COSA2
subsequent planning subfunction. It follows, that the condition
of a M OTIVATIONAL C ONTEXT rule describes this undesired C. Search-Based Cognitive Subfunction
state, and the action side instantiates a goal-class that describes 1) Planning: The planning subfunction is of special im-
the violated goal or constraint further. Such a rule should be portance, since it drives the decision on the actions performed
i-supported, so that if the agent has reached a target state, the by the agent. In our implementation, planning combines state
condition does not match any longer and the goal-instance will space search with the inference algorithm mentioned in the
be retracted. The target state is therefore implicitly encoded previous section. To comply with the claim for a central-
in the negation of a motivational context rule. ized knowledge representation, we include the knowledge on
3) Algorithmic Details: COSA2 uses an graph-based infer- C ONCEPTS and M OTIVATIONAL C ONTEXTS. As shown in
ence engine, described in [24], [25]. Central to the algorithm Fig. 3 on page 3, this is accomplished by projecting the
(Fig. 6) is a priority queue (RULE AGENDA), that stores an anticipated effects of executing a task candidate onto the cur-
ordered list of unchecked rules with modified conditions. The rent environment. The resulting projected environment state is
interpreter removes the rule with the highest priority from the then assessed by the Identification and Goal Determination
RULE AGENDA and builds all active rule instances that match subfunctions, as if the state was in fact deduced from sensory
the condition in the working memory. Each active instance is data of the real world. If the projected environment satisfies all
then fired by applying it’s action and submitting the modified goals, then the task candidates applied on the way are stored as
facts to the working memory. All rules, that match on a the new task agenda. Otherwise, the search process continues
modified fact in their condition, need to be checked again, by evaluating the remaining task candidates, applicable in the
and are therefore added to the RULE AGENDA based on their projected environment state. Finding a plan (of a given length)
priority. Once no more rules remain on the RULE AGENDA, is generally NP-hard [26]. Our approach aims at problems,
the cycle has reached the quiescence state. In this state, the which include complex patterns (represented as graphs) that
working memory content is considered updated and consistent describe key features in the environment, but a low branching
with the given knowledge in the rule base. factor in the search space of tasks.
The cognitive processing cycle starts by sampling the input 2) A-Priori Knowledge Representation: The a-priori
interface and then calls I NFERENCE (C UE M ODELS ∪ C ON - knowledge relevant for planning is stored as TASK O PTIONS.
CEPTS ∪ M OTIVATIONAL C ONTEXTS, WM) as described in A TASK OPTION is represented in the form: task: [name] :
Fig. 6. Even though all rules are concurrently relevant, the (preconditions, effects). The preconditions define
priority ranges are arranged as follows: Feature Formation a pattern of facts related by logical connectives, which needs
> Identification > Goal Determination rules. The rules are to be matched in the WM to enable the execution of the
therefore generally checked in that order, e.g. the first Goal task. Accordingly, one task option might enable multiple task
Determination rule is evaluated, after all active Identification instances, if different object instances match its precondition.
rules have fired. Note, that the algorithm may also switch back The effects describe the anticipated postcondition, that would
to an earlier cognitive subfunction: If e.g. a Goal Determina- occur after the task has been executed. Effects are expressed
tion rule modifies a condition of an Identification rule, that as modifications of facts in the WM. All facts matched
rule will immediately be reevaluated, since its priority is higher as precondition can be accessed from the effects-side of a
than all remaining Goal Determination rules. Once the last task. This allows a task option to be dynamically enabled,
Goal Determination rule has been considered, the inference parameterized and/or applied upon different objects.
procedure has reached the quiescence state and the agent has Simulated Environment Rules: The projection loop is closed
built up a representation of its environment, consistent within inside the concept-based layer, that is, on a task basis, instead
its knowledge. of low-level actions as shown in Fig. 3 on page 3. However,
since the tasks are only applied ’virtually’, we have introduced for as long as possible. An agenda could be invalidated for
a new type of simulated-environment rules, which serve as a two reasons: (1) the goals for which it was created changed
substitute of the real work environment (and the lower levels). and (2) by significant changes in the environment. Tracing
These rules take as condition e.g. an actuator command and the goals is simple, whereas detecting significant changes in
simulate the expected reaction of the actuator to it, by moving the environment is usually intractable. For this reason, the
the actuator into the commanded position. following reverse approach was taken: If a task agenda exists,
Assuming that the inference of rules and application of the planning subfunctions projects the remaining tasks in it
outgoing commands happens instantaneously and without from the current situation forward, and checks if it still satisfies
failure as anticipated, the simulated environment rules have all goals & constraints. If the existent agenda is still valid, then
two significant properties: First, they determine the temporal the environment had not significantly changed with respect to
properties of the agenda, by the duration that the expected the agenda. This forward projection algorithm takes only linear
environment reaction takes. Secondly, these rules allow to time.
monitor for exogenous events, happening in the real envi-
ronment, that create a situation that is different from the 1: procedure P LANNING(knowledge, wm)
anticipation. Hence, each simulated-environment rule can be 2: if FWD P ROJECTION V LD(taskAgenda, wm) then
used to monitor for failures, either by explicit monitoring 3: return taskAgenda . Retain active agenda
points or a maximum duration after which a time-out occurs. 4: end if
The reaction to a failed environment rule is domain-specific: 5: wmCopy ← wm . Save original WM
A hardware failure might have caused the timeout and simu- 6: level ← 0
lated behavior should be adapted. The simulated environment 7: while SKGC 6= empty do
rule for example, that moved the actuator into the commanded 8: for each taskOption in knowledge do
position could be modified to reflect a jam in a certain 9: matches ← GET M ATCHING -
position. In other cases, the timeout might have been caused I NSTANCES(taskOption, wm)
by exogenous events, e.g. a slight delay on a flight leg due 10: end for
to wind, it might be sufficient to replan again from the new 11: for each instance in matches do
situation. 12: ef f ects ← APPLY TASK(instance)
13: SUBMIT T OWM(ef f ects, wm)
3) Algorithmic Details: Conceptually, the approach can be
simplified to the following GraphPlan [27] style algorithm: 14: modF acts ← INFERENCE(C ONCEPTS ∪
The planning algorithm has two phases and starts with the M OTIVATIONAL C ONTEXTS, wm)
current WM content, which is restored later, when the planning 15: addedBy ← (modF acts | instance | level)
subfunction is completed. During the first phase the planning 16: end for
graph is constructed (in polynomial time), which holds all 17: end while
the facts, that could be achieved by the execution of TASK 18: wm ← wmCopy . Restore original WM
O PTIONS. Constructing the planning graph is comparable to 19: taskAgenda ← EXTRACT P LAN(addedBy, wm)
a breadth-first search, in which the effects of all enabled task 20: return taskAgenda
instances are added to the WM. The newly added facts are then 21: end procedure
interpreted by the Identification subfunction and evaluated by Figure 8. Projection-based planning algorithm used in COSA2
Goal Determination for a goal state. If there are unsatisfied
goals, the search continues by applying the set of tasks that
D. Reactive Pattern-Based Cognitive Subfunctions
became enabled in the new state.
Otherwise, the algorithm proceeds to the plan extraction The subfunctions based on reactive pattern matching pro-
phase (which is not described here in detail for briefness). vide a direct connection between the matching of a condition
This phase is can be seen as a backward-search in the planning in the WM and an associated reaction. Reactive, procedure-
graph, which collects all required tasks that had to be added based behavior, without the time consuming deliberation pro-
in order to reach the goal state from the start. Besides simple cess required for concept-based behavior, provides a quick,
backtracking, COSA2 can extract a plan by recasting the pre-stored response to a matched situation. Currently, this
planning graph as a constraint satisfaction problem or in reactive behavior is only used to detect cues that trigger the
the PDDL [18] notation. As shown in Fig. 8, the planning next step in the task agenda.
algorithm reuses portions of the inference algorithm in Fig. 6. 1) A-Priori Knowledge Representation: Internally, the a-
The PLANNING (TASKO PTIONS, WM) function is called priori knowledge is represented as if-then rules. However, most
after the inference based subfunctions have completed. As portions are automatically generated from relevant, existent a-
described in sec. III-B2, the goal-state for planning is by priori knowledge to comply with the claim for a centralized
convention determined by object instances of goals & con- knowledge representation, as follows:
straints, hence a valid agenda leads to state, in which the Task Determination The necessary condition for the selec-
situational knowledge on goals & constraints (SKGC ) is tion of the current task is, that its preconditions taken from
empty. Once a task agenda is found, COSA2 sticks to it, TASK O PTIONS, are fulfilled. Out of all TASK O PTIONS, it is
sufficient to select only those, which are next to be executed the networks that supply the general systems, by rerouting
according to the task agenda. The selected tasks are then add power to avoid load peaks or use redundancies for failed
to a dedicated WM element for execution. components. We have stripped down a complex problem to
Task Execution The condition matches on the dedicated the simple network shown in Fig 10.
WM element that represents the current tasks and executes
code to fan out associated sequences of low-level actions. Pump
V1 Eng1
1
Action Control This subfunction is reduced to execute code
to send data to the agent’s output interface. XF

pwr
1: procedure R EACTIVE PATTERN(knowledge, wm)
2: for each rule in knowledge do
Pump
3: matches ← GET M ATCHING - 2
V2 Eng2

I NSTANCES(rule, wm)
4: end for Figure 10. A simple network problem illustrating an aircraft fuel system
5: for each instance in matches do
6: modF acts ← FIRE RULE(instance) The following code summarizes the examples given in the
7: SUBMIT T OWM(modF acts, wm) descriptions of each cognitive subfunction.
8: end for
• A class template for a valve has the following attributes:
9: end procedure
C LASS Valve:
Figure 9. Reactive pattern matching algorithm used in COSA2 ATTRIBUTES :
int pos;
2) Algorithmic Details: The implementation of R EAC - int cmd;
TIVE PATTERN (TASK S ITUATIONS, WM) can be seen as a real p_in;
single-step inference algorithm, as shown in Fig. 9. real p_out;
Task Determination identifies the current task by calling • A C UE M ODEL is used to derive a higher, symbolic
the procedure ReactivePattern based on the a-priori knowledge representation of the input voltage.
on TASK S ITUATIONS. Once the current task is selected, the RULE readInpCmd:
Task Execution subfunctions initiates the associated P ROCE - if (U_in ≥ 0) ∧ (U_in < 5) then U_in_s ← low_voltage;
DURE . A procedure is implemented as code fragment, that is • The behavior of the valve might be described by a
parameterized by the matching elements from the WM. By CONCEPT rule like this:
default, this code executes a sequence of actions, but may be RULE behPos1:
extended to perform pre-coded automation functions. Finally, if (pos = 1) then p_out← p_in;
Action Control represents the output interface to the work • A simulated environment rule describes the anticipated
environment. reaction of a valve to a commanded position.
IV. A N A PPLICATION E XAMPLE RULE behFollowCmd:
In the following section, we present portions of a real world if (pwr) ∧ (cmd) then pos ←cmd;
application to illustrate the semantic details of the different • The action performed by the agent to command valve on

subfunctions as described above. The example application is (off) are described as TASK O PTIONS:
inspired by an application that is relevant in the context of the TASK CmdVlvOn (Off ):
More Electric Aircraft (MEA) [28]. MEA allows aircraft to use preCondition: cmd = 0 (1);
electricity as a single form of energy to operate the general effect: cmd ← 1 (0);
systems, e.g. actuators, pumps or the environmental control • Finally, a P ROCEDURE subsumes a sequence of low level
system. This enables a flexible, intelligent reconfiguration of commands that realize the execution of a task:

Task Options SimEnv Concepts Goals


Vlv1.cmd=1 Vlv.pos=1
CmdVlvOn VlvFollowCmd Vlv.pout=5
VlvBehPos1
Vlv2.cmd=1 Vlv.pos=1
CmdVlvOn VlvFollowCmd Vlv.pout=5 SupplyEngines (R)
ElecSw.pos=1 VlvBehPos1
ElecSw.cmd=1
CmdElecSwOn ElecSwFollowCmd
ElecSw.pos=1

Figure 7. Resulting task agenda for portions of the MEA problem


P ROCEDURE activatePump: [4] W. Pecher, S. Bruggenwirth, and A. Schulte, “Using cognitive automa-
1. @0s switchOn ElecSw_Pmp_Pwr tion for aircraft general systems management,” in System of Systems
Engineering (SoSE), 2010 5th International Conference on. IEEE,
2. @2s sendCmd Pmp Cntr ON 2010, pp. 1–8.
3. @5s sendCmd Pmp Speed 10000 [5] J. E. Laird, A. Newell, and P. S. Rosenbloom, “Soar : An architecture
Figure 7 shows an agenda for the simple network problem for general intelligence,” in Artificial Intelligence, vol. 33. Heidelberg,
Germany: Springer, 1987, pp. 1–64.
mentioned above as it will be displayed during task execution [6] J. Rasmussen, “Skills, rules and knowledge, signals, signs and symbols,
at runtime. The agenda was created by the planning subfunc- and other distinctions in human performance models,” in IEEE Trans-
tion, starting from a condition where both pumps have already actions on Systems, Man, and Cybernetics, vol. SMC-13. Heidelberg,
Germany: Springer, 1983, pp. 257–266.
been activated and the goal to supply both engines with fuel. [7] R. Onken and A. Schulte, System-Ergonomic Design of Cognitive
Note the different cognitive subfunctions in the projection: Automation: Dual-Mode Cognitive Design of Vehicle Guidance and
Three TASK O PTIONS have already been executed by the Control Work Systems. Springer Verlag, 2010.
[8] M. Wooldridge, An introduction to multiagent systems. Wiley, 2009.
agent, i.e. the electrical switch and the valves have been com- [9] I. A. Ferguson, “Touringmachines: An architecture for dynamic, rational,
manded to 1. During the planning process these tasks triggered mobile agents,” Ph.D. dissertation, University of Cambridge, 1992, clare
the simulated-environment rules to project that the valves will Hall.
[10] E. Gat et al., “On three-layer architectures,” Artificial intelligence and
follow those commands. As noted in sec. III-C2, simulated mobile robots, 1998.
environment rules have a temporal extension. In the example, [11] M. Bratman, Intention, plans, and practical reason. Harvard University
this is reflected by the running timer bar on VlvFollowCmd Press Cambridge, MA, 1987.
[12] A. Walczak, L. Braubach, A. Pokahr, and W. Lamersdorf, “Augmenting
on valve 2, indicating that the valve has not yet reached the bdi agents with deliberative planning techniques,” Programming Multi-
commanded position. Once this condition is observed at the Agent Systems, pp. 113–127, 2007.
input interface of the agent, the C ONCEPTS rule VlvBehPos1 [13] F. Meneguzzi, A. Zorzo, and M. da Costa Mora, “Propositional planning
in bdi agents,” in Proceedings of the 2004 ACM symposium on Applied
will derive the internal output pressure Vlv.pout=5. This will computing, Nicosia, Cyprus.
eventually lead to the retraction of the SupplyEngines goal, [14] M. Ginsberg and D. Smith, “Reasoning about action i:: A possible
which marks the target state. worlds approach,” Artificial Intelligence, vol. 35, no. 2, pp. 165–195,
1988.
V. C ONCLUSIONS [15] R. Fikes and N. Nilsson, “STRIPS: A new approach to the application
of theorem proving to problem solving,” Artificial intelligence, vol. 2,
In this article, we presented the architectural and algorithmic no. 3-4, pp. 189–208, 1971.
concepts for a new cognitive system architecture (COSA2 ). [16] J. McCarthy, P. Hayes, and S. U. C. D. O. C. SCIENCE., Some
philosophical problems from the standpoint of artificial intelligence.
The architecture is an attempt to build an intelligent agent Stanford University, 1968.
framework on the basis of the modified Rasmussen model of [17] J. Finger and S. U. C. D. O. C. SCIENCE., Exploiting constraints in
human performance. It encompasses unified functions for goal- design synthesis. Dept. of Computer Science, Stanford University, 1987.
[18] M. Fox and D. Long, “Pddl2. 1: An extension to pddl for expressing
driven situation interpretation, planning and plan execution. temporal planning domains,” Journal of Artificial Intelligence Research,
A unique feature is the claim for a centralized knowledge vol. 20, no. 1, pp. 61–124, 2003.
representation, enabling the reuse of knowledge modeled once, [19] O. Despouys and F. Ingrand, “Propice-plan: Toward a unified framework
for planning and execution,” Recent Advances in AI Planning, pp. 278–
whenever applicable to ensure consistency. Three algorithmic 293, 2000.
classes (inference based, search based and based on reactive [20] B. Williams and P. Nayak, “A reactive planner for a model-based
pattern matching) have been identified and prototypically executive,” in Proceedings of the Fifteenth international joint conference
on Artifical intelligence-Volume 2. Morgan Kaufmann Publishers Inc.,
implemented to close the loop on deliberative behavior. The 1997, pp. 1178–1185.
integration of a reactive layer and its interaction with deliber- [21] V. Baskaran, M. Dalal, T. Estlin, C. Fry, R. Harris, M. Iatauro, and J,
ative behavior is subject to current research. “Plan execution interchange language (plexil).”
[22] M. R. Endsley and D. J. Garland, Situation Awareness Analysis and
Future areas of application for COSA2 will be in the field Measurement. Mahwah, NJ: Lawrence Erlbaum Associates, 2000.
of assistant systems and task-based UAV guidance. This [23] T. Johnson, “Control in act-r and soar,” in Proceedings of the Nineteenth
effort also encompasses the integration of the framework with Annual Conference of the Cognitive Science Society: August 7-10, 1997,
Stanford University. Lawrence Erlbaum Associates, 1997, p. 343.
airborne hardware and sensors, to evaluate the performance [24] S. Brueggenwirth, R. Strenzke, A. Matzner, and A. Schulte, “A generic
of the architecture in real-world scenarios. cognitive system architecture applied to the multi-uav flight guidance
domain,” in Proceedings of the International Conference on Artificial
Intelligence and Agents (ICAART 2010), Crawley, UK.
[25] A. Matzner, M. Minas, and A. Schulte, “Efficient graph matching
with application to cognitive automation,” in Applications of Graph
R EFERENCES Transformations with Industrial Relevance. Berlin, Germany: Springer,
[1] H. Putzer and R. Onken, “Cosa–a generic cognitive system architecture 2008, pp. 297–312.
based on a cognitive model of human behavior,” Cognition, Technology [26] T. Bylander, “The computational complexity of propositional STRIPS
& Work, vol. 5, no. 2, pp. 140–151, 2003. planning,” Artificial Intelligence, vol. 69, no. 1-2, pp. 165–204, 1994.
[2] A. Schulte, C. Meitinger, and R. Onken, “Human factors in the guidance [27] A. Blum and M. Furst, “Fast planning through planning graph analysis*
of uninhabited vehicles: Oxymoron or tautology? the potential of cogni- 1,” Artificial intelligence, vol. 90, no. 1-2, pp. 281–300, 1997.
tive and co-operative automation,” in International Journal on Cognition [28] W. Pecher, “Das technologieprogramm more electric aircraft bei eads-
Technology & Work. Heidelberg, Germany: Springer, 2008. mas,” in Wehrtechnisches Symposium: Moderne Energietechnik in der
[3] J. Uhrmann, R. Strenzke, and A. Schulte, “Task-based guidance of Bundeswehr, Mannheim, Germany, 2009.
multiple detached unmanned sensor platforms in military helicopter
opertations,” in Proceedings of the Cognitive Systems with Interactive
Sensors (COGIS) Conference, Crawley, UK.

You might also like