JP2007048094A - Plan execution device, plan execution method and plan execution program - Google Patents

Plan execution device, plan execution method and plan execution program Download PDF

Info

Publication number
JP2007048094A
JP2007048094A JP2005232627A JP2005232627A JP2007048094A JP 2007048094 A JP2007048094 A JP 2007048094A JP 2005232627 A JP2005232627 A JP 2005232627A JP 2005232627 A JP2005232627 A JP 2005232627A JP 2007048094 A JP2007048094 A JP 2007048094A
Authority
JP
Japan
Prior art keywords
plan
execution
action
interrupt
goal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
JP2005232627A
Other languages
Japanese (ja)
Inventor
Hisashi Hayashi
久志 林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2005232627A priority Critical patent/JP2007048094A/en
Publication of JP2007048094A publication Critical patent/JP2007048094A/en
Abandoned legal-status Critical Current

Links

Images

Landscapes

  • Manipulator (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a plan execution device capable of resuming a suspended plan achieving a goal after execution of an interrupt plan without increasing a processing burden. <P>SOLUTION: This plan execution device has: a plan execution control means 160 suspending execution of the plan during execution when acquiring the interrupt goal, evacuating the plan held in an in-execution plan holding means 164 to an in-suspension plan holding means 166, and making the in-execution plan holding means 164 hold the interrupt plan prepared by a plan preparation means 150; a plan update means 120 updating contents of the plan held by the in-suspension plan holding means 166 on the basis of execution contents; and a plan resumption control means 120 moving the plan of the in-suspension plan holding means 166 to the in-execution plan holding means 164 when completing the execution of the interrupt plan, and resuming the execution of the plan held by the in-execution plan holding means 164. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、プラン実行装置、プラン実行方法およびプラン実行プログラムに関するものである。   The present invention relates to a plan execution device, a plan execution method, and a plan execution program.

従来、あるタスク列であるプランを実行中に、他のプランの割り込みが行われる場合がある。この場合に、割込プランの実行を管理する方法としてスケジューリング方式が知られている。このスケジューリング方式としては、例えば、複数の割り込みがあった場合には、これらの優先順序をつけるものが知られている(例えば、「特許文献1」参照)。   Conventionally, another plan may be interrupted while executing a plan that is a certain task sequence. In this case, a scheduling method is known as a method for managing execution of the interrupt plan. As this scheduling method, for example, when there are a plurality of interrupts, a method for giving priority to these interrupts is known (see, for example, “Patent Document 1”).

さらにある達成すべき目的であるゴールを達成するためのプランを実行しているときに、割り込みにより他のプランを実行した場合であっても、ゴールが達成されるようなプランニングが望まれている。   Furthermore, when a plan for achieving a goal that is a goal to be achieved is being executed, planning is required so that the goal can be achieved even if another plan is executed by interruption. .

特開平06−187171号公報Japanese Patent Laid-Open No. 06-187171

しかしながら、割り込みにより他のプランを実行した後で、ゴールが達成されるようなプランを再度プランニングした場合には、割り込みにより実行したプランを含むプランを作成してしまう可能性がある。   However, if another plan is executed by interruption and a plan that achieves the goal is planned again, a plan including the plan executed by interruption may be created.

この問題に対応するためには、実行済みのプランの履歴を保持することが考えられるが、履歴を保持する処理が必要であり、また、実行済みのプランを実行するのを避けるためのルールを作成する必要があり、処理量が増加するという問題があった。   To cope with this problem, it is possible to keep the history of the executed plan, but it is necessary to keep the history, and rules to avoid executing the executed plan are required. There is a problem that the amount of processing increases because it is necessary to create.

本発明は、上記に鑑みてなされたものであって、処理負担を増加させることなく、あるゴールを達成するためのプランを中断し、他の割込プランを実行した後でゴールを達成するプランを再開することのできるプラン実行装置を提供することを目的とする。   The present invention has been made in view of the above, and is a plan for interrupting a plan for achieving a certain goal without increasing the processing burden and achieving the goal after executing another interrupt plan. It is an object of the present invention to provide a plan execution device that can resume the process.

上述した課題を解決し、目的を達成するために、本発明は、ある目的を示すゴールを達成するプランを実行するプラン実行装置であって、前記ゴールを達成可能なプランを保持する実行中プラン保持手段と、前記実行中プラン保持手段に保持されている前記プランを実行するプラン実行手段と、前記プラン実行手段が実行を中断したプランを保持する中断中プラン保持手段と、前記プラン実行手段が前記プランを実行中に、割り込みにより前記ゴールに優先して達成すべき割込ゴールを取得するゴール取得手段と、前記ゴール取得手段が取得した前記割込ゴールに基づいて、当該割込ゴールを達成するために実行すべき割込プランを作成するプラン作成手段と、前記ゴール取得手段が前記割込ゴールを取得した場合に、前記プラン実行手段が実行中のプランの実行を中断し、前記実行中プラン保持手段に保持されているプランを前記中断中プラン保持手段に退避させ、かつ前記プラン作成手段により作成された前記割込プランを前記実行中プラン保持手段に保持させるプラン実行制御手段と、前記プラン実行手段が前記割込プランを実行した場合に、実行内容に基づいて前記中断中プラン保持手段が保持しているプランの内容を更新するプラン更新手段と、前記プラン実行手段が前記割込プランの実行を完了した場合に、前記中断中プラン保持手段に保持されている更新後のプランを前記実行中プラン保持手段に移動させた後、前記実行中プラン保持手段に保持されている前記プランの実行を再開するプラン再開制御手段とを備えたことを特徴とする。   In order to solve the above-described problems and achieve an object, the present invention is a plan execution apparatus that executes a plan that achieves a goal that represents a certain object, and that is an executing plan that holds a plan that can achieve the goal Holding means, plan executing means for executing the plan held in the executing plan holding means, suspended plan holding means for holding a plan that has been interrupted by the plan executing means, and the plan executing means While executing the plan, goal acquisition means for acquiring an interrupt goal to be achieved in preference to the goal by interruption, and achieving the interrupt goal based on the interrupt goal acquired by the goal acquisition means A plan creation means for creating an interrupt plan to be executed in order to execute, and when the goal acquisition means acquires the interrupt goal, the plan execution means Suspends execution of a plan being executed, saves the plan held in the executing plan holding means to the saving plan holding means, and executes the interrupt plan created by the plan creating means Plan execution control means to be held by the plan holding means, and a plan for updating the contents of the plan held by the suspended plan holding means based on the execution contents when the plan execution means executes the interrupt plan When the updating unit and the plan execution unit complete the execution of the interrupt plan, the updated plan held in the suspended plan holding unit is moved to the executing plan holding unit, And plan resumption control means for resuming execution of the plan held in the executing plan holding means.

本発明にかかるプラン実行装置は、プランを実行すると実行内容に応じて、実行中のプランだけでなく中断中プラン保持手段に保持されているプランも更新するので、中断中プラン保持手段に保持されているプランを再開する際には、既に実行されたプランの内容を反映した適切なプランを実行することができるという効果を奏する。   The plan execution apparatus according to the present invention updates not only the currently executed plan but also the plan held in the suspended plan holding means according to the execution contents, so that it is held in the suspended plan holding means. When resuming the current plan, it is possible to execute an appropriate plan reflecting the contents of the already executed plan.

以下に、本発明にかかるプラン実行装置、プラン実行方法およびプラン実行プログラムの実施の形態を図面に基づいて詳細に説明する。なお、この実施の形態によりこの発明が限定されるものではない。   Hereinafter, embodiments of a plan execution device, a plan execution method, and a plan execution program according to the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to the embodiments.

図1は、本実施の形態にかかるプラン作成装置を備えた移動ロボット10の機能構成を示す図である。   FIG. 1 is a diagram illustrating a functional configuration of a mobile robot 10 including a plan creation device according to the present embodiment.

移動ロボット10は、ゴール受付部100と、ゴール保持部110と、実行管理部120と、信念DB130と、プラン作成用知識DB140と、プラン作成部150と、プランDB制御部160と、アクション実行部170とを備えている。   The mobile robot 10 includes a goal receiving unit 100, a goal holding unit 110, an execution management unit 120, a belief DB 130, a plan creation knowledge DB 140, a plan creation unit 150, a plan DB control unit 160, and an action execution unit. 170.

ゴール受付部100は、ゴールを取得する。ゴール受付部100はさらに、ゴールを通常ゴールとするか割込ゴールとするかの指定を受け付ける。ここでゴールとは、実行完了したいタスクまたは達成したい状態のことである。なお、他の例としては、達成したい目標状態であってもよい。また、割込ゴールとは、割り込みにより達成されるゴールであり、通常ゴールとは、割込ゴール以外のゴール、すなわちゴールの取得順に処理されるべきゴールである。   The goal receiving unit 100 acquires a goal. The goal receiving unit 100 further receives designation of whether the goal is a normal goal or an interrupt goal. Here, the goal is a task desired to be completed or a state desired to be achieved. As another example, a target state to be achieved may be used. The interrupt goal is a goal achieved by interruption, and the normal goal is a goal other than the interrupt goal, that is, a goal to be processed in the order of acquisition of the goals.

ゴール保持部110は、割込ゴール待ち行列112と、通常ゴール待ち行列114とを有している。割込ゴール待ち行列112は、ゴール受付部100が取得した割込ゴールを取得順に保持している。通常ゴール待ち行列114は、ゴール受付部100が取得した通常ゴールを取得順に保持している。   The goal holding unit 110 has an interrupt goal queue 112 and a normal goal queue 114. The interrupt goal queue 112 holds the interrupt goals acquired by the goal receiving unit 100 in the order of acquisition. The normal goal queue 114 holds the normal goals acquired by the goal receiving unit 100 in the order of acquisition.

信念DB130は、信念情報を格納している。ここで、信念情報とは、処理の対象となる移動ロボット10の状態に関する情報や、処理の前提となる状況など動的に更新される情報である。ロボット10の状態に関する情報としては、例えば、ロボットが階段にいる場合には、ロボットの存在位置が階段であることを示す情報である。この情報により、階段以外の場所で実行されるべきタスクは、実行できないことがわかる。   The belief DB 130 stores belief information. Here, the belief information is information that is dynamically updated, such as information on the state of the mobile robot 10 to be processed and a situation that is a premise of the process. For example, when the robot is on the stairs, the information regarding the state of the robot 10 is information indicating that the position of the robot is the stairs. This information indicates that a task that should be executed at a place other than the stairs cannot be executed.

また、処理の前提となる状況としては、例えば、現在時刻、現在日時などがある。例えば、「おはようございます」と音声出力するというタスクは、午前中以外の時間帯には適さない。現在時刻を示す信念に基づけば、「おはようございます」と音声出力するというタスクを実行するか否かを判断することができる。   Further, as a precondition for processing, for example, there are a current time, a current date and the like. For example, a task of outputting “Good morning” as a voice is not suitable for a time zone other than in the morning. Based on the belief indicating the current time, it is possible to determine whether or not to execute the task of outputting the voice “Good morning”.

信念DB130はさらに、移動ロボット10の移動対象とする領域のトポロジカル地図を格納している。このように、信念DB130は、信念情報として、移動ロボット10の処理状態や、外部状態に関する情報を保持している。   The belief DB 130 further stores a topological map of an area to be moved by the mobile robot 10. Thus, the belief DB 130 holds information regarding the processing state of the mobile robot 10 and the external state as belief information.

プラン作成部150は、割込ゴール待ち行列112または通常ゴール待ち行列114の先頭のゴールに対応するプランを作成する。ここで、図2を参照しつつ、プランおよびアクションについて詳述する。   The plan creation unit 150 creates a plan corresponding to the first goal in the interrupt goal queue 112 or the normal goal queue 114. Here, the plan and action will be described in detail with reference to FIG.

図2は、プランとアクションの関係を示す図である。プランは、タスクの実行順序を表すものである。例えば、全順序プラン「Task1,Task2,Task3」は、図2に示すように、まず「Task1」というタスクを実行し、次に「Task2」というタスクを実行し、最後に「Task3」というタスクを実行することを表す。   FIG. 2 is a diagram showing the relationship between plans and actions. The plan represents the task execution order. For example, as shown in FIG. 2, the total order plan “Task1, Task2, Task3” first executes a task “Task1”, then executes a task “Task2”, and finally executes a task “Task3”. Indicates to execute.

本実施の形態においては、アクション実行部170が実行可能なタスクをアクションと称する。すなわち、アクションとはアクション実行部170の実行単位の処理である。プランは、複数のアクションを有している。また、本実施の形態においては、全順序プランのことをプランと称する。   In the present embodiment, a task that can be executed by the action execution unit 170 is referred to as an action. In other words, an action is a process of an execution unit of the action execution unit 170. The plan has a plurality of actions. In the present embodiment, the total order plan is referred to as a plan.

プランには、具体的プランと抽象的プランがある。ここで、具体的プランとは、アクションの実行順序のみを表すプランのことである。抽象的プランとは、アクションでないタスクが存在するプランである。移動ロボット10は、抽象的プランを具体的プランに分解して実行する。   There are concrete plans and abstract plans. Here, the specific plan is a plan that represents only the execution order of actions. An abstract plan is a plan in which there are tasks that are not actions. The mobile robot 10 decomposes the abstract plan into specific plans and executes them.

プラン作成用知識DB140は、プラン作成部150がプランを作成するときに参照すべき情報であるプラン作成用知識を格納している。具体的には、プランに含めるべきアクションを格納している。さらに、各アクションに対応付けて、実行前条件および実行効果を格納している。実行前条件および実行効果については後述する。   The plan creation knowledge DB 140 stores plan creation knowledge, which is information to be referred to when the plan creation unit 150 creates a plan. Specifically, it stores actions to be included in the plan. Further, pre-execution conditions and execution effects are stored in association with each action. The pre-execution condition and the execution effect will be described later.

プランDB制御部160は実行中プランDB164および中断中プランDB166を制御する。実行中プランDB164は、実行対象のプランを格納する。中断中プランDB166は、中断中のプランを格納する。   The plan DB control unit 160 controls the executing plan DB 164 and the suspended plan DB 166. The executing plan DB 164 stores an execution target plan. The suspended plan DB 166 stores a suspended plan.

具体的には、プランの実行、中断および再開を管理する。また、プランの内容を更新する。また複数のプランが格納されている場合には、複数のプランの中から実行すべきプランを選択する。さらに、プランからアクションを生成する。   Specifically, it manages the execution, suspension and resumption of plans. In addition, the contents of the plan are updated. If a plurality of plans are stored, a plan to be executed is selected from the plurality of plans. Furthermore, an action is generated from the plan.

アクション実行部170は、実行中プランDB164に格納されているプランに出現するアクションを実行する。すなわちプランに含まれるアクションの順番にしたがって、複数のアクションを順に実行する。   The action execution unit 170 executes an action that appears in the plan stored in the executing plan DB 164. That is, a plurality of actions are executed in order according to the order of actions included in the plan.

実行管理部120は、ゴール保持部110、信念DB130、プラン作成部150、プランDB制御部160およびアクション実行部170を管理する。例えば、アクション実行部170によるアクションの実行が完了すると、信念DB130の情報を、アクション実行後の状態に更新する。   The execution management unit 120 manages the goal holding unit 110, the belief DB 130, the plan creation unit 150, the plan DB control unit 160, and the action execution unit 170. For example, when the action execution by the action execution unit 170 is completed, the information in the belief DB 130 is updated to the state after the action is executed.

図3は、信念DB130に格納されているトポロジカル地図を模式的に示す図である。このトポロジカル地図は、移動ロボット10が移動する領域の地図である。地図上の点(ノード):node1, node2, node3, node4, node5, node6の相対座標は、それぞれ、(0,20), (10,20), (0,10), (10,10), (0,0), (10,0)である。   FIG. 3 is a diagram schematically showing a topological map stored in the belief DB 130. This topological map is a map of an area where the mobile robot 10 moves. Points (nodes) on the map: node1, node2, node3, node4, node5, and node6 are (0,20), (10,20), (0,10), (10,10), (0,0), (10,0).

この信念情報は、具体的には以下の記述として信念DB130に格納されている。

belief(coordinate(node1,0,20)).
belief(coordinate(node2,10,20)).
belief(coordinate(node3,0,10)).
belief(coordinate(node4,10,10)).
belief(coordinate(node5,0,0)).
belief(coordinate(node6,10,0)).
This belief information is specifically stored in the belief DB 130 as the following description.

belief (coordinate (node1, 0, 20)).
belief (coordinate (node2, 10, 20)).
belief (coordinate (node3,0,10)).
belief (coordinate (node4, 10, 10)).
belief (coordinate (node5,0,0)).
belief (coordinate (node6,10,0)).

また、展示物:exhibition1、exhibition2、exhibition3およびexhibition4はそれぞれ、node1、node2、node3、node4にある。このような信念情報は、具体的には、以下の記述として信念DB130に格納されている。

belief(location(exhibition1,node1)).
belief(location(exhibition2,node2)).
belief(location(exhibition3,node3)).
belief(location(exhibition4,node4)).
Exhibits: exhibition1, exhibition2, exhibition3, and exhibition4 are respectively in node1, node2, node3, and node4. Specifically, such belief information is stored in the belief DB 130 as the following description.

belief (location (exhibition1, node1)).
belief (location (exhibition2, node2)).
belief (location (exhibition3, node3)).
belief (location (exhibition4, node4)).

さらに、展示物:exhibition1、exhibition2、exhibition3、exhibition4とトイレ:toiletに関する説明として、「これは世界初の日本語ワープロです。」、「これはロボット操作用のソフトウェアです。」、「これはロボット操作用のコンピュータです。」、「これは駒をまわすロボットです。」が与えられている。このような信念情報は、具体的には、以下の記述として信念DB130に格納されている。

belief(contents(exhibition1,' これは世界初の日本語ワープロです。')).
belief(contents(exhibition2,' これはロボット操作用のソフトウェアです。')).
belief(contents(exhibition3,' これはロボット操作用のコンピュータです。')).
belief(contents(exhibition4,' これは駒をまわすロボットです。')).
In addition, as for explanations about exhibits: exhibition1, exhibition2, exhibition3, exhibition4 and toilet: toilet, "This is the world's first Japanese word processor.", "This is robot operation software.""This is a robot that turns a piece." Specifically, such belief information is stored in the belief DB 130 as the following description.

belief (contents (exhibition1, 'This is the world's first Japanese word processor.')).
belief (contents (exhibition2, 'This is software for robot operation')).
belief (contents (exhibition3, 'This is a computer for robot operation')).
belief (contents (exhibition4, 'This is a robot that turns a piece.')).

node1からnode2は移動可能であり、かつ、node2からnode1へも移動可能である。この信念情報は、具体的には、以下の記述として信念DB130に格納されている。

belief(connects(node1,node2)).
belief(connects(node2,node1)).
From node1 to node2 is movable, and from node2 to node1 is also movable. Specifically, the belief information is stored in the belief DB 130 as the following description.

belief (connects (node1, node2)).
belief (connects (node2, node1)).

同様にノード間の接続関係は以下のように記述され、信念DB130に格納されている。

belief(connects(node1,node3)).
belief(connects(node3,node1)).
belief(connects(node2,node4)).
belief(connects(node4,node2)).
belief(connects(node3,node4)).
belief(connects(node4,node3)).
belief(connects(node3,node5)).
belief(connects(node5,node3)).
belief(connects(node4,node6)).
belief(connects(node6,node4)).
belief(connects(node5,node6)).
belief(connects(node6,node5)).
Similarly, the connection relationship between nodes is described as follows and stored in the belief DB 130.

belief (connects (node1, node3)).
belief (connects (node3, node1)).
belief (connects (node2, node4)).
belief (connects (node4, node2)).
belief (connects (node3, node4)).
belief (connects (node4, node3)).
belief (connects (node3, node5)).
belief (connects (node5, node3)).
belief (connects (node4, node6)).
belief (connects (node6, node4)).
belief (connects (node5, node6)).
belief (connects (node6, node5)).

初期状態での移動ロボット10の位置はnode6であるとする。この信念情報は、具体的には以下の記述として信念DB130に格納されている。

belief(at(node6)).

ここで、at(node6)は、node6から移動ロボット10が移動してしまうと成り立たなくなる。すなわち、at(_)の真偽値は動的に変化する。ここで「_」は、無名変数であり、いずれの値が代入されてもよいことを示している。このように真偽値が動的に変化することをあわせて、具体的には、以下の記述が信念DB130に格納されている。

dy(at(_)).
Assume that the position of the mobile robot 10 in the initial state is node6. This belief information is specifically stored in the belief DB 130 as the following description.

belief (at (node6)).

Here, at (node6) does not hold when the mobile robot 10 moves from node6. That is, the true / false value of at (_) changes dynamically. Here, “_” is an anonymous variable and indicates that any value may be substituted. In addition to the fact that the true / false value changes dynamically as described above, specifically, the following description is stored in the belief DB 130.

dy (at (_)).

初期状態での移動ロボット10は人:taroと一緒にいるとする。この信念情報は、具体的には以下の記述として信念DB130に格納されている。

belief(with(taro)).

ここで、with(taro)は、移動ロボット10からtaroが離れてしてしまうと成り立たなくなる。そこで、信念DB130において以下の記述が宣言されている。

dy(with(_)).
It is assumed that the mobile robot 10 in the initial state is with a person: taro. This belief information is specifically stored in the belief DB 130 as the following description.

belief (with (taro)).

Here, with (taro) is no longer valid when taro leaves the mobile robot 10. Therefore, the following description is declared in the belief DB 130.

dy (with (_)).

さらに、以下に示す信念が格納されている。

pick(Selected,ListRest,List)

これはリスト:Listの要素を1つ選択し、その要素をSelectedとしたときのListの残りのリストはListRestであることを示す。ただし、Selectedは変数で、ListRestとListはリストの変数である。
In addition, the following beliefs are stored.

pick (Selected, ListRest, List)

This indicates that when one element of the list: List is selected and that element is selected, the remaining list of List is ListRest. However, Selected is a variable and ListRest and List are variables of the list.

このような記述(pick(Selected,ListRest,List))は、具体的には以下の記述として信念DB130に格納される。

belief(pick(H,T,[H|T])).
belief(pick(X,[H|Rest],[H|T]),[
pick(X,Rest,T)
]).

これは、pick(H,T,[H|T])が常に成り立ち、pick(X,Rest,T)が成り立つならば、pick(X,[H|Rest],[H|T])も成り立つということを表している。
Such a description (pick (Selected, ListRest, List)) is specifically stored in the belief DB 130 as the following description.

belief (pick (H, T, [H | T])).
belief (pick (X, [H | Rest], [H | T]), [
pick (X, Rest, T)
]).

This means that pick (H, T, [H | T]) always holds, and if pick (X, Rest, T) holds, pick (X, [H | Rest], [H | T]) also holds. It expresses that.

図4は、プラン作成用知識DB140が格納しているプラン作成用知識を模式的に示す図である。プラン作成用知識は、具体的には、プランに含めるべきアクションである。さらに、アクションに付与される実行前条件と実行効果とが格納されている。ここで、実行前条件とは、アクションを実行する直前に成立している必要のある条件のことである。また、実行効果とは、アクション実行直後から継続的に成立する状態や性質等である。同じアクションでも、そのアクションを含むプランが異なるために、実行前条件が異なる場合がある。そこで、本実施の形態においては、プランに含まれる各アクションの実行前条件と実行効果を明示的にプラン内部に記録することとする。   FIG. 4 is a diagram schematically showing plan creation knowledge stored in the plan creation knowledge DB 140. Specifically, knowledge for creating a plan is an action to be included in the plan. Furthermore, pre-execution conditions and execution effects given to the actions are stored. Here, the pre-execution condition is a condition that needs to be satisfied immediately before the action is executed. The execution effect is a state or property that is continuously established immediately after the execution of the action. Even in the same action, the pre-execution condition may be different because the plan including the action is different. Therefore, in this embodiment, the pre-execution condition and execution effect of each action included in the plan are explicitly recorded in the plan.

図4に示すアクション「AからBに移動」に対しては、実行前条件として「現在位置はA」が記録されている。また、実行効果として「現在位置はAでなくなる」、「実行位置はBになる」が記録されている。   For the action “move from A to B” shown in FIG. 4, “current position is A” is recorded as a pre-execution condition. In addition, “the current position is no longer A” and “the execution position is B” are recorded as execution effects.

また、アクション「BからCに移動」に対しては、実行前条件として「現在位置はB」が記録されている。また、実行効果として「現在位置はBでなくなる」、「実行位置はCになる」が記録されている。   For the action “Move from B to C”, “current position is B” is recorded as a pre-execution condition. In addition, “the current position is no longer B” and “the execution position is C” are recorded as execution effects.

以上の内容は、具体的には、以下の記述としてプラン作成用知識DB140に記録される。

[precond([at(a)],[ ]),
move(a, b),
effect([terminates(at(a)), initiates(at(b))])
precond([at(b)] ,[ ]),
move(b, c),
effect([terminates(at(b)), initiates(at(c))])]

ここで、「move(a, b)」は、a地点からb地点まで移動するアクションを表している。「precond([at(a)] ,[ ])」は、アクション「move(a, b)」の実行前条件を示している。ここで、「at(a)」は、a地点にいることを表している。
Specifically, the above contents are recorded in the plan creation knowledge DB 140 as the following description.

[precond ([at (a)], []),
move (a, b),
effect ([terminates (at (a)), initiates (at (b))])
precond ([at (b)], []),
move (b, c),
effect ([terminates (at (b)), initiates (at (c))])]

Here, “move (a, b)” represents an action of moving from point a to point b. “Precond ([at (a)], [])” indicates a pre-execution condition of the action “move (a, b)”. Here, “at (a)” represents being at point a.

また、「effect([terminates(at(a)), initiates(at(b))])」は、アクション「move(a, b)」に対する実行効果を表している。「terminates(at(a))」は、現在位置がa地点でなくなることを表している。また、「initiates(at(b))」は、現在位置がb地点になることを表している。   Further, “effect ([terminates (at (a)), initiates (at (b))]” ”represents an execution effect for the action“ move (a, b) ”. “Terminates (at (a))” represents that the current position is not a point a. Further, “initates (at (b))” represents that the current position is a point b.

同様に、「move(b, c)」は、b地点からc地点まで移動するアクションを表している。「precond([at(b)] ,[ ])」は、アクション「move(b, c)」の実行前条件を表している。また、「effect([terminates(at(b)), initiates(at(c))])」は、実行効果を表している。   Similarly, “move (b, c)” represents an action of moving from point b to point c. “Precond ([at (b)], [])” represents a pre-execution condition of the action “move (b, c)”. Also, “effect ([terminates (at (b)), initiates (at (c))]” ”represents an execution effect.

例えば、テキストを読むというアクションには、実行前条件および実行効果は存在しない。このように、実行前条件および実行効果が存在しない場合には、以下の記述がプラン作成用知識DB140に格納される。

action(speak(Text),[
],[
]).

なお、この記述は、読むという動作の対象を「テキスト」とした場合のアクションを表すが、「speak(Text)」の「Text」は、変数であり任意の文字列を代入することにより、この文字列を読む動作となる。
For example, the action of reading text has no pre-execution condition and no execution effect. Thus, when the pre-execution condition and the execution effect do not exist, the following description is stored in the plan creation knowledge DB 140.

action (speak (Text), [
], [
]).

Note that this description represents an action when the target of the reading operation is “text”, but “Text” of “speak (Text)” is a variable and is substituted by an arbitrary character string. Reads a character string.

また、現在のノードから他のノードを経由することなく、直接移動可能なノードに移動するというアクションは、以下のように記述される。

action(gotoNextNode(NextNode),[
at(CurrentNode),
connects(CurrentNode,NextNode)
],[
terminates(at(CurrentNode)),
initiates(at(NextNode))
]).

ここで、「gotoNextNode(NextNode)」は、アクションを表している。また、「CurrentNode」は、現在いるノードを表している。ここで、CurrentNodeは変数である。NextNodeは、移動先のノードを表している。ここで、NextNodeは、変数である。
The action of moving from the current node to a node that can be moved directly without going through another node is described as follows.

action (gotoNextNode (NextNode), [
at (CurrentNode),
connections (CurrentNode, NextNode)
], [
terminates (at (CurrentNode)),
initiates (at (NextNode))
]).

Here, “gotoNextNode (NextNode)” represents an action. Further, “CurrentNode” represents a current node. Here, CurrentNode is a variable. NextNode represents the destination node. Here, NextNode is a variable.

「at(CurrentNode)」は実行前条件である。現在のノードが、CurrentNodeであることを表している。また、「connects(CurrentNode,NextNode)」も実行前条件である。CurrentNodeからNextNodeへ直接移動可能であることを表している。このアクションの効果「terminates(at(CurrentNode)),initiates(at(NextNode))」は、現在位置がCurrentNodeからNextNodeに変化することを表している。   “At (CurrentNode)” is a pre-execution condition. This indicates that the current node is the CurrentNode. Also, “connects (CurrentNode, NextNode)” is a pre-execution condition. This indicates that it is possible to move directly from the CurrentNode to the NextNode. The effect “terminates (at (CurrentNode)), initiates (at (NextNode))” of this action indicates that the current position changes from CurrentNode to NextNode.

また例えば、changeGoal(Goal)は、実行中のアクションの実行を終了し、かわりにゴール:Goal(Goalは変数)を実行するというアクションを表している。すなわち、実行中のプランをすべて実行中プランDB164から削除し、Goalというタスクのためのプランに置き換えるというアクションを表している。なお、このアクションに対する実行前条件および実行効果は存在しないので、以下の記述が信念DB130に格納される。

action(changeGoal(Goal),[
],[
]).
Also, for example, changeGoal (Goal) represents an action of ending the execution of the action being executed and executing the goal: Goal (Goal is a variable) instead. In other words, this represents an action of deleting all the executing plans from the executing plan DB 164 and replacing them with a plan for a task called Goal. Since there are no pre-execution conditions and execution effects for this action, the following description is stored in the belief DB 130.

action (changeGoal (Goal), [
], [
]).

また、信念DB130においては、アクションでないタスクの分解方法の定義が格納されている。「ノード:Nodeからノード:Nodeに移動する」というタスク:

gotoNodeWide(Node,Node)

には、実行前条件および実行効果が存在せず、以下のように記述される。

htn(gotoNodeWide(Node,Node),[
],[
]).

ここで、Nodeは変数である。
The belief DB 130 stores a definition of a method for disassembling a task that is not an action. The task "Move from node: Node to node: Node":

gotoNodeWide (Node, Node)

Does not have pre-execution conditions and execution effects, and is described as follows.

htn (gotoNodeWide (Node, Node), [
], [
]).

Here, Node is a variable.

「ノード:StartNodeからノード:GoalNodeに移動する」というタスク:

gotoNodeWide(StartNode,GoalNode)

は、以下に示す複数のタスクを実行することにより、実行が達成される。すなわち、まず「現在いるノード:StartNodeから隣のノード:NextNodeに移動する」というタスク:

gotoNextNode(StartNode,NextNode)

を実行する。次に、「隣のノード:NextNodeから目的地のノード:GoalNodeに移動する」というタスク:

gotoNodeWide(NextNode,GoalNode)

を実行する。なお、ここで、StartNode、NextNodeおよびGoalNodeは、変数である。これは、以下のように記述される。

htn(gotoNodeWide(StartNode,GoalNode),[
],[
gotoNextNode(StartNode,NextNode),
gotoNodeWide(NextNode,GoalNode)
]).
The task "Move from node: StartNode to node: GoalNode":

gotoNodeWide (StartNode, GoalNode)

The execution is achieved by executing a plurality of tasks shown below. That is, first, a task “moving from the current node: StartNode to the next node: NextNode”:

gotoNextNode (StartNode, NextNode)

Execute. Next, the task of “moving from the next node: NextNode to the destination node: GoalNode”:

gotoNodeWide (NextNode, GoalNode)

Execute. Here, StartNode, NextNode, and GoalNode are variables. This is described as follows.

htn (gotoNodeWide (StartNode, GoalNode), [
], [
gotoNextNode (StartNode, NextNode),
gotoNodeWide (NextNode, GoalNode)
]).

また、「対象物:Objectに関する説明をする」というタスク:

explain(Object,Person)

は、以下に示す4つの実行前条件(実行前条件1、実行前条件2、実行前条件3および実行前条件4)が成り立つ場合に、「文字列:Textを音声出力する」というタスク:

speak(Text)

を実行することにより実行が達成される。なおここで、Object、NodeおよびTextは、変数である。

実行前条件1は、現在位置がノード:Nodeであることであり、以下のように記述される。

at(Node)

実行前条件2は、対象物:Objectの位置が現在位置のノード:Nodeであることであり、以下のように記述される。

location(Object,Node)

実行前条件3は、ロボットが人:Personと一緒にいることであり、以下のように記述される。

with(Person)

実行前条件4は、対象物:Objectの説明文がTextであることであり、以下のように記述される。

contents(Object,Text)

以上の内容は、以下のように記述される。

htn(explain(Object,Person),[
at(Node),
location(Object,Node),
with(Person),
contents(Object,Text)
],[
speak(Text)
]).
Also, a task “I will explain about the object: Object”:

explain (Object, Person)

Is a task of “character string: text is output by voice” when the following four pre-execution conditions (pre-execution condition 1, pre-execution condition 2, pre-execution condition 3 and pre-execution condition 4) are satisfied:

spike (Text)

Execution is achieved by executing Here, Object, Node, and Text are variables.

The pre-execution condition 1 is that the current position is a node: Node, and is described as follows.

at (Node)

The pre-execution condition 2 is that the position of the object: Object is the current position node: Node, and is described as follows.

location (Object, Node)

The pre-execution condition 3 is that the robot is with a person: Person, and is described as follows.

with (Person)

The pre-execution condition 4 is that the description of the object: Object is Text, and is described as follows.

contents (Object, Text)

The above contents are described as follows.

htn (explain (Object, Person), [
at (Node),
location (Object, Node),
with (Person),
contents (Object, Text)
], [
spike (Text)
]).

また、「対象物:Exhibitionの前に、人:Personを連れて行き、その対象物の説明をする」というタスク:

show(Exhibition,Person)

は、以下に示す2つの実行前条件(実行前条件1および実行前条件2)が成り立つ場合に、「対象物:Exhibitionのあるノード:GoalNodeに行く」というタスク:
gotoNodeWide(StartNode,GoalNode)

を実行し、さらにその後「その対象物:Exhibhitionに関して、人:Personに説明する」というタスク:

explain(Exhibition,Person)

を実行することにより、実行が達成される。なおここで、exhibition、Person、StartNodeおよびGoalNodeは、変数である。

実行前条件1は、現在いるノードがStartNodeであることであり、以下のように記述される。

at(startNode)

また、実行前条件2は、対象物:Exhibitionがある場所がGoalNodeであることであり、以下のように記述される。

location(Exhibition,GoalNode)

以上の内容は、以下のように記述される。

htn(show(Exhibition,Person),[
at(StartNode),
location(Exhibition,GoalNode)
],[
gotoNodeWide(StartNode,GoalNode),
explain(Exhibition,Person)
]).
In addition, the task “People: Person is taken before the subject: Exhibition to explain the subject”:

show (Exhibition, Person)

Is a task “object: go to node with Exhibit: GoalNode” when the following two pre-execution conditions (pre-execution condition 1 and pre-execution condition 2) are satisfied:
gotoNodeWide (StartNode, GoalNode)

And after that, the task “explain to the person: Person about the object: Exhibition”:

explain (Exhibition, Person)

Execution is achieved by executing Here, exhibition, Person, StartNode, and GoalNode are variables.

Pre-execution condition 1 is that the current node is a StartNode, and is described as follows.

at (startNode)

The pre-execution condition 2 is that the location where the object: Exhibition is located is a GoalNode, and is described as follows.

location (Exhibition, GoalNode)

The above contents are described as follows.

htn (show (Exhibition, Person), [
at (StartNode),
location (Exhibition, GoalNode)
], [
gotoNodeWide (StartNode, GoalNode),
explain (Exhibition, Person)
]).

また、showAround(Objects,Person)というタスクは、0個以上の対象物のリスト:Objectsの各対象物に対して、その対象物のある場所に行って、人:Personに、その対象物の説明をするというタスクである。例えば、以下に示す記述例がある。

htn(showAround([],_),[
],[
]).

なお、対象物のリストが空リスト:[]である場合には、何もしなくてよい。また“_”は無名変数である。
Also, a task called showAround (Objects, Person) goes to a place where the object is located for each object in the list of zero or more objects: Objects, and explains the object to Person: Person. It is a task to do. For example, there are the following description examples.

htn (showAround ([], _), [
], [
]).

If the list of objects is an empty list: [], nothing needs to be done. “_” Is an anonymous variable.

また、以下に示す記述例がある。

htn(showAround([Exhibition|EXs],Person),[
pickOne(NextEXhibition,RestEXs,[Exhibition|EXs])
],[
show(NextExhibition,Person),
changeGoal(showAround(RestEXs,Person))
]).

これは、対象物のリストが1つ以上の対象物を含むリスト:

[Exhibition|EXs]

であり、1つ以上の対象物のリストから適当な1つの対象物:NextExhibitionを選択すると、残りの対象物のリストはRestEXsであるという1つの実行前条件:

pickOne(NextExhibition,RestEXs,[Exhibition|EXs])

が成立するならば、タスク:

showAround([Exhibition|EXs],Person)

を実行するには、「対象物:NextExhibitionの前で、人:Personにその対象物の説明をする」というタスク:

show(NextExhibition,Person)

を実行した後に、「残りの対象物のリスト:RestEXsを案内してまわるというタスク:showAround(RestEXs ,Person)を次のゴールとして実行指示する」というタスク:

changeGoal(showAround(RestEXs,Person))

を実行すればよいことを表している。ここで、Exhibition、NextExhibition、PersonおよびObjectは、変数である。また、EXsおよびRestEXsは、リストの変数である。
In addition, there are the following description examples.

htn (showAround ([Exhibition | EXs], Person), [
pickOne (NextEXhibition, RestEXs, [Exhibition | EXs])
], [
show (NextExhibition, Person),
changeGoal (showAround (RestEXs, Person))
]).

This is a list where the list of objects contains one or more objects:

[Exhibition | EXs]

One pre-execution condition that if one appropriate object: NextExhibition is selected from a list of one or more objects, the remaining list of objects is RestEXs:

pickOne (NextExhibition, RestEXs, [Exhibition | EXs])

If is true, the task:

showAround ([Exhibition | EXs], Person)

In order to execute, “Task: Explain the subject to Person: Person in front of NextExhibition”:

show (NextExhibition, Person)

After executing the above, “remaining object list: task of guiding around RestEXs: task of instructing execution of showAround (RestEXs, Person) as the next goal”:

changeGoal (showAround (RestEXs, Person))

Indicates that it should be executed. Here, Exhibition, NextExhibition, Person, and Object are variables. EXs and RestEXs are list variables.

図5は、実施の形態にかかる移動ロボット10がプランを実行するときのプラン実行処理を示すフローチャートである。まず、ゴール受付部100がゴールを取得する(ステップS100)。次に、ゴール受付部100が取得したゴールの種別を判断する。具体的には、通常ゴールであるか割込ゴールであるかを判断する。   FIG. 5 is a flowchart illustrating plan execution processing when the mobile robot 10 according to the embodiment executes a plan. First, the goal receiving unit 100 acquires a goal (step S100). Next, the goal type acquired by the goal receiving unit 100 is determined. Specifically, it is determined whether the goal is a normal goal or an interrupt goal.

通常ゴールである場合には、取得した通常ゴールをゴール保持部110の通常ゴール待ち行列114の最後尾に挿入する。割込ゴールである場合には、取得した割込ゴールをゴール保持部110の割込ゴール待ち行列112の最後尾に挿入する(ステップS102)。   If it is a normal goal, the acquired normal goal is inserted at the end of the normal goal queue 114 of the goal holding unit 110. If it is an interrupt goal, the acquired interrupt goal is inserted at the end of the interrupt goal queue 112 of the goal holding unit 110 (step S102).

次に、実行管理部120は、ゴール保持部110の割込ゴール待ち行列112に割り込みゴールが格納されているか否かを確認する。割込ゴールが存在しない場合には(ステップS104,No)、さらに実行中プランDB164にプランが格納されているか否かを確認する。プランが存在する場合には(ステップS106,Yes)、さらに格納されているプランの少なくとも1つが既に実行済みの空プランか否かを確認する。   Next, the execution management unit 120 checks whether an interrupt goal is stored in the interrupt goal queue 112 of the goal holding unit 110. If there is no interrupt goal (No at Step S104), it is further checked whether or not a plan is stored in the executing plan DB 164. When a plan exists (step S106, Yes), it is further confirmed whether at least one of the stored plans is an already executed empty plan.

実行中プランDB164に空プランが格納されていない場合には、すなわちいずれのプランの実行も終了しておらず、かつ、実行すべきプランが格納されている場合には(ステップS108,No)、このプランに含まれるアクションのうち最初に実行されるアクション、すなわち先頭を実行する(ステップS110)。次に、実行したアクションの内容に基づいて、実行後プラン更新処理を行う(ステップS112)。ここで、実行後プラン更新処理とは、実行したアクションの内容に基づいて、対応するアクションを実行中プランDB164および中断中プランDB166から削除する処理である。実行後プラン更新処理については後述する。   When the empty plan is not stored in the executing plan DB 164, that is, when the execution of any plan is not completed and the plan to be executed is stored (No in step S108), Of the actions included in this plan, the action that is executed first, that is, the head is executed (step S110). Next, post-execution plan update processing is performed based on the content of the executed action (step S112). Here, the post-execution plan update process is a process of deleting the corresponding action from the executing plan DB 164 and the suspended plan DB 166 based on the content of the executed action. The post-execution plan update process will be described later.

ステップS108において、実行中プランDB164に空プランが格納されている場合、すなわち実行中プランDB164に既に実行済みのプランが格納されている場合には(ステップS108,Yes)、実行中プランDB164から各プランを削除する(ステップS120)。次に、中断中プランDB166にプランが格納されているか否かを確認する。プランが存在する場合には(ステップS122,Yes)、再開時プラン更新処理を行う(ステップS124)。ここで、再開時プラン更新処理とは、中断中プランDB166のプランを実行中プランDB164に移動させる際に行う処理であり、プランをタスクに分解する処理である。再開時プラン更新処理については後述する。   In step S108, when an empty plan is stored in the executing plan DB 164, that is, when an already executed plan is stored in the executing plan DB 164 (step S108, Yes), each of the executing plan DB 164 The plan is deleted (step S120). Next, it is confirmed whether or not a plan is stored in the suspended plan DB 166. When the plan exists (step S122, Yes), the restart plan update process is performed (step S124). Here, the resuming plan update process is a process performed when the plan of the suspended plan DB 166 is moved to the executing plan DB 164, and is a process of breaking the plan into tasks. The resume plan update process will be described later.

ステップS122において、中断中プランDB166にプランが存在しない場合には(ステップS122,No)、さらに実行管理部120は、ゴール保持部110の割込ゴール待ち行列112または通常ゴール待ち行列114にゴールがあるか否かを確認する。ゴールが存在する場合には(ステップS126,Yes)、ゴール処理を行う(ステップS128)。ここで、ゴール処理とは、ゴールに基づいて、プランを作成する処理である。ゴール処理については後述する。   In step S122, when the plan does not exist in the suspended plan DB 166 (step S122, No), the execution management unit 120 further has a goal in the interrupt goal queue 112 or the normal goal queue 114 of the goal holding unit 110. Check if it exists. If a goal exists (step S126, Yes), goal processing is performed (step S128). Here, the goal process is a process for creating a plan based on the goal. The goal process will be described later.

ステップS104において、割込ゴール待ち行列112に割込ゴールが格納されている場合には(ステップS104,Yes)、さらに実行中プランDB164にプランが格納されているか否かを確認する。プランが格納されている場合には(ステップS130,Yes)、実行中プランDB164に格納されているプランである実行中プラン群を中断中プランDB166に移動し(ステップS132)、ステップS128へ進む。ステップS130において、実行中プランDB164にプランが格納されていない場合は(ステップS130,No)、ステップS128へ進む。   In step S104, when an interrupt goal is stored in the interrupt goal queue 112 (step S104, Yes), it is further confirmed whether or not a plan is stored in the executing plan DB 164. If the plan is stored (step S130, Yes), the executing plan group that is the plan stored in the executing plan DB 164 is moved to the interrupting plan DB 166 (step S132), and the process proceeds to step S128. In step S130, when the plan is not stored in the executing plan DB 164 (No in step S130), the process proceeds to step S128.

図6は、図5において説明した実行後プラン更新処理(ステップS112)における詳細な処理を示すフローチャートである。アクションの実行に成功した場合には(ステップS200,Yes)、先頭のタスクが実行に成功したアクションである各プランから実行済みアクションを削除する(ステップS204)。   FIG. 6 is a flowchart showing detailed processing in the post-execution plan update processing (step S112) described in FIG. When the execution of the action is successful (step S200, Yes), the executed action is deleted from each plan in which the first task is the action that has been successfully executed (step S204).

このように、実行中プランDB164および中断中プランDB166に格納されているプンから、実行済みのアクションを削除するので、これらのプランを再開した場合には、既に実行済みのアクションを繰り返し実行するのを避けることができる。   As described above, since the executed actions are deleted from the pun stored in the executing plan DB 164 and the suspended plan DB 166, when these plans are resumed, the already executed actions are repeatedly executed. Can be avoided.

次に、実行内容に基づいて、信念DB130の内容を更新する(ステップS206)。次に、実行中プランDB164および中断中プランDB166に格納されているプランを更新する(ステップS208)。なお、プラン更新処理については後述する。   Next, the content of the belief DB 130 is updated based on the execution content (step S206). Next, the plans stored in the executing plan DB 164 and the suspended plan DB 166 are updated (step S208). The plan update process will be described later.

ステップS200において、アクションに失敗した場合には(ステップS200,No)、先頭のタスクが実行に失敗したアクションであるすべてのプランを削除する(ステップS212)。   In step S200, if the action fails (step S200, No), all plans that are actions for which the top task has failed to execute are deleted (step S212).

図7は、図6において説明したプラン更新処理(ステップS208)における詳細な処理を示すフローチャートである。まず、実行中プランDB164および中断中プランDB166に格納されている各プランに含まれる各タスクに付与された実行前条件が満たされているか否かを確認する(ステップS220)。実行前条件が満たされるか否かを確認する処理については、後述する。   FIG. 7 is a flowchart showing detailed processing in the plan update processing (step S208) described in FIG. First, it is confirmed whether or not the pre-execution condition assigned to each task included in each plan stored in the executing plan DB 164 and the suspended plan DB 166 is satisfied (step S220). Processing for confirming whether or not the pre-execution condition is satisfied will be described later.

そして、実行前条件が満たされないタスクを含むすべてのプランを実行中プランDB164および中断中プランDB166から削除する(ステップS224)。   Then, all plans including a task that does not satisfy the pre-execution condition are deleted from the executing plan DB 164 and the suspended plan DB 166 (step S224).

次に、実行中プランDB164に格納されているプランに出現するタスクを分解する(ステップS228)。このとき実行中プランDB164に格納されているプランのうち実行しているプラン中のすべてのタスクをアクションに分解するのが好ましい。また、それ以外のプランについては、少なくとも先頭のタスクがアクションになるまで分解するのが好ましい。   Next, the task appearing in the plan stored in the executing plan DB 164 is disassembled (step S228). At this time, it is preferable that all tasks in the plan being executed out of the plans stored in the executing plan DB 164 are broken down into actions. For other plans, it is preferable to disassemble until at least the first task becomes an action.

さらに、中断中プランDB166に格納されているプランに出現するタスクを分解する(ステップS232)。ここでは、各プランの少なくとも先頭のタスクがアクションになるまで分解するのが好ましい。以上で、プラン更新処理が完了する。   Further, the task appearing in the plan stored in the suspended plan DB 166 is disassembled (step S232). Here, it is preferable to disassemble until at least the first task of each plan becomes an action. This completes the plan update process.

なお、ステップS232において、中断中プランDB166に格納されているプランに出現するタスクに対して行うタスク分解処理は、タスク分解処理(ステップS228)と同様の処理である。   Note that the task disassembly process performed on the task appearing in the plan stored in the suspended plan DB 166 in step S232 is the same process as the task disassembly process (step S228).

このように、プラン更新処理では、プランの各タスクをすべてアクションに分解する必要はなく、プランをすべてアクションに分解するのではなく、実行直前のタスク、すなわちプランに含まれるタスクのうち先頭のタスクのみを順次アクションに分解していく。これにより、実行直前の状態、すなわち実行直前において信念DB130に格納されている情報に基づいて、適切なアクションを作成することができる。また、順次アクションに分解していくため、メモリ消費を抑制することができる。   In this way, in the plan update process, it is not necessary to disassemble all the tasks of the plan into actions, and instead of disassembling all the plans into actions, the task immediately before execution, that is, the first task included in the plan Only break down into actions. Accordingly, an appropriate action can be created based on the state immediately before execution, that is, based on the information stored in the belief DB 130 immediately before execution. Moreover, since the action is sequentially decomposed, memory consumption can be suppressed.

図8は、図7において説明した実行前条件確認処理(ステップS220)における詳細な処理を示すフローチャートである。第1の条件、第2の条件および第3の条件を満足する状態か否かを判断する。なお、各条件については後述する。   FIG. 8 is a flowchart showing detailed processing in the pre-execution condition confirmation processing (step S220) described in FIG. It is determined whether or not the first condition, the second condition, and the third condition are satisfied. Each condition will be described later.

なお、前提として、実行中プランDB164に格納されているアクションの実行が完了すると、実行が完了したアクションは、実行中プランDB164から削除される。   As a premise, when the execution of the action stored in the executing plan DB 164 is completed, the action that has been executed is deleted from the executing plan DB 164.

第1の条件を満たす場合には(ステップS240,Yes)、実行前条件「X」成立と判定する(ステップS248)。また、第2の条件を満たす場合および第3の条件を満たす場合にも(ステップS242,Yes、ステップS244,Yes)、同様に実行前条件「X」成立と判定する(ステップS248)。   If the first condition is satisfied (step S240, Yes), it is determined that the pre-execution condition “X” is satisfied (step S248). Also, when the second condition and the third condition are satisfied (step S242, Yes, step S244, Yes), it is similarly determined that the pre-execution condition “X” is satisfied (step S248).

一方、いずれの条件も満たさない場合には(ステップS240,No、ステップS242,No、ステップS244,No)、実行前条件「X」不成立と判定する(ステップS246)。   On the other hand, when neither condition is satisfied (step S240, No, step S242, No, step S244, No), it is determined that the pre-execution condition “X” is not satisfied (step S246).

図9は、第1の条件を説明するための図である。ここで、プラン「P1」のアクション「Tx」の実行前条件を「X」とする。第1の条件は、信念DB130において信念として、
belief(X)

が格納されており、すなわち、信念Xが成立しており、Xがアクション「Tx」の実行前に実行前条件「X」を終了させるような実行効果「terminates(X)」を有するアクション「Tx−m」が実行予定にないことである。すなわち、アクション「Tx」の実行前に実行前条件「X」が終了しないことである。
図10は、第2の条件を説明するための図である。プラン「P1」のアクション「Tx」の実行前条件「X」に対し、第2の条件は、アクション「Tx」の実行前に実行前条件「X」を開始させるような実行効果「initiates(X)」を有するアクション「
Tx−n」が実行予定にあり、かつアクション「Tx−n」とアクション「Tx」の間に実行前条件「X」を終了させるようなアクションが存在しないことである。
FIG. 9 is a diagram for explaining the first condition. Here, it is assumed that the pre-execution condition of the action “Tx” of the plan “P1” is “X”. The first condition is as a belief in the belief DB 130,
belief (X)

Is stored, that is, the belief X is satisfied, and the action “Tx having an execution effect“ terminates (X) ”that causes the pre-execution condition“ X ”to end before the execution of the action“ Tx ”is performed. -M "is not scheduled to be executed. That is, the pre-execution condition “X” does not end before the execution of the action “Tx”.
FIG. 10 is a diagram for explaining the second condition. In contrast to the pre-execution condition “X” of the action “Tx” of the plan “P1”, the second condition is an execution effect “initates (X) that starts the pre-execution condition“ X ”before the execution of the action“ Tx ”. ) "
Tx-n ”is scheduled to be executed, and there is no action that terminates the pre-execution condition“ X ”between the action“ Tx-n ”and the action“ Tx ”.

第3の条件は、実行前条件「X」が成立しなければならない時点において、ある条件「C1〜Cn」が成立していること、および信念DB130に信念:
belief(X,[C1,・・・Cn])

が格納されていることである。
The third condition is that a certain condition “C1 to Cn” is satisfied at the time when the pre-execution condition “X” must be satisfied, and the belief in the belief DB 130:
belief (X, [C1,... Cn])

Is stored.

図11は、図7において説明したタスク分解処理(ステップS228)における詳細な処理を示すフローチャートである。実行中プランDB中にプランが存在する場合には(ステップS260,Yes)、各プランの先頭タスクが既にアクションに分解されているか否かを確認する。分解されてない先頭タスクが存在する場合には(ステップS261,No)、この先頭タスクを含むプランを選択する(ステップS262)。   FIG. 11 is a flowchart showing detailed processing in the task disassembly processing (step S228) described in FIG. If a plan exists in the executing plan DB (step S260, Yes), it is confirmed whether or not the head task of each plan has already been decomposed into actions. If there is a head task that has not been disassembled (step S261, No), a plan including this head task is selected (step S262).

一方、実行中プランDB中の各プランの先頭タスクが既にアクションに分解されている場合であって(ステップS261,Yes)、かつさらに他のタスクを分解する場合には(ステップS263,Yes)、未分解のタスクが存在する任意のプランを選択する(ステップS264)。   On the other hand, when the top task of each plan in the executing plan DB has already been decomposed into actions (step S261, Yes), and when other tasks are further decomposed (step S263, Yes), An arbitrary plan in which an unresolved task exists is selected (step S264).

次に、プランに出現する最初タスクであり、分解されていないタスクを選択する(ステップS265)。選択したタスクがアクションである場合には(ステップS266,Yes)、さらに、このアクションに対する実行前条件が満たされるか否かを信念DB130に格納されている情報等に基づいて確認する。具体的には、図8および図9を参照しつつ説明した実行前条件確認処理(ステップS220)により確認する。   Next, the first task that appears in the plan and is not disassembled is selected (step S265). If the selected task is an action (step S266, Yes), it is further confirmed based on information stored in the belief DB 130 whether or not the pre-execution condition for this action is satisfied. Specifically, confirmation is performed by the pre-execution condition confirmation process (step S220) described with reference to FIGS.

実行前条件が満たされる場合には(ステップS267,Yes)、実行効果を付与する。さらに実行前条件を付与する(ステップS268)。そして、再びステップS261へ進む。なお、ここで、付与する実行前条件は、条件を満たすか否かが動的に変化する実行前条件のみである。例えば、実行前条件が移動ロボット10の位置に関する条件である場合には、移動ロボット10が移動するたびに実行前条件を満たすか否かが変化する。このような条件のみを付与する。   When the pre-execution condition is satisfied (step S267, Yes), an execution effect is given. Further, a pre-execution condition is assigned (step S268). Then, the process proceeds again to step S261. Here, the pre-execution condition to be assigned is only the pre-execution condition in which whether or not the condition is satisfied dynamically changes. For example, when the pre-execution condition is a condition related to the position of the mobile robot 10, whether or not the pre-execution condition is satisfied changes every time the mobile robot 10 moves. Only such conditions are given.

n通りの実行前条件の満たし方が存在する場合には、対象としているプランのコピーをn個作成する。そして、n個のプランそれぞれに対し、n通りの実行前条件を付与する。そして、対象とするプランを新たに作成したn通りのプランに置き換える。   If there are n ways to satisfy the pre-execution condition, n copies of the target plan are created. Then, n pre-execution conditions are assigned to each of the n plans. Then, the target plan is replaced with n newly created plans.

一方、実行前条件が満たされない場合には(ステップS267,No)、対象としているプランを実行中プランDB164から削除する(ステップS269)。そして、再びステップS260へ進む。   On the other hand, when the pre-execution condition is not satisfied (step S267, No), the target plan is deleted from the executing plan DB 164 (step S269). And it progresses to step S260 again.

一方、ステップS266においてタスクがアクションでない場合には(ステップS266,No)、まず実行前条件を満たすタスクの分解方法を特定する。具体的には、図8および図9を参照しつつ説明した実行前条件確認処理(ステップS220)により、実行前条件を満たすか否かを確認し、タスクの分解方法を特定する。   On the other hand, if the task is not an action in step S266 (No in step S266), first, a task disassembly method that satisfies the pre-execution condition is specified. Specifically, the pre-execution condition confirmation process (step S220) described with reference to FIGS. 8 and 9 confirms whether the pre-execution condition is satisfied, and specifies the task decomposition method.

実行前条件が満たされるタスク分解方法が存在する場合には(ステップS271,Yes)、特定したタスク分解方法に基づいて、タスクを分解する。そして得られたタスクに対し、実行前条件を付与する(ステップS272)。そして、再びステップS260へ進む。   If there is a task decomposition method that satisfies the pre-execution condition (step S271, Yes), the task is decomposed based on the identified task decomposition method. Then, a pre-execution condition is assigned to the obtained task (step S272). And it progresses to step S260 again.

なお、タスクの分解方法がn通り存在する場合には、対象としているタスクのコピーをn個作成する。そして、n個のプランそれぞれに対し、n通りのタスク分解方法を施す。そして、分解されたn個のプランを得る。そして、対象としているプランを分解されたn個のプランに置き換える。また、分解されたプランの実行前条件の満たし方がm通り存在する場合には、そのプランのコピーをm個作成する。そして、m個のプランそれぞれに対し、m通りの実行前条件を付与する。その後、分解されたプランを新たに作成したm通りのプランに置き換える。なお、ここで付与する実行前条件は、動的な実行前条件のみである。以上により、タスク分解処理が完了する。   When there are n task decomposition methods, n copies of the target task are created. Then, n task decomposition methods are applied to each of the n plans. Then, n decomposed plans are obtained. Then, the target plan is replaced with n decomposed plans. If there are m ways to satisfy the pre-execution condition of the decomposed plan, m copies of the plan are created. Then, m pre-execution conditions are assigned to each of the m plans. Thereafter, the decomposed plan is replaced with newly created m plans. Note that the pre-execution conditions given here are only dynamic pre-execution conditions. Thus, the task disassembly process is completed.

一方、ステップS271において、実行前条件が満たされるタスク分解方法が存在しない場合には(ステップS271,No)、ステップS269に進みプランを削除する。   On the other hand, in step S271, when there is no task disassembly method that satisfies the pre-execution condition (step S271, No), the process proceeds to step S269 and the plan is deleted.

図12は、図5において説明した再開時プラン更新処理(ステップS124)における詳細な処理を示すフローチャートである。中断中プランDB166にプランが格納されている場合には(ステップS122,Yes)、まず、中断中プランDB166に格納されているプラン群を実行中プランDB164に移動する(ステップS300)。なお、中断中プランDB166に複数のプラン群が格納されている場合には、最も最近格納されたプラン群を実行中プランDB164に移動する。   FIG. 12 is a flowchart showing detailed processing in the restart plan update processing (step S124) described in FIG. If a plan is stored in the suspended plan DB 166 (step S122, Yes), first, the plan group stored in the suspended plan DB 166 is moved to the running plan DB 164 (step S300). When a plurality of plan groups are stored in the suspended plan DB 166, the most recently stored plan group is moved to the executing plan DB 164.

プラン群を実行中プランDB164に移動した後、実行中プランDB164に格納されている各プランに出現するタスクに対し、タスク分解処理を行う(ステップS302)。なお、タスク分解処理(ステップS302)は、図11を参照しつつ説明したタスク分解処理(ステップS228)と同様の処理である。以上で、再開時プラン更新処理が完了する。   After the plan group is moved to the executing plan DB 164, task disassembly processing is performed on the tasks appearing in the plans stored in the executing plan DB 164 (step S302). The task disassembly process (step S302) is the same process as the task disassembly process (step S228) described with reference to FIG. This completes the restart plan update process.

図13は、図5において説明したゴール処理(ステップS128)における詳細な処理を示すフローチャートである。ゴール保持部110の割込ゴール待ち行列112にゴールが存在する場合には(ステップS400,Yes)、割込ゴール待ち行列112に格納されているゴールのうち先頭のゴールを取り出す(ステップS402)。一方、割込ゴール待ち行列112にゴールが存在しない場合には(ステップS400,No)、通常ゴール待ち行列114に格納されているゴールのうち先頭のゴールを取り出す(ステップS404)。   FIG. 13 is a flowchart showing detailed processing in the goal processing (step S128) described in FIG. If there is a goal in the interrupt goal queue 112 of the goal holding unit 110 (step S400, Yes), the first goal is extracted from the goals stored in the interrupt goal queue 112 (step S402). On the other hand, when there is no goal in the interrupt goal queue 112 (step S400, No), the first goal among the goals stored in the normal goal queue 114 is taken out (step S404).

次に、取り出したゴールに対するプランを作成し(ステップS410)、作成したプランを実行中プランDB164に格納する(ステップS412)。なお、ここで、ゴールを達成することのできるプランがn個存在する場合には、n個のプランを作成し、それぞれ実行中プランDB164に格納する。   Next, a plan for the extracted goal is created (step S410), and the created plan is stored in the executing plan DB 164 (step S412). Here, when there are n plans that can achieve the goal, n plans are created and stored in the executing plan DB 164, respectively.

その後、実行中プランDB164に格納されているプランに対し、タスク分解処理を施す(ステップS414)。なお、タスク分解処理(ステップS414)は、図11を参照しつつ説明したタスク分解処理(ステップS228)と同様の処理である。以上で、ゴール処理が完了する。   Thereafter, task decomposition processing is performed on the plan stored in the executing plan DB 164 (step S414). The task disassembly process (step S414) is the same process as the task disassembly process (step S228) described with reference to FIG. This completes the goal process.

以上のように、本実施の形態にかかるプラン実行処理においては、所定のプランを実行すると、実行中プランDB164および中断中プランDB166に格納されているこれ以外のプランも総て更新する。そして、一度中断されたプランを再開する場合には、プランの実行に応じて更新されたプランを実行する。したがって、再開時の状態に応じた適切なプランを再開することができる。   As described above, in the plan execution process according to the present embodiment, when a predetermined plan is executed, all other plans stored in the executing plan DB 164 and the suspended plan DB 166 are also updated. Then, when resuming a plan that has been suspended, the plan updated according to the execution of the plan is executed. Therefore, it is possible to resume an appropriate plan according to the state at the time of resumption.

また、同一のゴールから複数のプランを作成した場合には、プランの実行に応じて、各プランそれぞれを更新する。したがって、実行中断したプランを再開する時点において、移動ロボット10の位置が変更されており、中断中のプランを再開することができないような場合には、同一のゴールから作成された他のプランを再開することにより、ゴールを達成することができる。   When a plurality of plans are created from the same goal, each plan is updated according to the execution of the plan. Therefore, when the position of the mobile robot 10 is changed at the time of resuming the plan that has been suspended, and the suspended plan cannot be resumed, another plan created from the same goal is saved. The goal can be achieved by resuming.

以上、図5から図13を参照しつつ説明したプラン実行処理を、より具体的に説明する。ゴール受付部100が「対象物:exhibition1とexhibition2の前で人:taroに各対象物の説明する」という通常ゴールを取得したとする。図14は、この通常ゴールを模式的に示す図である。なお、このときの移動ロボット10の位置は、初期位置(node6)であるとする。この通常ゴールは、以下のように記述される。

showAround([exhibition1,exhibition2],taro)

また、前提として、このとき、ゴール保持部110の割込ゴール待ち行列112および通常ゴール待ち行列114にはゴールは保持されていないものとする。
The plan execution process described above with reference to FIGS. 5 to 13 will be described more specifically. It is assumed that the goal receiving unit 100 acquires a normal goal of “explaining each object to a person: taro in front of the objects: exhibition1 and exhibition2”. FIG. 14 is a diagram schematically showing this normal goal. Note that the position of the mobile robot 10 at this time is assumed to be the initial position (node 6). This normal goal is described as follows.

showAround ([exhibition1, exhibition2], taro)

Also, as a premise, at this time, it is assumed that no goal is held in the interrupt goal queue 112 and the normal goal queue 114 of the goal holding unit 110.

ゴール受付部100は、通常ゴールを取得すると、ゴール保持部110の通常ゴール待ち行列114に保持させる。さらに、プラン作成部150は、通常ゴールに対するプランを作成する。作成された通常ゴールは、実行中プランDB164に格納される。プラン作成部150は、具体的には、プラン作成用知識DB140に格納されているプラン作成用知識:

htn(showAround([Exhibition|EXs],Person),[
pickOne(NextEXhibition,RestEXs,[Exhibition|EXs])
],[
show(NextExhibition,Person),
changeGoal(showAround(RestEXs,Person))
]).

と、信念DB130に格納されている:

belief(pick(H,T,[H|T])).
belief(pick(X,[H|Rest],[H|T]),[
pick(X,Rest,T)
]).

に基づいて、タスク:
showAround([exhibition1,exhibition2],taro)

を以下の2つのプラン(プラン1、プラン2)に分解する。

プラン1:
[
show(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]

プラン2:
[
show(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))
]
When the goal receiving unit 100 acquires the normal goal, the goal receiving unit 100 holds the normal goal in the normal goal queue 114 of the goal holding unit 110. Furthermore, the plan creation unit 150 creates a plan for the normal goal. The created normal goal is stored in the executing plan DB 164. Specifically, the plan creation unit 150 has the plan creation knowledge stored in the plan creation knowledge DB 140:

htn (showAround ([Exhibition | EXs], Person), [
pickOne (NextEXhibition, RestEXs, [Exhibition | EXs])
], [
show (NextExhibition, Person),
changeGoal (showAround (RestEXs, Person))
]).

And stored in the belief DB 130:

belief (pick (H, T, [H | T])).
belief (pick (X, [H | Rest], [H | T]), [
pick (X, Rest, T)
]).

Based on the task:
showAround ([exhibition1, exhibition2], taro)

Is divided into the following two plans (plan 1 and plan 2).

Plan 1:
[
show (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

Plan 2:
[
show (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))
]

これらのプランは、最初に実行すべきタスクがアクション(タスクの最小単位)になるまで、分解される。プラン1は、exhibition1を先に案内するプランである。一方プラン2は、exhibition2を先に案内するプランである。なお、プラン1およびプラン2に含まれるchangeGoal(X)は、現在実行中のプランおよび中断中プランDB166に格納されているプランを削除し、ゴールXに対するプランを実行中プランDB164に新たに格納し、このゴールXに対するプランを実行するタスクである。   These plans are decomposed until the first task to be executed is an action (the smallest unit of tasks). Plan 1 is a plan for guiding exhibition 1 first. On the other hand, plan 2 is a plan for guiding exhibition 2 first. Note that changeGoal (X) included in plan 1 and plan 2 deletes the plan currently being executed and the plan stored in the suspended plan DB 166, and newly stores the plan for goal X in the executing plan DB 164. This is a task for executing a plan for this goal X.

このように、プラン作成部150は、複数のプランにより1つのゴールを達成可能である場合には、複数のプランを作成する。   As described above, the plan creation unit 150 creates a plurality of plans when one goal can be achieved by the plurality of plans.

プラン作成部150は、次に、以下のプラン作成用知識:

htn(show(Exhibition,Person),[
at(StartNode),
location(Exhibition,GoalNode)
],[
gotoNodeWide(StartNode,GoalNode),
explain(Exhibition,Person)
]).

と、以下の信念:

dy(at(_)).
belief(at(node6)).
belief(location(exhibition1,node1)).

に基づいて、プラン1を以下のプラン(プラン3)に分解する。

プラン3:
[
precond([at(node6)],[]),
gotoNodeWide(node6,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]
ここで、precond([at(node6)],[])とは、タスク:gotoNodeWide(node6,node1)の前に成立しなければならない実行前条件ある。動的に変化する可能性のあるat(node6)を記録している。
The plan creation unit 150 then has the following plan creation knowledge:

htn (show (Exhibition, Person), [
at (StartNode),
location (Exhibition, GoalNode)
], [
gotoNodeWide (StartNode, GoalNode),
explain (Exhibition, Person)
]).

And the following beliefs:

dy (at (_)).
belief (at (node6)).
belief (location (exhibition1, node1)).

Based on the above, plan 1 is decomposed into the following plan (plan 3).

Plan 3:
[
precond ([at (node6)], []),
gotoNodeWide (node6, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]
Here, precond ([at (node6)], []) is a pre-execution condition that must be satisfied before the task: gotoNodeWide (node6, node1). At (node 6) that may change dynamically is recorded.

同様に、プラン2を以下のプラン(プラン4)に分解する。ただしこの場合には、belief(location(exhibition1,node1))にかえて、belief(location(exhibition2,node2))を用いる。

プラン4:
[
precond([at(node6)],[]),
gotoNodeWide(node6,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))
]
Similarly, plan 2 is decomposed into the following plan (plan 4). However, in this case, belief (location (exhibition 2, node 2)) is used instead of belief (location (exhibition 1, node 1)).

Plan 4:
[
precond ([at (node6)], []),
gotoNodeWide (node6, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))
]

次に、プラン3を分解する。プラン作成部150は、以下のプラン作成用知識:

htn(gotoNodeWide(StartNode,GoalNode),[
],[
gotoNextNode(StartNode,NextNode),
gotoNodeWide(NextNode,GoalNode)
]).

action(gotoNextNode(CurrentNode,NextNode),[
at(CurrentNode),
connects(CurrentNode,NextNode)
],[
terminates(at(CurrentNode)),
initiates(at(NextNode))
]).

と、以下の信念:

belief(connects(node6,node4)).
belief(connects(node6,node5)).

に基づいて、プラン3を以下の2つのプラン(プラン5とプラン6)に分解する。

プラン5:
[
precond([at(node6)],[]),
gotoNextNode(node6,node4),
effect([initiates(at(node4)),terminates(at(node6))]),
gotoNodeWide(node4,node1),
explain(exhibition1,taro)
changeGoal(showAround([exhibition2],taro))
]

プラン6:

[
precond([at(node6)],[]),
gotoNextNode(node6,node5),
effect([initiates(at(node5)),terminates(at(node6))]),
gotoNodeWide(node5,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]
Next, plan 3 is disassembled. The plan creation unit 150 has the following plan creation knowledge:

htn (gotoNodeWide (StartNode, GoalNode), [
], [
gotoNextNode (StartNode, NextNode),
gotoNodeWide (NextNode, GoalNode)
]).

action (gotoNextNode (CurrentNode, NextNode), [
at (CurrentNode),
connections (CurrentNode, NextNode)
], [
terminates (at (CurrentNode)),
initiates (at (NextNode))
]).

And the following beliefs:

belief (connects (node6, node4)).
belief (connects (node6, node5)).

Based on the above, plan 3 is decomposed into the following two plans (plan 5 and plan 6).

Plan 5:
[
precond ([at (node6)], []),
gotoNextNode (node6, node4),
effect ([initates (at (node4)), terminates (at (node6))]),
gotoNodeWide (node4, node1),
explain (exhibition1, taro)
changeGoal (showAround ([exhibition2], taro))
]

Plan 6:

[
precond ([at (node6)], []),
gotoNextNode (node6, node5),
effect ([initates (at (node5)), terminates (at (node6))]),
gotoNodeWide (node5, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

同様にプラン作成部150は、プラン4を以下の2つのプラン(プラン7とプラン8)に分解する。

プラン7:
[
precond([at(node6)],[]),
gotoNextNode(node6,node4),
effect([initiates(at(node4)),terminates(at(node6))]),
gotoNodeWide(node4,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))
]

プラン8:

[
precond([at(node6)],[]),
gotoNextNode(node6,node5),
effect([initiates(at(node5)),terminates(at(node6))]),
gotoNodeWide(node5,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))
]
Similarly, the plan creation unit 150 decomposes the plan 4 into the following two plans (plan 7 and plan 8).

Plan 7:
[
precond ([at (node6)], []),
gotoNextNode (node6, node4),
effect ([initates (at (node4)), terminates (at (node6))]),
gotoNodeWide (node4, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))
]

Plan 8:

[
precond ([at (node6)], []),
gotoNextNode (node6, node5),
effect ([initates (at (node5)), terminates (at (node6))]),
gotoNodeWide (node5, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))
]

プラン5、プラン6、プラン7およびプラン8の最初のタスクはいずれもアクションである。そこで、プラン作成部150は、これらのプランのコストを比較し、コストが最も小さいプランを分解する。   The first tasks of plan 5, plan 6, plan 7 and plan 8 are all actions. Therefore, the plan creation unit 150 compares the costs of these plans and decomposes the plan with the lowest cost.

本実施の形態にかかるプラン作成部150は、移動ロボット10の移動に関してのコストのみを考慮する。具体的には、これらのプランに出現する移動に関する各タスク:gotoNextNode(node6,node4)、gotoNextNode(node6,node5)、gotoNodeWide(node4,node2)、gotoNodeWide(node4,node1)、gotoNodeWide(node5,node1)、gotoNodeWide(node4,node2)、gotoNodeWide(node5,node2)の総コスト(概算)を計算して比較する。
The plan creation unit 150 according to the present embodiment considers only the cost related to the movement of the mobile robot 10. Specifically, each task related to movement appearing in these plans: gotoNextNode (node6, node4), gotoNextNode (node6, node5), gotoNodeWide (node4, node2), gotoNodeWide (node4, node1), goode1 (nodeNode), , GotoNodeWide (node4, node2), and total cost (approximate) of gotoNodeWide (node5, node2) are calculated and compared.

以下の信念:

belief(coordinate(node1,0,20)).
belief(coordinate(node2,10,20)).
belief(coordinate(node4,10,10)).
belief(coordinate(node5,0,0)).
belief(coordinate(node6,10,0)).

から、node6とnode4間の直線距離、node6とnode5間の直線距離、node4とnode2間の直線距離、node4とnode1間の直線距離、node5とnode1間の直線距離、node4とnode2間の直線距離、node5とnode2間の直線距離を特定する。そして、これらの距離をそれぞれコストとし、各プランにおける合計の移動距離を総コスト(概算)として算出する。こうして算出した総コストが最小となるプランを実行すべきプランとして選択する。本例においては、プラン7のコストが最小となり、プラン7が選択される。
The following beliefs:

belief (coordinate (node1, 0, 20)).
belief (coordinate (node2, 10, 20)).
belief (coordinate (node4, 10, 10)).
belief (coordinate (node5,0,0)).
belief (coordinate (node6,10,0)).

From, a linear distance between node6 and node4, a linear distance between node6 and node5, a linear distance between node4 and node2, a linear distance between node4 and node1, a linear distance between node5 and node1, a linear distance between node4 and node2, The straight line distance between node5 and node2 is specified. Then, each of these distances is set as a cost, and the total moving distance in each plan is calculated as a total cost (approximate). The plan with the smallest total cost calculated in this way is selected as the plan to be executed. In this example, the cost of the plan 7 is minimized and the plan 7 is selected.

なお、コストの算出方法は、本例に限定されるものではなく、例えば移動距離に加えて、タスクの実行に要する時間に対するコストを算出してもよい。また、これらの双方のコストから総合的なコストを算出してもよい。   The cost calculation method is not limited to this example. For example, in addition to the movement distance, the cost for the time required to execute the task may be calculated. Further, a total cost may be calculated from both of these costs.

プラン作成部150はさらに、以下のプラン作成用知識:

htn(gotoNodeWide(Node,Node),[
],[
]).

htn(gotoNodeWide(StartNode,GoalNode),[
],[
gotoNextNode(StartNode,NextNode),
gotoNodeWide(NextNode,GoalNode)
]).

action(gotoNextNode(CurrentNode,NextNode),[
at(CurrentNode),
connects(CurrentNode,NextNode)
],[
terminates(at(CurrentNode)),
initiates(at(NextNode))
]).

と、以下の信念:

belief(connects(node2,node1)).
belief(connects(node2,node4)).
belief(connects(node4,node2)).

に基づいて、まず、コストの最も小さいプランであるプラン7を以下の3つのプラン(プラン9とプラン10とプラン11)に分解する。

プラン9:
[
precond([at(node6)],[]),
gotoNextNode(node6,node4),
effect([initiates(at(node4)),terminates(at(node6))]),
precond([at(node4)],[]),
gotoNextNode(node4,node2),
effect([initiates(at(node2)),terminates(at(node4))]),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))
]

プラン10:
[
precond([at(node6)],[]),
gotoNextNode(node6,node4),
effect([initiates(at(node4)),terminates(at(node6))]),
precond([at(node4)],[]),
gotoNextNode(node4,node2),
effect([initiates(at(node2)),terminates(at(node4))]),
precond([at(node2)],[]),
gotoNextNode(node2,node1),
effect([initiates(at(node1)),terminates(at(node2))]),
gotoNodeWide(node1,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))
]

プラン11:
[
precond([at(node6)],[]),
gotoNextNode(node6,node4),
effect([initiates(at(node4)),terminates(at(node6))]),
precond([at(node4)],[]),
gotoNextNode(node4,node2),
effect([initiates(at(node2)),terminates(at(node4))]),
precond([at(node2)],[]),
gotoNextNode(node2,node4),
effect([initiates(at(node4)),terminates(at(node2))]),
gotoNodeWide(node4,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))
]
The plan creation unit 150 further provides the following plan creation knowledge:

htn (gotoNodeWide (Node, Node), [
], [
]).

htn (gotoNodeWide (StartNode, GoalNode), [
], [
gotoNextNode (StartNode, NextNode),
gotoNodeWide (NextNode, GoalNode)
]).

action (gotoNextNode (CurrentNode, NextNode), [
at (CurrentNode),
connections (CurrentNode, NextNode)
], [
terminates (at (CurrentNode)),
initiates (at (NextNode))
]).

And the following beliefs:

belief (connects (node2, node1)).
belief (connects (node2, node4)).
belief (connects (node4, node2)).

First, plan 7 which is the plan with the lowest cost is decomposed into the following three plans (plan 9, plan 10 and plan 11).

Plan 9:
[
precond ([at (node6)], []),
gotoNextNode (node6, node4),
effect ([initates (at (node4)), terminates (at (node6))]),
precond ([at (node4)], []),
gotoNextNode (node4, node2),
effect ([initates (at (node2)), terminates (at (node4))]),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))
]

Plan 10:
[
precond ([at (node6)], []),
gotoNextNode (node6, node4),
effect ([initates (at (node4)), terminates (at (node6))]),
precond ([at (node4)], []),
gotoNextNode (node4, node2),
effect ([initates (at (node2)), terminates (at (node4))]),
precond ([at (node2)], []),
gotoNextNode (node2, node1),
effect ([initates (at (node1)), terminates (at (node2))]),
gotoNodeWide (node1, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))
]

Plan 11:
[
precond ([at (node6)], []),
gotoNextNode (node6, node4),
effect ([initates (at (node4)), terminates (at (node6))]),
precond ([at (node4)], []),
gotoNextNode (node4, node2),
effect ([initates (at (node2)), terminates (at (node4))]),
precond ([at (node2)], []),
gotoNextNode (node2, node4),
effect ([initates (at (node4)), terminates (at (node2))]),
gotoNodeWide (node4, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))
]

ここで、プラン9とプラン10とプラン11の2つ目タスクの実行前条件:

precond([at(node4)],[])

に記載のat(node4)は、1つ目アクションの効果 :

effect([initiates(at(node4)),terminates(at(node6))])

により、成立している。
Here, the pre-execution conditions for the second task of plan 9, plan 10 and plan 11 are:

precond ([at (node4)], [])

At (node4) described in is the effect of the first action:

effect ([initates (at (node4)), terminates (at (node6))]))

Is established.

次に、実行中プランDB164が保持しているプラン(プラン5、プラン6、プラン9、プラン10、プラン11およびプラン8)の中で総コスト(概算)が最も低いプラン9を選択し、プラン分解を継続する。プラン作成部150は、以下のプラン作成用知識:

htn(explain(Object,Person),[
at(Node),
location(Object,Node),
with(Person),
contents(Object,Text)
],[
speak(Text)
]).

action(speak(Text),[
],[
]).

action(changeGoal(Goal),[
],[
]).

と、以下の信念:

belief(location(exhibition2,node2)).
belief(with(Person)).
dy(with(_)).
belief(contents(exhibition2,' これはロボット操作用のソフトウェアです。')).

を用い、プラン9から、以下のプラン(プラン12)を作成する。

プラン12:
[
precond([at(node6)],[]),
gotoNextNode(node6,node4),
effect([initiates(at(node4)),terminates(at(node6))]),
precond([at(node4)],[]),
gotoNextNode(node4,node2),
effect([initiates(at(node2)),terminates(at(node4))]),
precond([at(node2),with(taro)],[]),
speak(' これはロボット操作用のソフトウェアです。'),
effect([]),
precond([],[]),
changeGoal(showAround([exhibition1],taro)),
effect([])
]
Next, the plan 9 with the lowest total cost (estimated) is selected from the plans (plan 5, plan 6, plan 9, plan 10, plan 11 and plan 8) held by the executing plan DB 164, and the plan Continue disassembling. The plan creation unit 150 has the following plan creation knowledge:

htn (explain (Object, Person), [
at (Node),
location (Object, Node),
with (Person),
contents (Object, Text)
], [
spike (Text)
]).

action (speak (Text), [
], [
]).

action (changeGoal (Goal), [
], [
]).

And the following beliefs:

belief (location (exhibition2, node2)).
belief (with (Person)).
dy (with (_)).
belief (contents (exhibition2, 'This is software for robot operation')).

From the plan 9, the following plan (plan 12) is created.

Plan 12:
[
precond ([at (node6)], []),
gotoNextNode (node6, node4),
effect ([initates (at (node4)), terminates (at (node6))]),
precond ([at (node4)], []),
gotoNextNode (node4, node2),
effect ([initates (at (node2)), terminates (at (node4))]),
precond ([at (node2), with (taro)], []),
spike ('This is software for robot operation'),
effect ([]),
precond ([], []),
changeGoal (showAround ([exhibition1], taro)),
effect ([])
]

プラン12は、全てのタスクがアクションである。さらに、各アクションには、実行前条件と実行効果が付与されている。そこで、これを実行すべきプランとする。なお、実行中プランDB164には、プラン12の代替プランとして、プラン5、プラン6、プラン8、プラン10およびプラン11がさらに保持されている。このように、最適なプランだけでなく、これ以外にも実行可能なプランを保持しておく。   In the plan 12, all tasks are actions. Furthermore, pre-execution conditions and execution effects are assigned to each action. Therefore, this is a plan to be executed. Note that the execution plan DB 164 further holds Plan 5, Plan 6, Plan 8, Plan 10, and Plan 11 as alternative plans for the plan 12. In this way, not only the optimal plan but also other executable plans are retained.

次に、こうして作成されたプラン(プラン12)を実行する場合の処理について説明する。アクション実行部170は、まずプラン12の最初に出現するアクション:

gotoNextNode(node6,node4),

を実行する。これにより、移動ロボット10は、図15に示すようにnode6からnode4に移動し、移動ロボット10はnode4に位置している。
Next, processing when the plan (plan 12) created in this way is executed will be described. The action execution unit 170 first takes an action that appears first in the plan 12:

gotoNextNode (node6, node4),

Execute. As a result, the mobile robot 10 moves from node 6 to node 4 as shown in FIG. 15, and the mobile robot 10 is located at node 4.

このアクションの実行後、プラン12に付加されたこのアクションの実行効果に関する情報:

effect([initiates(at(node4)),terminates(at(node6))])

に従い、信念DB130にあるat(node4)をat(node6)に書き換える。さらに、プラン12から実行済みアクション:

gotoNextNode(node6,node4)

を削除する。このとき、このアクションに対する実行前条件および実行効果も削除する。
これによりプラン12は以下のように変更される。

プラン12:
[
precond([at(node4)],[]),
gotoNextNode(node4,node2),
effect([initiates(at(node2)),terminates(at(node4))]),
precond([at(node2),with(taro)],[]),
speak(' これはロボット操作用のソフトウェアです。'),
effect([]),
precond([],[]),
changeGoal(showAround([exhibition1],taro)),
effect([])
]
Information on the execution effect of this action added to plan 12 after execution of this action:

effect ([initates (at (node4)), terminates (at (node6))]))

Accordingly, at (node4) in belief DB 130 is rewritten to at (node6). In addition, actions performed from plan 12:

gotoNextNode (node6, node4)

Is deleted. At this time, the pre-execution condition and execution effect for this action are also deleted.
Thereby, the plan 12 is changed as follows.

Plan 12:
[
precond ([at (node4)], []),
gotoNextNode (node4, node2),
effect ([initates (at (node2)), terminates (at (node4))]),
precond ([at (node2), with (taro)], []),
spike ('This is software for robot operation'),
effect ([]),
precond ([], []),
changeGoal (showAround ([exhibition1], taro)),
effect ([])
]

このとき、あわせて実行中プランDB164に保持されているプラン5とプラン10とプラン11からも、同様に実行済みアクション:

gotoNextNode(node6,node4)

を削除する。これにより、各プランは以下のように変更される。

プラン5:
[
gotoNodeWide(node4,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]

プラン10:
[
precond([at(node4)],[]),
gotoNextNode(node4,node2),
effect([initiates(at(node2)),terminates(at(node4))]),
precond([at(node2)],[]),
gotoNextNode(node2,node1),
effect([initiates(at(node1)),terminates(at(node2))]),
gotoNodeWide(node1,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))

プラン11:
[
precond([at(node4)],[]),
gotoNextNode(node4,node2),
effect([initiates(at(node2)),terminates(at(node4))]),
precond([at(node2)],[]),
gotoNextNode(node2,node4),
effect([initiates(at(node4)),terminates(at(node2))]),
gotoNodeWide(node4,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))
]
At this time, the action already executed from the plan 5, the plan 10, and the plan 11 also stored in the executing plan DB 164 is:

gotoNextNode (node6, node4)

Is deleted. Thereby, each plan is changed as follows.

Plan 5:
[
gotoNodeWide (node4, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

Plan 10:
[
precond ([at (node4)], []),
gotoNextNode (node4, node2),
effect ([initates (at (node2)), terminates (at (node4))]),
precond ([at (node2)], []),
gotoNextNode (node2, node1),
effect ([initates (at (node1)), terminates (at (node2))]),
gotoNodeWide (node1, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))

Plan 11:
[
precond ([at (node4)], []),
gotoNextNode (node4, node2),
effect ([initates (at (node2)), terminates (at (node4))]),
precond ([at (node2)], []),
gotoNextNode (node2, node4),
effect ([initates (at (node4)), terminates (at (node2))]),
gotoNodeWide (node4, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))
]

また、プラン5の先頭のタスクは、アクションではないので、プラン5をさらに分解する。具体的には、以下のプラン作成用知識:

htn(gotoNodeWide(StartNode,GoalNode),[
],[
gotoNextNode(StartNode,NextNode),
gotoNodeWide(NextNode,GoalNode)
]).

action(gotoNextNode(CurrentNode,NextNode),[
at(CurrentNode),
connects(CurrentNode,NextNode)
],[
terminates(at(CurrentNode)),
initiates(at(NextNode))
]).

と、以下の信念:

belief(connects(node4,node2)).
belief(connects(node4,node3)).
belief(connects(node4,node6)).

を用いて、プラン5を以下の3つのプラン(プラン13とプラン14とプラン15)に分解する。

プラン13:
[
precond([at(node4)],[]),
gotoNextNode(node4,node2),
effect([initiates(at(node2)),terminates(at(node4))]),
gotoNodeWide(node2,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]

プラン14:
[
precond([at(node4)],[]),
gotoNextNode(node4,node3),
effect([initiates(at(node3)),terminates(at(node4))]),
gotoNodeWide(node3,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]

プラン15:
[
precond([at(node4)],[]),
gotoNextNode(node4,node6),
effect([initiates(at(node6)),terminates(at(node4))]),
gotoNodeWide(node6,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]
Further, since the top task of the plan 5 is not an action, the plan 5 is further disassembled. Specifically, the following planning knowledge:

htn (gotoNodeWide (StartNode, GoalNode), [
], [
gotoNextNode (StartNode, NextNode),
gotoNodeWide (NextNode, GoalNode)
]).

action (gotoNextNode (CurrentNode, NextNode), [
at (CurrentNode),
connections (CurrentNode, NextNode)
], [
terminates (at (CurrentNode)),
initiates (at (NextNode))
]).

And the following beliefs:

belief (connects (node4, node2)).
belief (connects (node4, node3)).
belief (connects (node4, node6)).

Is used to decompose plan 5 into the following three plans (plan 13, plan 14 and plan 15).

Plan 13:
[
precond ([at (node4)], []),
gotoNextNode (node4, node2),
effect ([initates (at (node2)), terminates (at (node4))]),
gotoNodeWide (node2, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

Plan 14:
[
precond ([at (node4)], []),
gotoNextNode (node4, node3),
effect ([initates (at (node3)), terminates (at (node4))]),
gotoNodeWide (node3, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

Plan 15:
[
precond ([at (node4)], []),
gotoNextNode (node4, node6),
effect ([initates (at (node6)), terminates (at (node4))]),
gotoNodeWide (node6, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

また、アクションの実行により、移動ロボット10の現在位置は、node6からnode4に変更になっている。したがって、実行中プランDB164に格納されているプラン6およびプラン8の実行前条件:

at(node6)

は満たされなくなっている。そこで、プラン6およびプラン8は、今後再開することができないので、実行中プランDB164から削除する。
Further, the current position of the mobile robot 10 is changed from node6 to node4 by execution of the action. Therefore, the pre-execution conditions of plan 6 and plan 8 stored in the executing plan DB 164:

at (node6)

Is no longer satisfied. Therefore, the plan 6 and the plan 8 cannot be resumed in the future, and are deleted from the executing plan DB 164.

この時点で実行中プランDB164に格納されている各プラン(プラン10、プラン11、プラン12、プラン13、プラン14およびプラン15)に最初に出現するタスクはいずれもアクションになっている。   At this time, any task that first appears in each plan (plan 10, plan 11, plan 12, plan 13, plan 14, and plan 15) stored in the executing plan DB 164 is an action.

次に、実行中プランDB164に格納されているプラン10、プラン11、プラン12、プラン13、プラン14およびプラン15の中から、総コストが最小となるプランを選択する。ここでは、プラン12が選択され、プラン12にしたがい、以下のアクションが実行される。

gotoNextNode(node4,node2),

これにより、移動ロボット10は、図16に示すようにnode4からnode2に移動し、移動ロボット10はnode2に位置している。
Next, the plan having the minimum total cost is selected from the plan 10, the plan 11, the plan 12, the plan 13, the plan 14, and the plan 15 stored in the executing plan DB 164. Here, the plan 12 is selected, and the following actions are executed according to the plan 12.

gotoNextNode (node4, node2),

As a result, the mobile robot 10 moves from node 4 to node 2 as shown in FIG. 16, and the mobile robot 10 is located at node 2.

次に、このアクションの実行効果:

effect([initiates(at(node2)),terminates(at(node4))])

にしたがい、信念DB130に格納されているat(node4)をat(node2)に書き換える。さらに、プラン12から実行済みアクションを削除する。実行済みアクションが削除された後のプラン12は、以下のように記述される。

プラン12:

[
precond([at(node2),with(taro)],[]),
speak(' これはロボット操作用のソフトウェアです。'),
effect([]),
precond([],[]),
changeGoal(showAround([exhibition1],taro)),
effect([])
]
Then the effect of executing this action:

effect ([initates (at (node2)), terminates (at (node4))]))

Accordingly, at (node4) stored in the belief DB 130 is rewritten to at (node2). Further, the executed action is deleted from the plan 12. The plan 12 after the executed action is deleted is described as follows.

Plan 12:

[
precond ([at (node2), with (taro)], []),
spike ('This is software for robot operation'),
effect ([]),
precond ([], []),
changeGoal (showAround ([exhibition1], taro)),
effect ([])
]

このとき、あわせて実行中プランDB164に保持されているプラン10、プラン11およびプラン13からも同様に実行済みアクション:

gotoNextNode(node4,node2),

を削除する。これにより各プランは、以下のように変更される。

プラン10:
[
precond([at(node2)],[]),
gotoNextNode(node2,node1),
effect([initiates(at(node1)),terminates(at(node2))]),
gotoNodeWide(node1,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))

プラン11:
[
precond([at(node2)],[]),
gotoNextNode(node2,node4),
effect([initiates(at(node4)),terminates(at(node2))]),
gotoNodeWide(node4,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))
]

プラン13:
[
gotoNodeWide(node2,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]
At this time, the action already executed from the plan 10, the plan 11 and the plan 13 held in the currently executing plan DB 164 is also:

gotoNextNode (node4, node2),

Is deleted. As a result, each plan is changed as follows.

Plan 10:
[
precond ([at (node2)], []),
gotoNextNode (node2, node1),
effect ([initates (at (node1)), terminates (at (node2))]),
gotoNodeWide (node1, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))

Plan 11:
[
precond ([at (node2)], []),
gotoNextNode (node2, node4),
effect ([initates (at (node4)), terminates (at (node2))]),
gotoNodeWide (node4, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))
]

Plan 13:
[
gotoNodeWide (node2, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

また、プラン13の先頭のタスクは、アクションではない。そこで、プラン作成部150は、プラン13をさらに分解する。具体的には、プラン作成部150は、以下のプラン作成用知識:

htn(gotoNodeWide(StartNode,GoalNode),[
],[
gotoNextNode(StartNode,NextNode),
gotoNodeWide(NextNode,GoalNode)
]).

action(gotoNextNode(CurrentNode,NextNode),[
at(CurrentNode),
connects(CurrentNode,NextNode)
],[
terminates(at(CurrentNode)),
initiates(at(NextNode))
]).

と、以下の信念:

belief(connects(node2,node1)).
belief(connects(node2,node4)).

を用いて、プラン13を以下の2つのプラン(プラン16とプラン17)に分解する。

プラン16:
[
precond([at(node2)],[]),
gotoNextNode(node2,node1),
effect([initiates(at(node1)),terminates(at(node2))])
gotoNodeWide(node1,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]

プラン17:
[
precond([at(node2)],[]),
gotoNextNode(node2,node4),
effect([initiates(at(node4)),terminates(at(node2))])
gotoNodeWide(node4,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]
The top task of the plan 13 is not an action. Therefore, the plan creation unit 150 further decomposes the plan 13. Specifically, the plan creation unit 150 has the following plan creation knowledge:

htn (gotoNodeWide (StartNode, GoalNode), [
], [
gotoNextNode (StartNode, NextNode),
gotoNodeWide (NextNode, GoalNode)
]).

action (gotoNextNode (CurrentNode, NextNode), [
at (CurrentNode),
connections (CurrentNode, NextNode)
], [
terminates (at (CurrentNode)),
initiates (at (NextNode))
]).

And the following beliefs:

belief (connects (node2, node1)).
belief (connects (node2, node4)).

Is used to decompose the plan 13 into the following two plans (plan 16 and plan 17).

Plan 16:
[
precond ([at (node2)], []),
gotoNextNode (node2, node1),
effect ([initates (at (node1)), terminates (at (node2))])
gotoNodeWide (node1, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

Plan 17:
[
precond ([at (node2)], []),
gotoNextNode (node2, node4),
effect ([initates (at (node4)), terminates (at (node2))])
gotoNodeWide (node4, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

また、アクションの実行により、移動ロボット10の現在位置は、node4からnode2に変更になっている。したがって、実行中プランDB164に格納されているプラン14およびプラン15実行前条件:

at(node4)

は満たされなくなっている。そこで、プラン14およびプラン15は、今後再開することができないので、実行中プランDB164から削除する。
Further, the current position of the mobile robot 10 has been changed from node4 to node2 by executing the action. Therefore, the plan 14 and plan 15 pre-execution conditions stored in the executing plan DB 164:

at (node4)

Is no longer satisfied. Therefore, the plan 14 and the plan 15 cannot be restarted in the future, and are deleted from the executing plan DB 164.

さらに、以上のアクションの実行が完了した時点で、外部から割込ゴール:

show(exhibition1,hanako)

が投入された場合について説明する。図17は、この割込ゴールを模式的に示す図である。
Furthermore, when execution of the above actions is completed, an external interrupt goal:

show (exhibition1, hanako)

The case where is entered will be described. FIG. 17 is a diagram schematically showing this interrupt goal.

ゴール受付部100が割込ゴールを受け付けると、実行管理部120は、割込ゴール待ち行列112に格納されているプラン(プラン10とプラン11とプラン12とプラン16とプラン17)を中断中プランDB166に移動する。すなわち、実行中プランDB164のスタックにプッシュする。さらに、ゴール受付部100が受け付けた割込ゴールがゴール保持部110の割込ゴール待ち行列112に保持される。   When the goal accepting unit 100 accepts an interrupt goal, the execution managing unit 120 suspends the plan (plan 10, plan 11, plan 12, plan 16, and plan 17) stored in the interrupt goal queue 112. Move to DB166. That is, it is pushed onto the stack of the executing plan DB 164. Further, the interrupt goal received by the goal receiving unit 100 is held in the interrupt goal queue 112 of the goal holding unit 110.

そして、ゴール受付部100が受け付けた割込ゴールに対するプランが作成される。作成されたプランは、実行中プランDB164に格納される。ここでは、以下に示す4つのプラン(プラン30、プラン31、プラン32およびプラン33)が作成される。

プラン30:
[
precond([at(node2)],[]),
gotoNextNode(node2,node1),
effect([initiates(at(node1)),terminates(at(node2))])
precond([at(node1),with(hanako)] ,[]),
speak(' これは世界初の日本語ワープロです。'),
effect([])
]

プラン31:
[
precond([at(node2)],[]),
gotoNextNode(node2,node1),
effect([initiates(at(node1)),terminates(at(node2))]),
precond([at(node1)],[]),
gotoNextNode(node1,node2),
effect([initiates(at(node2)),terminates(at(node1))]),
gotoNodeWide(node2,node1),
explain(exhibition1,hanako)
]

プラン32:
[
precond([at(node2)],[]),
gotoNextNode(node2,node1),
effect([initiates(at(node1)),terminates(at(node2))]),
precond([at(node1)],[]),
gotoNextNode(node1,node3),
effect([initiates(at(node3)),terminates(at(node1))]),
gotoNodeWide(node3,node1),
explain(exhibition1,hanako)
]

プラン33:
[
precond([at(node2)],[]),
gotoNextNode(node2,node4),
effect([initiates(at(node4)),terminates(at(node2))]),
gotoNodeWide(node4,node1),
explain(exhibition1,hanako)
]
Then, a plan for the interrupt goal received by the goal receiving unit 100 is created. The created plan is stored in the executing plan DB 164. Here, the following four plans (plan 30, plan 31, plan 32, and plan 33) are created.

Plan 30:
[
precond ([at (node2)], []),
gotoNextNode (node2, node1),
effect ([initates (at (node1)), terminates (at (node2))])
precond ([at (node1), with (hanako)], []),
spike ('This is the world's first Japanese word processor'),
effect ([])
]

Plan 31:
[
precond ([at (node2)], []),
gotoNextNode (node2, node1),
effect ([initates (at (node1)), terminates (at (node2))]),
precond ([at (node1)], []),
gotoNextNode (node1, node2),
effect ([initates (at (node2)), terminates (at (node1))]),
gotoNodeWide (node2, node1),
explain (exhibition1, hanako)
]

Plan 32:
[
precond ([at (node2)], []),
gotoNextNode (node2, node1),
effect ([initates (at (node1)), terminates (at (node2))]),
precond ([at (node1)], []),
gotoNextNode (node1, node3),
effect ([initates (at (node3)), terminates (at (node1))]),
gotoNodeWide (node3, node1),
explain (exhibition1, hanako)
]

Plan 33:
[
precond ([at (node2)], []),
gotoNextNode (node2, node4),
effect ([initates (at (node4)), terminates (at (node2))]),
gotoNodeWide (node4, node1),
explain (exhibition1, hanako)
]

作成された各プラン(プラン30、プラン31、プラン32およびプラン33)において最初に出現するタスクはいずれもアクションである。   The first task that appears in each created plan (plan 30, plan 31, plan 32, and plan 33) is an action.

なお、本例においては、割込プラン実行中においても、with(taro)という条件、すなわち、「太郎は移動ロボット10についてまわる」という条件は成立しているものとする。   In this example, it is assumed that the condition “with (taro)”, that is, the condition “Taro turns around the mobile robot 10” is satisfied even during execution of the interrupt plan.

アクション実行部170は、作成された4つのプラン(プラン30、プラン31、プラン32およびプラン33)の中で、総コストが最小のとなるプランを実行する。ここでは、総コストが最小となるプラン30において最初に出現するアクション:

gotoNextNode(node2,node1)

が実行される。これにより、移動ロボット10は、図18に示すように、node2からnode1に移動し、node1に位置している。
The action execution unit 170 executes a plan having a minimum total cost among the four created plans (plan 30, plan 31, plan 32, and plan 33). Here, the first action that appears in the plan 30 with the lowest total cost:

gotoNextNode (node2, node1)

Is executed. As a result, the mobile robot 10 moves from node2 to node1 and is located at node1, as shown in FIG.

次に、このアクションの実行効果:

effect([initiates(at(node1)),terminates(at(node2))])

にしたがい、信念DB130に格納されているat(node2)をat(node1)に書き換える。さらに、プラン30、プラン31およびプラン32から、実行済みのアクションを削除する。実行済みアクションが削除された後のプラン30、プラン31およびプラン32は、それぞれ以下のように記述される。

プラン30:
[
precond([at(node1),with(hanako)] ,[]),
speak(' これは世界初の日本語ワープロです。'),
effect([])
]

プラン31:
[
precond([at(node1)],[]),
gotoNextNode(node1,node2),
effect([initiates(at(node2)),terminates(at(node1))]),
gotoNodeWide(node2,node1),
explain(exhibition1,hanako)
]

プラン32:
[
precond([at(node1)],[]),
gotoNextNode(node1,node3),
effect([initiates(at(node3)),terminates(at(node1))]),
gotoNodeWide(node3,node1),
explain(exhibition1,hanako)
]
Then the effect of executing this action:

effect ([initates (at (node1)), terminates (at (node2))])

Accordingly, at (node2) stored in the belief DB 130 is rewritten to at (node1). Furthermore, the executed action is deleted from the plan 30, the plan 31, and the plan 32. The plan 30, the plan 31, and the plan 32 after the executed action is deleted are respectively described as follows.

Plan 30:
[
precond ([at (node1), with (hanako)], []),
spike ('This is the world's first Japanese word processor'),
effect ([])
]

Plan 31:
[
precond ([at (node1)], []),
gotoNextNode (node1, node2),
effect ([initates (at (node2)), terminates (at (node1))]),
gotoNodeWide (node2, node1),
explain (exhibition1, hanako)
]

Plan 32:
[
precond ([at (node1)], []),
gotoNextNode (node1, node3),
effect ([initates (at (node3)), terminates (at (node1))]),
gotoNodeWide (node3, node1),
explain (exhibition1, hanako)
]

また、アクションの実行により、移動ロボット10の現在位置は、node2からnode1に変更になっている。したがって、実行中プランDB164に格納されているプラン33の実行前条件:

at(node2)

は満たされなくなっている。そこで、プラン33は、今後再開することができないので、実行中プランDB164から削除する。
In addition, the current position of the mobile robot 10 is changed from node2 to node1 by executing the action. Therefore, the pre-execution condition of the plan 33 stored in the executing plan DB 164:

at (node2)

Is no longer satisfied. Therefore, the plan 33 cannot be resumed in the future, and is deleted from the executing plan DB 164.

さらに、中断中プランDB166のスタックにプッシュしてあるプラン(プラン10とプラン11とプラン12とプラン16とプラン17)も変更する。具体的には、プラン10とプラン16から、以下のように、実行済みアクション:

gotoNextNode(node2,node1)

に関する情報を削除する。

プラン10:
[
gotoNodeWide(node1,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))

プラン16:
[
gotoNodeWide(node1,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]
Furthermore, the plans (plan 10, plan 11, plan 12, plan 16, and plan 17) pushed on the stack of the suspended plan DB 166 are also changed. Specifically, from Plan 10 and Plan 16, the executed actions are as follows:

gotoNextNode (node2, node1)

Delete information about.

Plan 10:
[
gotoNodeWide (node1, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))

Plan 16:
[
gotoNodeWide (node1, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

また、アクションの実行により、中断中プランDB166に格納されているプラン11、プラン12およびプラン17の実行前条件:

at(node2)

は満たされなくなっている。そこで、プラン11、プラン12およびプラン17は、今後再開することができないので、実行中プランDB164から削除する。
In addition, pre-execution conditions of the plan 11, the plan 12, and the plan 17 stored in the suspended plan DB 166 by executing the action:

at (node2)

Is no longer satisfied. Therefore, since the plan 11, the plan 12, and the plan 17 cannot be resumed in the future, they are deleted from the executing plan DB 164.

また、プラン10の最初のタスクはアクションでない。そこでプラン10をさらに分解する。これにより、以下のプラン(プラン18,プラン19およびプラン20)が作成される。

プラン18:
[
precond([at(node1)],[]),
gotoNextNode(node1,node2),
effect([initiates(at(node2)),terminates(at(node1))]),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1] ,taro))
]

プラン19:
[
precond([at(node1)],[]),
gotoNextNode(node1,node2),
effect([initiates(at(node2)),terminates(at(node1))]),
precond([at(node2)],[]),
gotoNextNode(node2,node1),
effect([initiates(at(node1)),terminates(at(node2))]),
gotoNodeWide(node1,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))
]

プラン20:
[
precond([at(node1)],[]),
gotoNextNode(node1,node2),
effect([initiates(at(node2)),terminates(at(node1))]),
precond([at(node2)],[]),
gotoNextNode(node2,node4),
effect([initiates(at(node4)),terminates(at(node2))]),
gotoNodeWide(node4,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))
]

また、プラン16の最初のタスクもアクションでない。そこで、プラン16を分解し、以下のプラン(プラン21、プラン22およびプラン23)が作成される。

プラン21:
[
precond([at(node1),with(taro)]),
speak(' これは世界初の日本語ワープロです。'),
effect([]),
changeGoal(showAround([exhibition2],taro))
]

プラン22:
[
precond([at(node1)],[]),
gotoNextNode(node1,node2),
effect([initiates(at(node2)),terminates(at(node1))]),
gotoNodeWide(node2,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]

プラン23:
[
precond([at(node1)],[]),
gotoNextNode(node1,node3),
effect([initiates(at(node3)),terminates(at(node1))]),
gotoNodeWide(node3,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]
Also, the first task of plan 10 is not an action. Therefore, the plan 10 is further disassembled. Thereby, the following plans (plan 18, plan 19 and plan 20) are created.

Plan 18:
[
precond ([at (node1)], []),
gotoNextNode (node1, node2),
effect ([initates (at (node2)), terminates (at (node1))]),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))
]

Plan 19:
[
precond ([at (node1)], []),
gotoNextNode (node1, node2),
effect ([initates (at (node2)), terminates (at (node1))]),
precond ([at (node2)], []),
gotoNextNode (node2, node1),
effect ([initates (at (node1)), terminates (at (node2))]),
gotoNodeWide (node1, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))
]

Plan 20:
[
precond ([at (node1)], []),
gotoNextNode (node1, node2),
effect ([initates (at (node2)), terminates (at (node1))]),
precond ([at (node2)], []),
gotoNextNode (node2, node4),
effect ([initates (at (node4)), terminates (at (node2))]),
gotoNodeWide (node4, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))
]

Also, the first task of plan 16 is not an action. Therefore, the plan 16 is disassembled, and the following plans (plan 21, plan 22, and plan 23) are created.

Plan 21:
[
precond ([at (node1), with (taro)]),
spike ('This is the world's first Japanese word processor'),
effect ([]),
changeGoal (showAround ([exhibition2], taro))
]

Plan 22:
[
precond ([at (node1)], []),
gotoNextNode (node1, node2),
effect ([initates (at (node2)), terminates (at (node1))]),
gotoNodeWide (node2, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

Plan 23:
[
precond ([at (node1)], []),
gotoNextNode (node1, node3),
effect ([initates (at (node3)), terminates (at (node1))]),
gotoNodeWide (node3, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

さらに、割込プランの実行を継続している。この時点で実行中プランDB164に格納されている割込プランは、プラン30、プラン31およびプラン32である。このうちコストが最も低いプラン30が実行される。具体的には、プラン30の最初に出現するアクション:

speak(' これは世界初の日本語ワープロです。')

が実行される。そして、プラン30から実行済みアクションが削除される。これにより、プラン30は以下のように変更される。

プラン30:
[
]

すなわち、プラン30は空プランになる。したがって、実行されていないプランはなくなり、割込ゴールの実行がすべて完了する。このとき、実行管理部120は、実行中プランDB164に格納されているすべてのプランを削除する。
In addition, the execution of the interrupt plan continues. The interrupt plans stored in the executing plan DB 164 at this time are the plan 30, the plan 31, and the plan 32. Among these, the plan 30 with the lowest cost is executed. Specifically, the action that appears first in the plan 30:

spike ('This is the world's first Japanese word processor.')

Is executed. Then, the executed action is deleted from the plan 30. Thereby, the plan 30 is changed as follows.

Plan 30:
[
]

That is, the plan 30 is an empty plan. Therefore, there is no plan that has not been executed, and all executions of the interrupt goal are completed. At this time, the execution management unit 120 deletes all plans stored in the executing plan DB 164.

また、中断中プランDB166に格納されている中断中のプランを更新する。この時点で中断中プランDB166には、プラン18、プラン19、プラン20、プラン21、プラン22およびプラン23が格納されている。   The suspended plan stored in the suspended plan DB 166 is updated. At this point, the suspended plan DB 166 stores plan 18, plan 19, plan 20, plan 21, plan 22, and plan 23.

このうちプラン21の最初に出現するアクションは、実行済みアクションと同一であるので、これを削除する。これにより、プラン21は以下のように変更される。

プラン21:
[
changeGoal(showAround([exhibition2],taro))
]
Of these, the action that appears first in the plan 21 is the same as the executed action, and is therefore deleted. Thereby, the plan 21 is changed as follows.

Plan 21:
[
changeGoal (showAround ([exhibition2], taro))
]

さらに、プラン21の最初のタスクに実行前条件と効果を付与する。これにより、プラン21は以下のように変更される。

プラン24:
[
precond([],[]),
changeGoal(showAround([exhibition2],taro)),
effect([])
]
Furthermore, pre-execution conditions and effects are assigned to the first task of the plan 21. Thereby, the plan 21 is changed as follows.

Plan 24:
[
precond ([], []),
changeGoal (showAround ([exhibition2], taro)),
effect ([])
]

実行中プランDB164に格納されているこれ以外のプラン(プラン18とプラン19とプラン20とプラン22とプラン23)の実行前条件は、なお成立している。したがって、これらのプランは継続して中断中プランDB166に保持される。   The pre-execution conditions for the other plans (plan 18, plan 19, plan 20, plan 22, plan 23) stored in the executing plan DB 164 are still established. Therefore, these plans are continuously held in the suspended plan DB 166.

割込プランの実行が完了したので、次に実行管理部120は、中断中プランDB166に格納されている中断中のプラン(プラン18、プラン19、プラン20、プラン22、プラン23およびプラン24)の実行を再開する。具体的には、これらのプランを中断中プランDB166からポップし、実行中プランDB164に移動する。   Since execution of the interrupt plan has been completed, the execution management unit 120 next executes the suspended plans (plan 18, plan 19, plan 20, plan 22, plan 23, and plan 24) stored in the suspended plan DB 166. Resume execution. Specifically, these plans are popped from the suspended plan DB 166 and moved to the executing plan DB 164.

そして、プラン18、プラン19、プラン20、プラン22、プラン23およびプラン24の中で、最も総コストの小さいプラン24を実行する。具体的には、アクション:

changeGoal(showAround([exhibition2],taro))

を実行する。このアクションの実行により、タスク:

showAround([exhibition2,taro])

のプランを作成し、実行する。
Then, the plan 24 having the smallest total cost is executed among the plan 18, the plan 19, the plan 20, the plan 22, the plan 23, and the plan 24. Specifically, the action:

changeGoal (showAround ([exhibition2], taro))

Execute. By performing this action, the task:

showAround ([exhibition2, taro])

Create and execute your plan.

その後、プラン24から実行済みアクション:

changeGoal(showAround([exhibition2],taro))

に関する情報が削除される。これにより、プラン24は以下のように空プランに変更される。これにより、再開したプランの実行が完了する。

プラン24:
[
]
After that, the action performed from plan 24:

changeGoal (showAround ([exhibition2], taro))

Information about is deleted. As a result, the plan 24 is changed to an empty plan as follows. Thereby, execution of the resumed plan is completed.

Plan 24:
[
]

続いて、タスク:

showAround([exhibition2],taro)

をゴールとして、複数のプランが作成される。このうち総コストが最も小さいプランは、以下のプラン(プラン40)である。

プラン40:
[
precond([at(node1)],[]),
gotoNextNode(node1,node2),
effect([initiates(at(node2)),terminates(at(node4))]),
precond([at(node2),with(taro)],[]),
speak(' これはロボット操作用のソフトウェアです。'),
effect([]),
precond([],[]),
changeGoal(showAround([],taro)),
effect([])
]

このように、ここで作成されたプラン40には、太郎に対し展示物exhibition1を案内するタスクは含まれていない。これは、先の花子に対し展示物exhibition1を案内するタスクにおいて、同時に太郎に展示物exhibition1を案内するタスクが実行され、これに対するタスクが削除されたからである。すなわち、プラン40においては、図19に示すように、移動ロボット10は、node1からnode2へ移動し、node2において、太郎に対しまだ説明していない展示物:exhibition2を説明する。以下同様に、図6〜図13を参照しつつ説明したプラン実行処理にしたがい、プランを実行していく。
Then the task:

showAround ([exhibition2], taro)

With this goal, multiple plans are created. Among these, the plan with the smallest total cost is the following plan (plan 40).

Plan 40:
[
precond ([at (node1)], []),
gotoNextNode (node1, node2),
effect ([initates (at (node2)), terminates (at (node4))]),
precond ([at (node2), with (taro)], []),
spike ('This is software for robot operation'),
effect ([]),
precond ([], []),
changeGoal (showAround ([], taro)),
effect ([])
]

As described above, the plan 40 created here does not include a task for guiding the exhibition exhibit 1 to Taro. This is because, in the task of guiding the exhibition exhibition 1 to Hanako, the task of guiding the exhibition exhibition 1 to Taro was executed at the same time, and the task for this was deleted. That is, in the plan 40, as shown in FIG. 19, the mobile robot 10 moves from node1 to node2, and in node2, the exhibit: exhibition2, which has not yet been explained to Taro, is described. Similarly, the plan is executed in accordance with the plan execution process described with reference to FIGS.

図20は、実施の形態にかかる移動ロボット10のハードウェア構成を示す図である。移動ロボット10は、ハードウェア構成として、移動ロボット10におけるプラン実行処理を実行するプラン実行プログラムなどが格納されているROM52と、ROM52内のプログラムに従って移動ロボット10の各部を制御するCPU51と、移動ロボット10の制御に必要な種々のデータを記憶するRAM53と、ネットワークに接続して通信を行う通信I/F57と、各部を接続するバス62とを備えている。   FIG. 20 is a diagram illustrating a hardware configuration of the mobile robot 10 according to the embodiment. The mobile robot 10 includes, as a hardware configuration, a ROM 52 that stores a plan execution program for executing a plan execution process in the mobile robot 10, a CPU 51 that controls each part of the mobile robot 10 according to a program in the ROM 52, and a mobile robot 10 is provided with a RAM 53 for storing various data necessary for the control 10, a communication I / F 57 for connecting to a network for communication, and a bus 62 for connecting each unit.

先に述べた移動ロボット10におけるプラン実行プログラムは、インストール可能な形式又は実行可能な形式のファイルでCD−ROM、フロッピー(R)ディスク(FD)、DVD等のコンピュータで読み取り可能な記録媒体に記録されて提供されてもよい。   The plan execution program in the mobile robot 10 described above is recorded in a computer-readable recording medium such as a CD-ROM, floppy (R) disk (FD), DVD, etc. in an installable or executable format file. May be provided.

この場合には、プラン実行プログラムは、移動ロボット10において上記記録媒体から読み出して実行することにより主記憶装置上にロードされ、上記ソフトウェア構成で説明した各部が主記憶装置上に生成されるようになっている。   In this case, the plan execution program is loaded onto the main storage device by being read from the recording medium and executed by the mobile robot 10 so that each unit described in the software configuration is generated on the main storage device. It has become.

また、本実施の形態のプラン実行プログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成しても良い。   Further, the plan execution program of the present embodiment may be provided by being stored on a computer connected to a network such as the Internet and downloaded via the network.

以上、本発明を実施の形態を用いて説明したが、上記実施の形態に多様な変更または改良を加えることができる。   As described above, the present invention has been described using the embodiment, but various changes or improvements can be added to the above embodiment.

そうした第1の変更例としてはプラン作成用知識DB140はさらに以下のプラン作成用知識を格納してもよい。

htn(explain(Object,Person),[
at(Node),
location(Object,Node),
contents(Object,Text)
],[
call(Person,Node),
speak(Text)
]).

action(call(Person,Node),[
at(Node)
],[
initiates(with(Person))
])
As such a first modification, the plan creation knowledge DB 140 may further store the following plan creation knowledge.

htn (explain (Object, Person), [
at (Node),
location (Object, Node),
contents (Object, Text)
], [
call (Person, Node),
spike (Text)
]).

action (call (Person, Node), [
at (Node)
], [
initiates (with (Person))
])

ここで、「call(Person)」というアクションは、ロボットがNodeにいるときに実行された場合には、館内放送などで人:Personをロボットがいる場所:Nodeに呼び出すものである。したがって、このアクションによりwith(Person)(ロボットと人:Personが一緒にいる)が成立する。ただし、ここでPersonとNodeは変数である。   Here, when the action “call (Person)” is executed when the robot is in the Node, the person: Person is called to the location where the robot is located: Node in a broadcast in the building or the like. Therefore, this action establishes with (Person) (a robot and a person: Person are together). Here, Person and Node are variables.

例えば、割込ゴールにより花子に展示物を説明している間に、太郎が離れてしまったとする。この場合、「太郎に展示物の説明をする」というプランに対する実行前条件「太郎と一緒にいる」が満たされない。したがって、このプランを再開することができなくなってしまう。これに対し、本例のように、太郎を呼び出すことができれば、太郎を読み戻した後に、「太郎に展示物を説明する」というプランを実行することができる。なお、アクションcall(Person,Node)の実行には一定のコストがかかることとする。   For example, suppose Taro leaves while explaining an exhibit to Hanako by an interrupt goal. In this case, the pre-execution condition “I am with Taro” for the plan “explain the exhibit to Taro” is not satisfied. Therefore, this plan cannot be resumed. On the other hand, if Taro can be called as in this example, after reading Taro back, the plan of “explaining exhibits to Taro” can be executed. It is assumed that a certain cost is required to execute the action call (Person, Node).

また、上記プラン作成用知識は、「対象物:Objectに関して、人:Personに説明をする」というタスク:

explain(Object,Person)

を実行するには、たとえ、実行前条件:

with(Person)

が成立しなくとも、以下に示す3つの実行前条件(実行前条件1、実行前条件2および実行前条件3)が成り立つならば、「人:Personに対し、現在ロボットがいるノード:Nodeにくるように館内放送し、実際にくるまで待つ」というタスク:

call(Person)

を実行したあとに、「対象物:Objectの説明文の文字列:Textを音声出力する」というタスク:

speak(Text)

を実行すればよいことを示している。ただし、PersonとObjectとNodeとTextは変数である。
The plan creation knowledge is based on the task of “explaining to the person: Person regarding the object: Object”:

explain (Object, Person)

To execute, even before execution condition:

with (Person)

If the following three pre-execution conditions (pre-execution condition 1, pre-execution condition 2 and pre-execution condition 3) hold, even if is not established, “person: Person, node: Node where the current robot is located: Node “To broadcast inside the hall, wait until it actually comes” task:

call (Person)

After executing the task, “object: character string of object description: text is output as voice”:

spike (Text)

Indicates that it should be executed. However, Person, Object, Node, and Text are variables.

上述の実行前条件1は、「現在位置がノード:Nodeである」であり、以下のように記述される。

at(Node)

また、実行前条件2は、「対象物:Objectの位置が現在位置のノード:Nodeである」であり、以下のように記述される。

location(Object,Node))

また、実行前条件3は、「対象物:Objectの説明文がTextである」であり、以下のように記述される。

contents(Object,Text)
The above pre-execution condition 1 is “the current position is a node: Node”, and is described as follows.

at (Node)

The pre-execution condition 2 is “object: the position of the object is the current position node: Node”, and is described as follows.

location (Object, Node))

Further, the pre-execution condition 3 is “the description of the object: Object is Text”, which is described as follows.

contents (Object, Text)

さらに、実施の形態において説明したのと同様に、ゴール受付部100が「対象物:exhibition1とexhibition2の前で人:taroに各対象物の説明する」といいうタスク:

showAround([exhibition1,exhibition2],taro)

を通常ゴールとして受け付けたとする。この場合には、プラン作成部150は、実施の形態において説明したのと同様に、プラン5、プラン6、プラン8、プラン10、プラン11、プラン12を作成する。さらに上述のプラン作成用知識に基づいて、以下に示すプラン(プラン12b)を作成する。

プラン12b:
[
precond([at(node6)],[]),
gotoNextNode(node6,node4),
effect([initiates(at(node4)),terminates(at(node6))]),
precond([at(node4)],[]),
gotoNextNode(node4,node2),
effect([initiates(at(node2)),terminates(at(node4))]),
precond([at(node2)],[]),
call(taro,node2),
speak(' これはロボット操作用のソフトウェアです。'),
changeGoal(showAround([exhibition1],taro)),
]
Further, in the same manner as described in the embodiment, the task that the goal accepting unit 100 “explains each object to a person: taro in front of the objects: exhibition1 and exhibition2”:

showAround ([exhibition1, exhibition2], taro)

Is accepted as a normal goal. In this case, the plan creating unit 150 creates the plan 5, the plan 6, the plan 8, the plan 10, the plan 11, and the plan 12 as described in the embodiment. Furthermore, the following plan (plan 12b) is created based on the above-mentioned knowledge for creating a plan.

Plan 12b:
[
precond ([at (node6)], []),
gotoNextNode (node6, node4),
effect ([initates (at (node4)), terminates (at (node6))]),
precond ([at (node4)], []),
gotoNextNode (node4, node2),
effect ([initates (at (node2)), terminates (at (node4))]),
precond ([at (node2)], []),
call (taro, node2),
spike ('This is software for robot operation'),
changeGoal (showAround ([exhibition1], taro)),
]

次に、プラン12が選択され、アクション実行部170はプラン12において最初に出現するアクションを実行する。プラン12bの場合の移動距離とプラン12の移動距離は等しいが、プラン12bにおいてはタスク:

call(taro)

に対するコスト分だけ総コストが大きくなる。このため、プラン12bは選択されずプラン12が選択される。
Next, the plan 12 is selected, and the action execution unit 170 executes the action that appears first in the plan 12. In the case of the plan 12b, the movement distance of the plan 12 is equal to the movement distance of the plan 12, but in the plan 12b, the task:

call (taro)

The total cost increases by the cost for. For this reason, the plan 12b is selected without selecting the plan 12b.

次に、実施の形態において説明したのと同様に、プラン12にしたがい、アクション:

gotoNextNode(node6,node4)

が実行され、次にアクション:

gotoNextNode(node4,node2)

が実行される。
Next, as described in the embodiment, according to the plan 12, the action:

gotoNextNode (node6, node4)

Is executed and then the action:

gotoNextNode (node4, node2)

Is executed.

なお、このとき実行中プランDB164には、プラン10とプラン11とプラン12とプラン16とプラン17に加え、プラン12bも保持されている。なお、上記2つのアクションが実行された後は、プラン12bから実行済みのアクションが削除されている。更新後のプラン12bは以下のように記述される。

プラン12b:
[
precond([at(node2)],[]),
call(taro,node2),
speak(' これはロボット操作用のソフトウェアです。'),
changeGoal(showAround([exhibition1],taro)),
]
At this time, the executing plan DB 164 holds the plan 12b in addition to the plan 10, the plan 11, the plan 12, the plan 16, and the plan 17. Note that after the above two actions are executed, the executed actions are deleted from the plan 12b. The updated plan 12b is described as follows.

Plan 12b:
[
precond ([at (node2)], []),
call (taro, node2),
spike ('This is software for robot operation'),
changeGoal (showAround ([exhibition1], taro)),
]

さらに、実施の形態において説明したのと同様に、この時点で外部から割込ゴール:

show(exhibition1,hanako)

が投入されたとする。この場合には、実行管理部120は、実行中プランDB164に保持されているプラン(プラン10とプラン11とプラン12とプラン12bプラン16とプラン17)をまとめて中断中プランDB166のスタックにプッシュする。
Furthermore, as described in the embodiment, the interrupt goal from the outside at this point:

show (exhibition1, hanako)

Is input. In this case, the execution management unit 120 pushes the plans (plan 10, plan 11, plan 12, plan 12b plan 16, plan 17) held in the running plan DB 164 together onto the stack of the suspended plan DB 166. To do.

次に、プラン作成部150は、割込ゴールに対応する割込プランを作成する。具体的には、実施の形態において説明したように、プラン30とプラン31とプラン32とプラン33とプラン34が作成される。さらに本例においては上述のプラン作成用知識に基づいて、以下に示すプラン30bが作成される。

プラン30b:
[
precond([at(node2)],[]),
gotoNextNode(node2,node1),
effect([initiates(at(node1)),terminates(at(node2))])
precond([at(node1)] ,[]),
call(hanako,node1),
speak(' これは世界初の日本語ワープロです。')
]
Next, the plan creation unit 150 creates an interrupt plan corresponding to the interrupt goal. Specifically, as described in the embodiment, the plan 30, the plan 31, the plan 32, the plan 33, and the plan 34 are created. Furthermore, in this example, the plan 30b shown below is created based on the above-mentioned knowledge for creating a plan.

Plan 30b:
[
precond ([at (node2)], []),
gotoNextNode (node2, node1),
effect ([initates (at (node1)), terminates (at (node2))])
precond ([at (node1)], []),
call (hanako, node1),
spike ('This is the world's first Japanese word processor.')
]

そして、これらのプランのうちプラン30が選択され、アクション実行部170はプラン30のうち最初に出現するアクションを実行する。なお、プラン30bとプラン30は移動距離に関してはコストは等しいが、プラン30bはcall(hanako)の分だけコストが大きくなる。したがって、総コストは、プラン30bの方が大きくなる。このため、プラン30bは選択されず、プラン30が選択される。   The plan 30 is selected from these plans, and the action execution unit 170 executes the action that appears first in the plan 30. Note that the costs of the plan 30b and the plan 30 are the same with respect to the moving distance, but the cost of the plan 30b is increased by the amount of call (hanako). Therefore, the total cost of the plan 30b is larger. For this reason, the plan 30b is not selected but the plan 30 is selected.

さらに、プラン30にしたがい、アクション:

gotoNextNode(node2,node1)

を実行し、次にアクション:

speak(' これは世界初の日本語ワープロです。')

を実行する。これにより、割込ゴールの実行が完了する。
In addition, according to plan 30, action:

gotoNextNode (node2, node1)

Run and then action:

spike ('This is the world's first Japanese word processor.')

Execute. Thereby, execution of the interrupt goal is completed.

なお、実施の形態においては、割込ゴールに基づいて、花子に展示物を説明するアクションを実行する間、太郎は移動ロボット10と共に移動することが前提となっていたが、本例においては、太郎は花子と行動を共にしない。したがってアクション:

gotoNextNode(node2,node1)

を実行した後は、信念:

with(taro)

は成立しなくなる。
In the embodiment, it is assumed that Taro moves with the mobile robot 10 while performing an action explaining the exhibit to Hanako based on the interrupt goal, but in this example, Taro does not act with Hanako. Therefore action:

gotoNextNode (node2, node1)

After running the belief:

with (taro)

No longer holds.

そこで、まず、アクション:

gotoNextNode(node2,node1)

を実行した後、実施の形態において説明したのと同様に、プラン10とプラン16から、実行済みアクション:

gotoNextNode(node2,node1)

を削除する。
So first, action:

gotoNextNode (node2, node1)

After executing the above, from the plan 10 and the plan 16, the executed actions are:

gotoNextNode (node2, node1)

Is deleted.

これにより、プラン10およびプラン16は以下のように変更される。

プラン10:
[
gotoNodeWide(node1,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro))
]

プラン16:
[
gotoNodeWide(node1,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]
Thereby, the plan 10 and the plan 16 are changed as follows.

Plan 10:
[
gotoNodeWide (node1, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro))
]

Plan 16:
[
gotoNodeWide (node1, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

なお、アクションを実行することにより、移動ロボット10の位置は、node2からnode1に変更されるため、プラン11、プラン12、プラン12bおよびプラン17においては、実行前条件:

at(node2)

が成立しなくなる。そこで、これらのプラン(プラン11、プラン12、プラン12bおよびプラン17)を中断中プランDB166から削除する。
In addition, since the position of the mobile robot 10 is changed from node2 to node1 by executing the action, the pre-execution condition in the plan 11, the plan 12, the plan 12b, and the plan 17 is:

at (node2)

No longer holds. Therefore, these plans (plan 11, plan 12, plan 12b, and plan 17) are deleted from the suspended plan DB 166.

また、プラン10において最初に出現するタスクは、アクションではない。そこで、プラン10をさらに分解する。これにより、以下のプラン(プラン18およびプラン19)が作成される。

プラン18:
[
precond([at(node1)],[]),
gotoNextNode(node1,node2),
effect([initiates(at(node2)),terminates(at(node1))]),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro)
]

プラン19:
[
precond([at(node1)],[]),
gotoNextNode(node1,node2),
effect([initiates(at(node2)),terminates(at(node1))]),
precond([at(node2)],[]),
gotoNextNode(node2,node1),
effect([initiates(at(node1)),terminates(at(node2))]),
gotoNodeWide(node1,node2),
explain(exhibition2,taro),
changeGoal(showAround([exhibition1],taro)
]
The task that appears first in the plan 10 is not an action. Therefore, the plan 10 is further disassembled. As a result, the following plans (plan 18 and plan 19) are created.

Plan 18:
[
precond ([at (node1)], []),
gotoNextNode (node1, node2),
effect ([initates (at (node2)), terminates (at (node1))]),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro)
]

Plan 19:
[
precond ([at (node1)], []),
gotoNextNode (node1, node2),
effect ([initates (at (node2)), terminates (at (node1))]),
precond ([at (node2)], []),
gotoNextNode (node2, node1),
effect ([initates (at (node1)), terminates (at (node2))]),
gotoNodeWide (node1, node2),
explain (exhibition2, taro),
changeGoal (showAround ([exhibition1], taro)
]

また、プラン16において最初に出現するタスクはアクションでない。そこで、プラン16をさらに分解する。これにより、以下のプラン(プラン21b、プラン22およびプラン23)が作成される。

プラン21b:
[
precond([at(node1)],[]),
call(taro,node1),
effect([initiates(with(taro))]),
precond([at(node1),with(taro)],[]),
speak(' これは世界初の日本語ワープロです。'),
effect([]),
changeGoal(showAround([exhibition2],taro))
]

プラン22:
[
precond([at(node1)],[]),
gotoNextNode(node1,node2),
effect([initiates(at(node2)),terminates(at(node1))]),
gotoNodeWide(node2,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]

プラン23:
[
precond([at(node1)],[]),
gotoNextNode(node1,node3),
effect([initiates(at(node3)),terminates(at(node1))]),
gotoNodeWide(node3,node1),
explain(exhibition1,taro),
changeGoal(showAround([exhibition2],taro))
]
Also, the task that appears first in the plan 16 is not an action. Therefore, the plan 16 is further disassembled. Thereby, the following plans (plan 21b, plan 22, and plan 23) are created.

Plan 21b:
[
precond ([at (node1)], []),
call (taro, node1),
effect ([initites (with (taro))]),
precond ([at (node1), with (taro)], []),
spike ('This is the world's first Japanese word processor'),
effect ([]),
changeGoal (showAround ([exhibition2], taro))
]

Plan 22:
[
precond ([at (node1)], []),
gotoNextNode (node1, node2),
effect ([initates (at (node2)), terminates (at (node1))]),
gotoNodeWide (node2, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

Plan 23:
[
precond ([at (node1)], []),
gotoNextNode (node1, node3),
effect ([initates (at (node3)), terminates (at (node1))]),
gotoNodeWide (node3, node1),
explain (exhibition1, taro),
changeGoal (showAround ([exhibition2], taro))
]

アクションを実行した後は、with(taro)は成立しない。したがって、実施の形態において、この時点で作成されたプラン21は作成されず、これにかえて、プラン21bが作成される。図21は、プラン21bを模式的に示す図である。   With (taro) is not established after the action is executed. Therefore, in the embodiment, the plan 21 created at this point is not created, and the plan 21b is created instead. FIG. 21 is a diagram schematically showing the plan 21b.

次に、アクション:

speak(' これは世界初の日本語ワープロです。')

を実行する。本例においては、この後、プラン18、プラン19、プラン20、プラン21b、プラン22およびプラン23は、継続して中断中プランDB166に保持される。
Then action:

spike ('This is the world's first Japanese word processor.')

Execute. In this example, thereafter, the plan 18, the plan 19, the plan 20, the plan 21b, the plan 22, and the plan 23 are continuously held in the suspended plan DB 166.

なお、プラン21bの先頭のアクションは、call(taro,node1)である。したがって、プラン21bからは実行済みアクション:

speak(' これは世界初の日本語ワープロです。')

に関する情報は削除できない。なお、このとき、太郎は、移動ロボット10とともに移動しておらず、node1にいない。したがって、太郎は、node1において、展示物exhibtion1の説明は聞いていない。したがって、中断中のプランが再開したときには、太郎に展示物exhibtion1の説明をするアクションを実行する必要がある。
Note that the action at the head of the plan 21b is call (taro, node1). Therefore, the executed action from the plan 21b is:

spike ('This is the world's first Japanese word processor.')

Information about cannot be deleted. At this time, Taro is not moving with the mobile robot 10 and is not in node1. Therefore, Taro has not heard the explanation of exhibition exhibition1 at node1. Therefore, when the suspended plan is resumed, it is necessary to execute an action for explaining the exhibition exhibition1 to Taro.

割込ゴールに対するプランの実行がすべて完了すると、次に実行管理部120は、中断中プランDB166に格納されていたプラン(プラン18、プラン19、プラン20、プラン21b、プラン22およびプラン23)を実行中プランDB164に移動する。そして、通常ゴールに対するプランの実行を再開する。   When all executions of the plan for the interrupt goal are completed, the execution management unit 120 next selects the plans (plan 18, plan 19, plan 20, plan 21b, plan 22 and plan 23) stored in the suspended plan DB 166. Move to the executing plan DB 164. Then, the execution of the plan for the normal goal is resumed.

このときのアクション:

call(taro,node)

のコストは、移動距離に対するコストに比較して小さいこととする。この場合、プラン21bが最もコストの小さいプランとして選択される。そして、プラン21bのアクション:
changeGoal(showAround([exhibition2],taro))

に実行前条件と効果が付与される。これにより以下に示すプラン(プラン24b)が作成される。

プラン24b:
[
precond([at(node1)],[]),
call(taro,node1),
effect([initiates(with(taro))]),
precond([at(node1),with(taro)],[]),
speak(' これは世界初の日本語ワープロです。'),
effect([]),
precond([]),
changeGoal(showAround([exhibition2],taro))
effect([])
]
Action at this time:

call (taro, node)

The cost of is assumed to be small compared to the cost for the moving distance. In this case, the plan 21b is selected as the plan with the lowest cost. And the action of plan 21b:
changeGoal (showAround ([exhibition2], taro))

Is given pre-execution conditions and effects. As a result, the following plan (plan 24b) is created.

Plan 24b:
[
precond ([at (node1)], []),
call (taro, node1),
effect ([initites (with (taro))]),
precond ([at (node1), with (taro)], []),
spike ('This is the world's first Japanese word processor'),
effect ([]),
precond ([]),
changeGoal (showAround ([exhibition2], taro))
effect ([])
]

以下このプラン24bを実行していくが、アクション:
call(taro,node1)

の実行により、花子と行動を共にしていなかった太郎を館内案内放送等でnode1に呼び、アクション:

speak(' これは世界初の日本語ワープロです。')

を実行する点が、実施の形態と異なる。
The plan 24b will be executed below, but the action:
call (taro, node1)

As a result of the execution, Taro, who had not been acting with Hanako, was called to node1 in the hall information broadcasting etc., and the action:

spike ('This is the world's first Japanese word processor.')

Is different from the embodiment.

すなわち、実施の形態においては、太郎は花子と行動を共にしており、アクション:

speak(' これは世界初の日本語ワープロです。')

は、花子と太郎が移動ロボット10と一緒にいるときに一度しか実行されないのに対し、本例においては、このアクションを2度実行する。すなわち、本例においては、移動ロボット10が花子のみと一緒にいるときに一度実行し、その後、別の場所にいる太郎を呼び、再びこのアクションを実行する。
That is, in the embodiment, Taro is acting together with Hanako, and the action:

spike ('This is the world's first Japanese word processor.')

Is executed only once when Hanako and Taro are together with the mobile robot 10, whereas in this example, this action is executed twice. That is, in this example, it is executed once when the mobile robot 10 is with Hanako alone, and thereafter, Taro in another place is called and this action is executed again.

このように、本例においては、割込プランの実行中に、中断しているプランを再開できなくなった場合には、再開可能となるようなアクションを追加することにより、中断中のプランを実行することができる。   In this way, in this example, if the interrupted plan cannot be resumed during the execution of the interrupt plan, the suspended plan is executed by adding an action that can be resumed. can do.

本実施の形態にかかるプラン作成装置を備えた移動ロボット10の機能構成を示す図である。It is a figure which shows the function structure of the mobile robot 10 provided with the plan creation apparatus concerning this Embodiment. プランとアクションの関係を示す図である。It is a figure which shows the relationship between a plan and an action. 信念DB130に格納されているトポロジカル地図を模式的に示す図である。It is a figure which shows typically the topological map stored in belief DB130. プラン作成用知識DB140が格納しているプラン作成用知識を模式的に示す図である。It is a figure which shows typically the knowledge for plan creation stored in knowledge DB140 for plan creation. 実施の形態にかかる移動ロボット10がプランを実行するときのプラン実行処理を示すフローチャートである。It is a flowchart which shows the plan execution process when the mobile robot 10 concerning embodiment performs a plan. 図5において説明した実行後プラン更新処理(ステップS112)における詳細な処理を示すフローチャートである。It is a flowchart which shows the detailed process in the post-execution plan update process (step S112) demonstrated in FIG. 図6において説明したプラン更新処理(ステップS208)における詳細な処理を示すフローチャートである。It is a flowchart which shows the detailed process in the plan update process (step S208) demonstrated in FIG. 図7において説明した実行前条件確認処理(ステップS220)における詳細な処理を示すフローチャートである。It is a flowchart which shows the detailed process in the pre-execution condition confirmation process (step S220) demonstrated in FIG. 第1の条件を説明するための図である。It is a figure for demonstrating the 1st condition. 第2の条件を説明するための図である。It is a figure for demonstrating the 2nd condition. 図7において説明したタスク分解処理(ステップS228)における詳細な処理を示すフローチャートである。It is a flowchart which shows the detailed process in the task decomposition | disassembly process (step S228) demonstrated in FIG. 図5において説明した再開時プラン更新処理(ステップS124)における詳細な処理を示すフローチャートである。It is a flowchart which shows the detailed process in the plan update process at the time of restart demonstrated in FIG. 5 (step S124). 図5において説明したゴール処理(ステップS128)における詳細な処理を示すフローチャートである。It is a flowchart which shows the detailed process in the goal process (step S128) demonstrated in FIG. 通常ゴールの一例を模式的に示す図である。It is a figure which shows an example of a normal goal typically. アクション実行後の状態を模式的に示す図である。It is a figure which shows typically the state after action execution. アクション実行後の状態を模式的に示す図である。It is a figure which shows typically the state after action execution. 割込ゴールの一例を模式的に示す図である。It is a figure which shows an example of an interruption goal typically. アクション実行後の状態を模式的に示す図である。It is a figure which shows typically the state after action execution. アクション実行後の状態を模式的に示す図である。It is a figure which shows typically the state after action execution. 実施の形態にかかる移動ロボット10のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of the mobile robot 10 concerning embodiment. プラン21bを模式的に示す図である。It is a figure which shows the plan 21b typically.

符号の説明Explanation of symbols

51 CPU
52 ROM
53 RAM
57 通信I/F
62 バス
10 移動ロボット
100 ゴール受付部
110 ゴール保持部
112 割込ゴール待ち行列
114 通常ゴール待ち行列
120 実行管理部
130 信念DB
140 プラン作成用知識DB
150 プラン作成部
160 プランDB制御部
162 割込プランDB
164 実行中プランDB
166 中断中プランDB
170 アクション実行部
51 CPU
52 ROM
53 RAM
57 Communication I / F
62 Bus 10 Mobile Robot 100 Goal Accepting Unit 110 Goal Holding Unit 112 Interruption Goal Queue 114 Normal Goal Queue 120 Execution Management Unit 130 Belief DB
140 Knowledge DB for creating plans
150 Plan creation unit 160 Plan DB control unit 162 Interrupt plan DB
164 Running plan DB
166 Suspended plan DB
170 Action execution part

Claims (14)

ある目的を示すゴールを達成するプランを実行するプラン実行装置であって、
前記ゴールを達成可能なプランを保持する実行中プラン保持手段と、
前記実行中プラン保持手段に保持されている前記プランを実行するプラン実行手段と、
前記プラン実行手段が実行を中断したプランを保持する中断中プラン保持手段と、
前記プラン実行手段が前記プランを実行中に、割り込みにより前記ゴールに優先して達成すべき割込ゴールを取得するゴール取得手段と、
前記ゴール取得手段が取得した前記割込ゴールに基づいて、当該割込ゴールを達成するために実行すべき割込プランを作成するプラン作成手段と、
前記ゴール取得手段が前記割込ゴールを取得した場合に、前記プラン実行手段が実行中のプランの実行を中断し、前記実行中プラン保持手段に保持されているプランを前記中断中プラン保持手段に退避させ、かつ前記プラン作成手段により作成された前記割込プランを前記実行中プラン保持手段に保持させるプラン実行制御手段と、
前記プラン実行手段が前記割込プランを実行した場合に、実行内容に基づいて前記中断中プラン保持手段が保持しているプランの内容を更新するプラン更新手段と、
前記プラン実行手段が前記割込プランの実行を完了した場合に、前記中断中プラン保持手段に保持されている更新後のプランを前記実行中プラン保持手段に移動させた後、前記実行中プラン保持手段に保持されている前記プランの実行を再開するプラン再開制御手段と
を備えたことを特徴とするプラン実行装置。
A plan execution device for executing a plan for achieving a goal indicating a certain purpose,
An ongoing plan holding means for holding a plan capable of achieving the goal;
Plan execution means for executing the plan held in the executing plan holding means;
The suspended plan holding means for holding the plan for which the plan executing means has suspended execution;
Goal acquisition means for acquiring an interrupt goal to be achieved in preference to the goal by interruption while the plan execution means is executing the plan;
Based on the interrupt goal acquired by the goal acquisition means, plan creation means for creating an interrupt plan to be executed in order to achieve the interrupt goal;
When the goal acquisition means acquires the interrupt goal, execution of the plan being executed by the plan execution means is suspended, and the plan held in the executing plan holding means is changed to the suspended plan holding means. Plan execution control means for saving and holding the interrupt plan created by the plan creation means in the executing plan holding means;
When the plan execution unit executes the interrupt plan, the plan update unit updates the content of the plan held by the suspended plan holding unit based on the execution content;
When the plan execution unit completes the execution of the interrupt plan, the updated plan held in the suspended plan holding unit is moved to the running plan holding unit, and then the running plan holding is performed. And a plan resumption control means for resuming execution of the plan held by the means.
前記実行中プラン保持手段は、同一のゴールを達成可能な複数のプランを保持し、
前記プラン実行手段は、前記実行中プラン保持手段が保持している複数のプランのうちあるプランを実行し、
前記プラン実行制御手段は、前記プラン実行手段が実行中のプランの実行が中断された場合に、前記実行中プラン保持手段に保持されている複数のプランを前記中断中プラン保持手段に退避させ、
前記プラン更新手段は、前記プラン実行手段が前記割込プランを実行した場合に、実行内容に基づいて、前記中断中プラン保持手段が保持している複数のプランそれぞれの内容を更新し、
前記プラン再開制御手段は、前記プラン実行手段が前記割込プランの実行を完了した場合に、前記中断中プラン保持手段に保持されている、更新後の複数のプランを前記実行中プラン保持手段に移動させた後、前記実行中プラン保持手段に保持されている前記複数のプランのうちあるプランの実行を再開することを特徴とする請求項1に記載のプラン実行装置。
The executing plan holding means holds a plurality of plans that can achieve the same goal,
The plan execution means executes a plan among a plurality of plans held by the executing plan holding means,
The plan execution control means, when execution of the plan being executed by the plan execution means is interrupted, causes the plurality of plans held in the executing plan holding means to be saved in the interrupting plan holding means,
The plan update means updates the contents of each of the plurality of plans held by the suspended plan holding means based on the execution contents when the plan execution means executes the interrupt plan,
The plan resumption control means, when the plan execution means completes the execution of the interrupt plan, stores a plurality of updated plans held in the suspended plan holding means to the executing plan holding means. 2. The plan execution apparatus according to claim 1, wherein after executing the movement, the execution of a plan among the plurality of plans held in the executing plan holding unit is resumed.
前記実行中プラン保持手段が保持している複数のプランそれぞれの実行コストに基づいて、前記複数のプランのうちから前記プラン実行手段が実行すべきプランを選択するプラン選択手段をさらに備え、
前記プラン実行手段は、前記プラン選択手段によって選択された前記プランを実行することを特徴とする請求項2に記載のプラン実行装置。
A plan selection unit that selects a plan to be executed by the plan execution unit from the plurality of plans based on an execution cost of each of the plurality of plans held by the executing plan holding unit;
The plan execution device according to claim 2, wherein the plan execution unit executes the plan selected by the plan selection unit.
前記プラン更新手段は、前記プラン実行手段が前記実行中プラン保持手段に保持されている複数のプランのうちあるプランを実行した場合に、実行内容に基づいて前記実行中プラン保持手段が保持している複数のプランそれぞれを更新することを特徴とする請求項2または3に記載のプラン実行装置。   The plan update unit stores the execution plan holding unit based on the execution contents when the plan execution unit executes a plan among a plurality of plans held in the execution plan holding unit. The plan execution apparatus according to claim 2, wherein each of the plurality of plans is updated. 前記プランおよび前記割込プランは、それぞれ前記プラン実行手段における実行単位であるアクションを複数含み、
前記プラン実行手段は、前記割込プランを前記アクション単位で実行し、
前記プラン更新手段は、前記中断中プラン保持手段が保持している前記プランに含まれるアクションのうち最初に実行されるべきアクションである先頭アクションと、前記プラン実行手段により実行された前記割込プランの前記アクションとが同一である場合に、前記中断中プラン保持手段が保持している前記プランから前記先頭アクションを削除することを特徴とする請求項1から4のいずれか一項に記載のプラン実行装置。
Each of the plan and the interrupt plan includes a plurality of actions that are execution units in the plan execution means,
The plan execution means executes the interrupt plan for each action,
The plan update means includes a first action that is an action to be executed first among actions included in the plan held by the suspended plan holding means, and the interrupt plan executed by the plan executing means. 5. The plan according to claim 1, wherein when the action is the same, the top action is deleted from the plan held by the suspended plan holding unit. 6. Execution device.
前記プラン更新手段が前記中断中プラン保持手段が保持している前記プランから前記先頭アクションを削除した場合に、削除後の前記プランから少なくとも次の先頭アクションを生成するアクション生成手段と、
前記アクション生成手段が生成した前記アクションを実行するための条件であって、かつ前記対象オブジェクトの状態に関する条件である実行前条件を、前記アクション生成手段によって生成された前記アクションに付与する実行前条件付与手段と、
前記プランの実行の対象となる対象オブジェクトの状態を示す状態情報を保持する状態情報保持手段と
をさらに備え、
前記プラン更新手段は、前記状態情報保持手段が保持する前記状態情報が前記実行前条件付与手段によって付与された前記実行前条件を満たさない場合に、前記実行前条件が付与された前記アクションを含むプランを前記中断中プラン保持手段から削除することを特徴とする請求項5に記載のプラン実行装置。
Action generating means for generating at least the next head action from the deleted plan when the plan updating means deletes the head action from the plan held by the suspended plan holding means;
A pre-execution condition for giving a pre-execution condition that is a condition for executing the action generated by the action generation means and that is a condition related to the state of the target object to the action generated by the action generation means Granting means;
State information holding means for holding state information indicating the state of the target object to be executed by the plan;
The plan update unit includes the action to which the pre-execution condition is assigned when the state information held by the state information holding unit does not satisfy the pre-execution condition given by the pre-execution condition assignment unit. 6. The plan execution apparatus according to claim 5, wherein the plan is deleted from the suspended plan holding unit.
前記実行中プラン保持手段は、前記プラン作成手段により同一の前記割り込みゴールに基づいて作成された複数の割込プランを保持し、
前記プラン更新手段は、前記プラン実行手段が前記割込プランを前記アクション単位で実行すると、前記実行中プラン保持手段が保持している前記割込プランのうち、前記プラン実行手段により実行された割込プラン以外の割込プランに含まれる先頭アクションと、前記プラン実行手段により実行された前記割込プランのアクションとが同一である場合に、前記実行中プラン保持手段が保持している前記割込プランのうち、前記プラン実行手段により実行された割込プラン以外の前記割込プランから前記先頭アクションを削除することを特徴とする請求項5または6に記載のプラン実行装置。
The executing plan holding means holds a plurality of interrupt plans created based on the same interrupt goal by the plan creating means,
When the plan execution unit executes the interrupt plan for each action, the plan update unit executes the interrupt executed by the plan execution unit among the interrupt plans held by the executing plan holding unit. The interruption held by the executing plan holding means when the first action included in the interruption plan other than the inclusion plan and the action of the interruption plan executed by the plan execution means are the same The plan execution apparatus according to claim 5 or 6, wherein the head action is deleted from the interrupt plans other than the interrupt plan executed by the plan execution means in the plan.
前記アクション生成手段は、前記プラン更新手段が前記実行中プラン保持手段が保持している前記割込プランから前記先頭アクションを削除した場合に、削除後の前記割込プランから少なくとも次の先頭アクションを生成し、
前記実行前条件付与手段は、前記アクション生成手段が前記割込プランから生成した前記アクションの前記実行前条件を、前記割込プランから生成した前記アクションに付与し、
前記プラン更新手段は、前記状態情報保持手段が保持する前記状態情報が前記実行前条件付与手段によって付与された前記実行前条件を満たさない場合に、前記実行前条件が付与された前記アクションを含む前記割込プランを前記実行中プラン保持手段から削除することを特徴とする請求項7に記載のプラン実行装置。
The action generation means, when the plan update means deletes the top action from the interrupt plan held by the executing plan holding means, at least the next top action from the interrupt plan after deletion. Generate
The pre-execution condition assigning means assigns the pre-execution condition of the action generated from the interrupt plan by the action generating means to the action generated from the interrupt plan,
The plan update unit includes the action to which the pre-execution condition is assigned when the state information held by the state information holding unit does not satisfy the pre-execution condition given by the pre-execution condition assignment unit. The plan execution apparatus according to claim 7, wherein the interrupt plan is deleted from the executing plan holding unit.
前記アクション生成手段は、前記状態情報保持手段が保持している前記状態情報に基づいて、前記アクションを生成することを特徴とする請求項6から8のいずれか一項に記載のプラン実行装置。   The plan execution apparatus according to claim 6, wherein the action generation unit generates the action based on the state information held by the state information holding unit. 前記アクションの実行による効果を示す実行効果を、前記アクションに付与する実行効果付与手段と、
前記プラン実行手段が前記アクションを実行する度に、前記アクションに付与された前記実行効果に基づいて、前記状態情報保持手段が保持する前記状態情報を更新する状態情報更新手段と
をさらに備え、
前記プラン更新手段は、前記状態情報更新手段により更新された後の前記状態情報が前記実行前条件を満たすか否かを判断することを特徴とする請求項6から9のいずれか一項に記載のプラン実行装置。
An execution effect imparting means for imparting an execution effect indicating the effect of the execution of the action to the action;
A state information update unit that updates the state information held by the state information holding unit based on the execution effect given to the action each time the plan execution unit executes the action; and
10. The plan update unit according to claim 6, wherein the plan update unit determines whether or not the state information after being updated by the state information update unit satisfies the pre-execution condition. 11. Plan execution device.
前記プランおよび前記割込プランは、それぞれ前記アクション実行手段における実行単位であるアクションを複数含み、
前記プラン実行手段は、前記割込プランをアクション単位で実行し、
前記プラン更新手段は、前記プラン実行手段が前記アクションの実行に失敗した場合に、前記中断中プラン保持手段が保持している前記プランに含まれるアクションのうち最初に実行されるべきアクションである先頭アクションと、前記プラン実行手段が実行に失敗した前記割込プランの前記アクションとが同一である場合に、前記中断中プラン保持手段が保持している前記プランであって、前記割込プランの前記アクションと同一の前記先頭アクションを含む前記プランを削除することを特徴とする請求項1から4のいずれか一項に記載のプラン実行装置。
The plan and the interrupt plan each include a plurality of actions which are execution units in the action execution means,
The plan execution means executes the interrupt plan in action units,
The plan update means is a head which is an action to be executed first among actions included in the plan held by the suspended plan holding means when the plan execution means fails to execute the action When the action and the action of the interrupt plan that the plan execution unit has failed to execute are the same, the plan held by the suspended plan holding unit, the plan of the interrupt plan 5. The plan execution apparatus according to claim 1, wherein the plan including the first action that is the same as an action is deleted. 6.
前記実行中プラン保持手段は、前記プラン作成手段により同一の前記割り込みゴールに基づいて作成された複数の割込プランを保持し、
前記プラン更新手段は、前記プラン実行手段が前記アクションの実行に失敗した場合に、前記実行中プラン保持手段が保持している前記割込プランに含まれる前記先頭アクションと、前記プラン実行手段が実行に失敗した前記割込プランのアクションとが同一である場合に、前記実行中プラン保持手段が保持している前記割込プランであって、前記割込プランの前記アクションと同一の前記先頭アクションを含む前記割込プランを削除することを特徴とする請求項11に記載のプラン実行装置。
The running plan holding means holds a plurality of interrupt plans created based on the same interrupt goal by the plan creating means,
The plan update unit includes the first action included in the interrupt plan held by the executing plan holding unit and the plan executing unit executed when the plan execution unit fails to execute the action. If the action of the interrupt plan that failed is the same as the action of the interruption plan held by the executing plan holding means, the first action that is the same as the action of the interruption plan The plan execution apparatus according to claim 11, wherein the interrupt plan is deleted.
ある目的を示すゴールを達成するプランを実行するプラン実行方法であって、
前記ゴールを達成可能なプランを保持する実行中プラン保持手段に保持されている前記プランを実行するプラン実行ステップと、
前記プラン実行ステップにおいて前記プランを実行中に、割り込みにより前記ゴールに優先して達成すべき割込ゴールを取得するゴール取得ステップと、
前記ゴール取得ステップにおいて取得した前記割込ゴールに基づいて、当該割込ゴールを達成するために実行すべき割込プランを作成するプラン作成ステップと、
前記ゴール取得ステップにおいて前記割込ゴールを取得した場合に、実行中のプランの実行を中断し、前記実行中プラン保持手段に保持されているプランを前記中断中プラン保持手段に退避させ、かつ前記プラン作成ステップにおいて作成された前記割込プランを前記実行中プラン保持手段に保持させるプラン実行制御ステップと、
前記割込プランを実行した場合に、実行内容に基づいて前記中断中プラン保持手段が保持しているプランの内容を更新するプラン更新ステップと、
前記割込プランの実行を完了した場合に、前記中断中プラン保持手段に保持されている更新後のプランを前記実行中プラン保持手段に移動させた後、前記実行中プラン保持手段に保持されている前記プランの実行を再開するプラン再開制御ステップと
を有することを特徴とするプラン実行方法。
A plan execution method for executing a plan that achieves a goal indicating a certain purpose,
A plan execution step of executing the plan held in the executing plan holding means holding a plan capable of achieving the goal;
A goal acquisition step of acquiring an interrupt goal to be achieved in preference to the goal by interruption during execution of the plan in the plan execution step;
Based on the interrupt goal acquired in the goal acquisition step, a plan creation step for creating an interrupt plan to be executed to achieve the interrupt goal;
When the interrupt goal is acquired in the goal acquisition step, the execution of the running plan is interrupted, the plan held in the executing plan holding means is saved in the interrupting plan holding means, and the A plan execution control step of holding the interrupt plan created in the plan creation step in the executing plan holding means;
A plan update step of updating the content of the plan held by the suspended plan holding means based on the execution content when the interrupt plan is executed;
When the execution of the interrupt plan is completed, the updated plan held in the suspended plan holding means is moved to the running plan holding means, and then held in the running plan holding means. A plan resumption control step for resuming execution of the plan.
ある目的を示すゴールを達成するプランを実行するプラン実行処理をコンピュータに実行させるプラン実行プログラムであって、
前記ゴールを達成可能なプランを保持する実行中プラン保持手段に保持されている前記プランを実行するプラン実行ステップと、
前記プラン実行ステップにおいて前記プランを実行中に、割り込みにより前記ゴールに優先して達成すべき割込ゴールを取得するゴール取得ステップと、
前記ゴール取得ステップにおいて取得した前記割込ゴールに基づいて、当該割込ゴールを達成するために実行すべき割込プランを作成するプラン作成ステップと、
前記ゴール取得ステップにおいて前記割込ゴールを取得した場合に、実行中のプランの実行を中断し、前記実行中プラン保持手段に保持されているプランを前記中断中プラン保持手段に退避させ、かつ前記プラン作成ステップにおいて作成された前記割込プランを前記実行中プラン保持手段に保持させるプラン実行制御ステップと、
前記割込プランを実行した場合に、実行内容に基づいて前記中断中プラン保持手段が保持しているプランの内容を更新するプラン更新ステップと、
前記割込プランの実行を完了した場合に、前記中断中プラン保持手段に保持されている更新後のプランを前記実行中プラン保持手段に移動させた後、前記実行中プラン保持手段に保持されている前記プランの実行を再開するプラン再開制御ステップと
を有することを特徴とするプラン実行プログラム。

A plan execution program for causing a computer to execute a plan execution process for executing a plan for achieving a goal indicating a certain purpose,
A plan execution step of executing the plan held in the executing plan holding means holding a plan capable of achieving the goal;
A goal acquisition step of acquiring an interrupt goal to be achieved in preference to the goal by interruption during execution of the plan in the plan execution step;
Based on the interrupt goal acquired in the goal acquisition step, a plan creation step for creating an interrupt plan to be executed to achieve the interrupt goal;
When the interrupt goal is acquired in the goal acquisition step, the execution of the running plan is interrupted, the plan held in the executing plan holding means is saved in the interrupting plan holding means, and the A plan execution control step of holding the interrupt plan created in the plan creation step in the executing plan holding means;
A plan update step of updating the content of the plan held by the suspended plan holding means based on the execution content when the interrupt plan is executed;
When the execution of the interrupt plan is completed, the updated plan held in the suspended plan holding means is moved to the running plan holding means, and then held in the running plan holding means. A plan resumption control step for resuming execution of the plan.

JP2005232627A 2005-08-10 2005-08-10 Plan execution device, plan execution method and plan execution program Abandoned JP2007048094A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005232627A JP2007048094A (en) 2005-08-10 2005-08-10 Plan execution device, plan execution method and plan execution program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005232627A JP2007048094A (en) 2005-08-10 2005-08-10 Plan execution device, plan execution method and plan execution program

Publications (1)

Publication Number Publication Date
JP2007048094A true JP2007048094A (en) 2007-02-22

Family

ID=37850858

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005232627A Abandoned JP2007048094A (en) 2005-08-10 2005-08-10 Plan execution device, plan execution method and plan execution program

Country Status (1)

Country Link
JP (1) JP2007048094A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010050498A1 (en) * 2008-10-30 2010-05-06 株式会社エヌ・ティ・ティ・ドコモ Event queue managing device and event queue managing method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010050498A1 (en) * 2008-10-30 2010-05-06 株式会社エヌ・ティ・ティ・ドコモ Event queue managing device and event queue managing method
JP2010108294A (en) * 2008-10-30 2010-05-13 Ntt Docomo Inc Event queue management device and event queue management method
US8539509B2 (en) 2008-10-30 2013-09-17 Ntt Docomo, Inc. Event queue managing device and event queue managing method

Similar Documents

Publication Publication Date Title
US8650574B2 (en) Method and system for dynamically creating and modifying resource topologies and executing systems management flows
JP2009217314A (en) Information processor, server, data processing method, storage medium and program
JP7275806B2 (en) Information processing device, information processing system and program
WO2014171130A1 (en) Information processing system, deployment method, processing device, and deployment device
JPH11203139A (en) Agent system, information processing method and recording medium recording information processing program
JP2008524682A (en) Rapid provisioning of computers to a homogenized resource pool
JP2010537317A (en) Workflow engine system and method
US8650568B2 (en) Method and system for transforming orders for executing them in standard workflow engines
JP2007257350A (en) Information processing apparatus and method
JP4357442B2 (en) Plan execution device, plan execution method and program
JP2007048094A (en) Plan execution device, plan execution method and plan execution program
JP4112511B2 (en) Task management program and task management device
CN104160375A (en) Device for creating system construction procedure, method for creating system construction procedure, and program
JP3688471B2 (en) Agent system, information processing method, and recording medium recording information processing software
JP3688462B2 (en) Information processing apparatus and method, and recording medium recording information processing program
JP2005092708A (en) Software update system and method, and computer program
JP2007179100A (en) Job queue system and job management method, control program, and computer-readable recording medium
JP4825416B2 (en) Differential file generation program and differential file distribution program
JP2007164679A (en) Remote installation system and method, and server cloning system and method
JP2013020494A (en) Software execution system, and software execution method, and program
JP4005984B2 (en) Plan execution method, system and program
JPH09190359A (en) Application shared system and its control method and information processing method and device
JP4550278B2 (en) Remote computer processing
JPH07210394A (en) Program management method for distributed system
JP2009211413A (en) File management system, file management method, and file management program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20061215

A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20100129