
From: AAAI Technical Report WS-02-05. Compilation copyright © 2002, AAAI (www.aaai.org). All rights reserved. Programming the Deliberation Cycle of Cognitive Robots Mehdi Dastani¤ and Frank de Boer and Frank Dignum and Wiebe van der Hoek and Meindert Kroese and John-Jules Meyer Institute of Information and Computing Sciences Utrecht University P.O.Box 80.089 3508 TB Utrecht The Netherlands Abstract incorporated in the robot’s goals. But, we believe that doing so violates the basic programming principle called separa- This paper presents an overview of ongoing research that aims to develop a programming language for high level con- tion of concerns. Therefore, we aim to distinguish these two trol of cognitive robots and software agents. The language is levels explicitly and develop programming constructs to im- called 3APL and its formal specification is already presented plement these levels separately. in (Hindriks et al. 1999). We explain 3APL programming In this paper, we present our ongoing research on develop- constructs and its existing interpreter. We argue that a part ing a programming language for cognitive robots. The pro- of the deliberation cycle, which is fixed in the interpreter, gramming language is called 3APL (Hindriks et al. 1999) should be programmable. We discuss a set of programming and it is designed to implement the deliberative behavior of constructs that can be used to program some aspects of the cognitive robots. At this stage, the 3APL programming lan- deliberation cycle. guage provides a set of programming constructs to imple- ment robots’ mental attitudes such as its beliefs, goals, basic Introduction actions, and revision rules. The interaction between these For many realistic applications, a cognitive robot should entities are not programmable yet and is fixed by the 3APL have both reactive and deliberative behavior (Fischer, interpreter. This interpreter determines the flow of control Muller,¨ & Pischel 1994; Konolige 1997; Shanahan 1999; through a so-called deliberation cycle. In each cycle, a sub- Giacomo, Lesperance,´ & Levesque 2000). The first type of set of goals is revised, selected and executed. As the delib- behavior concerns the recognition of emergency situations in eration cycle is fixed by the interpreter, the meta-level con- time and provides rapid responses whereas the second type cerns can only be implemented to the extent that they are of behavior concerns the planning of actions to achieve its implementable indirectly by the set of object-level program- long term goals. In order to implement a robot’s deliberative ming constructs and given that the programmers know how behavior, its mental attitudes such as goals and beliefs as the flow of control is implemented in the 3APL interpreter. well as the interaction between these attitudes should be im- The aim of our research is to extend the 3APL language with plemented. Issues related to the implementation of robots’ a second set of programming constructs by means of which mental attitudes can be considered as object-level concerns the deliberation cycle becomes programmable. This exten- while issues related to the implementation of the interaction sion should make 3APL a programming language for cogni- between mental attitudes form meta-level concerns. tive robots that respects the separation of concerns principle. To illustrate these levels, consider a cognitive mobile This paper is organized as follows. First, we present the robot at rest. The goal of this robot is to transport boxes from architecture of cognitive robots that can be programmed by a source position to a different position, whenever there are 3APL. The syntax and semantics of the 3APL program- boxes at the source position. Another goal of the robot is ming language is explained. An example of a 3APL pro- to clean a room whenever it is not clean. The robot can gram is proposed to implement the above mobile robot sce- achieve these goals in several ways. For example, the robot nario. Subsequently, we explain the deliberation cycle of can transport boxes before cleaning the room, or vice versa, the 3APL interpreter and discuss the needs for programming or transport one box and clean the room for a certain amount constructs to implement the deliberation cycle. Finally, we of time and repeat it again. The beliefs and goals of the robot indicate some future research directions and conclude the form the object-level concerns while the strategy of how to paper. achieve these goals is a meta-level concern. Of course, a robot strategy can be considered as an issue that should be An Architecture for Cognitive Robots The cognitive robot or software agent that we consider has ¤Contact author is Mehdi Dastani: email: [email protected]. More information on 3APL can be found at: a mental state consisting of beliefs, goals, basic actions, a http://www.cs.uu.nl/3apl/ set of practical reasoning rules for revising goals, and an Copyright °c 2002, American Association for Artificial Intelli- interpreter. The beliefs represent the robot’s general world gence (www.aaai.org). All rights reserved. knowledge as well as its knowledge about the surrounding environment. In contrast to the BDI tradition (Cohen & PRACTICAL REASONING RULES. Each of these mod- Levesque 1990; Rao & Georgeff 1991), where goals are ules consists of its corresponding programming constructs. considered as states to be reached by the robot, and like Below is an overview of the programming constructs for ConGolog (Giacomo, Lesperance,´ & Levesque 2000), the each module. goals are considered here to be the robot’s control program Definition 1 (Programming Constructs for Beliefs) that specifies its activities. The basic actions are the actions Given a set of domain variables and functions, the set of that the robot can perform. These actions may be cogni- domain terms is defined as usual. Let t1; : : : ; tn be terms tive actions such as belief updates or external actions such referring to domain elements and P red be a set of domain as moving in a certain direction. In general, a basic action predicates, then the set of programming constructs for belief can be considered as a wrapper that provides a parameter- formula, BF , is defined as follows: ized interface to other processes. The set of practical rea- soning rules contains rules that can be applied to revise ac- ² p(t1; : : : ; tn) 2 BF . tions that are blocked, goals that are not achievable, to op- ² if Á; Ã 2 BF , then :Á; Á ^ Ã 2 BF . timize goals, or to generate some sort of reactive behavior. All variables in the BF formula are universally quantified Finally, the interpreter determines the flow of control among with maximum scope. The belief base module of a cognitive the abovementioned ingredients. The interpreter is usually robot is the following programming construct: specified by a deliberation cycle (Georgeff & Lansky 1987; BELIEF BASE= fÁ j Á 2 BF g. Giacomo, Lesperance,´ & Levesque 2000). This cognitive The set of basic actions is a set of (parameterized) actions architecture, which we call the 3APL architecture, is illus- that can be executed if certain preconditions hold. After ex- trated in Figure 1. ecution of an action certain postconditions must hold. These actions can be, for example, motor actions or belief update operations. Beliefs PR-rules Definition 2 (Programming Constructs for Basic Actions) Let ®(X) be an action name with parameters X and Á; Ã 2 BF . Then, programming constructs for basic Sense Action actions have the form: fÁg ®(X) fÃg Interpreter The basic action module of a cognitive robot is the following programming construct: BASIC ACTIONS= f C j C is a basic action g. Goals BasicActions The set of goal programming constructs that we use here differs from its specification (Hindriks et al. 1999) in some aspects. At this stage, we do not propose programming con- structs for the choice and parallel operators. The absence Figure 1: The 3APL architecture. of the choice operator implies that 3APL goals are deter- ministic programs and the absence of the parallel operator Although the 3APL architecture has many similarities implies that no two activities can take place simultaneously. with other cognitive architectures such as PRS, proposed for However, two new programming constructs are specified, the BDI agents (Rao & Georgeff 1995; Georgeff & Lansky i.e. IF-THEN-ELSE and WHILE-DO. Note that these pro- 1987), they differ from each other in many ways. For exam- gramming constructs are specific uses of the choice operator ple, the PRS architecture is designed to plan agents’ goals and recursion, respectively. (desires) while the 3APL architecture is designed to con- Definition 3 (Goal Programming constructs) Let BA be trol and revise robots’ control program. In fact, a goal in a set of basic actions, BF be a set of belief sentences, the 3APL architecture is a control program which can be ¼; ¼1; : : : ; ¼m 2 GOAL and Á 2 BF . Then, the set of compared to plans in the PRS architecture. Moreover, there programming constructs for 3APL goals (GOAL) can be is no ingredient in the PRS architecture that corresponds to defined as follows: the practical reasoning rules which is a powerful mechanism ² BactionGoal: BA ⊆ GOAL to revise mental attitudes. Finally, the deliberation cycle in ² PredGoal: BF ⊆ GOAL 3APL will become a programmable component while the deliberation cycle in PRS is integrated in the interpreter. ² TestGoal: if Á 2 BF , then Á? 2 GOAL ² SkipGoal: skip 2 GOAL 3APL Programming Language ² SequenceGoal: if ¼1; : : : ; ¼n 2 GOAL, then ¼ ; ... ; ¼ 2 GOAL 3APL (Hindriks et al. 1999) consists of languages for 1 n ² IfGoal: IF Á THEN ¼ ELSE ¼ 2 GOAL beliefs, basic actions, goals, and practical reasoning rules. 1 2 A set of programming constructs has been introduced ² WhileGoal: WHILE Á DO ¼ 2 GOAL. for each of these languages.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages7 Page
-
File Size-