17 Planning 1 G 01 P 069 2004517

  • Slides: 58
Download presentation
17. プランニング(Planning) 1 G 01 P 069 飛田伸一 2004/5/17 1

17. プランニング(Planning) 1 G 01 P 069 飛田伸一 2004/5/17 1

1 初期状態 ゴール c a a b c 2 2004/5/17 b 3 4 1

1 初期状態 ゴール c a a b c 2 2004/5/17 b 3 4 1 2 3 4 4

Prologで表現する n 状態 n n n 前提条件 n n adds( Action, Add. Rels) 削除リスト

Prologで表現する n 状態 n n n 前提条件 n n adds( Action, Add. Rels) 削除リスト n n can( Action, Cond) 追加リスト n n on( Block, Object) clear( Object) delete( Action, Del. Rels) 行為 n 2004/5/17 move( Block, From, To) 6

Prologで表現する n 初期状態 n n [clear(2), clear(4), clear(b), clear( c), on(b, 3), on(c, a)] 

Prologで表現する n 初期状態 n n [clear(2), clear(4), clear(b), clear( c), on(b, 3), on(c, a)]  目標 n 2004/5/17 [ on( a, b), on( b, c)] 7

補足 初期状態 [clear(2), clear(4), clear(b), clear( c), on(a, 1), on(b, 3), on(c, a)] 行為

補足 初期状態 [clear(2), clear(4), clear(b), clear( c), on(a, 1), on(b, 3), on(c, a)] 行為 Move(c, a, 2) 前提条件: [clear( c), clear(2), on(c, a)] 追加リスト: [on(c, 2), clear(a)] 削除リスト: [on(c, a), clear(2)] [clear(a), clear(b), clear( c), clear(4), on(a, 1), on(b, 3), on(c, 2)] 2004/5/17 12

補足(2) [clear(a), clear(b), clear( c), clear(4), on(a, 1), on(b, 3), on(c, 2)] 行為 move(a,

補足(2) [clear(a), clear(b), clear( c), clear(4), on(a, 1), on(b, 3), on(c, 2)] 行為 move(a, 1, b) 前提条件: [clear(a), clear(b), on(a, 1)] 追加リスト: [on(a, b), clear(1)] 削除リスト: [on(a, 1), clear(b)] [clear(a), clear( c), clear(1), clear(4), on(a, b), on(b, 3), on(c, 2)] 目標達成 2004/5/17 13

Condition Pre. Plan State 2004/5/17 Goal Action Mid. State 1 Goals Post. Plan Mid.

Condition Pre. Plan State 2004/5/17 Goal Action Mid. State 1 Goals Post. Plan Mid. State 2 Final. State 15

impossible n 無理なものはimpossibleで定義する. impossible( on(X, X), _). 自分の上に自分は来ない impossible( on(X, Y), Goals) : -

impossible n 無理なものはimpossibleで定義する. impossible( on(X, X), _). 自分の上に自分は来ない impossible( on(X, Y), Goals) : - 同時に二箇所にいない member( clear(Y), Goals) ; member( on(X, Y 1), Goals), Y 1 == Y ; member( on(X, Y 1), Goals), X 1 == X. impossible( clear(X), Goals) : member( on(_, X), Goals). 2004/5/17 同じ場所に違うブロックは乗らない 29

17. 7 Uninstantiated actionsと 半順序プランニング n 能率を良くするためほかのことも考えてみ よう n n 2004/5/17 Uninstantiated actions and

17. 7 Uninstantiated actionsと 半順序プランニング n 能率を良くするためほかのことも考えてみ よう n n 2004/5/17 Uninstantiated actions and goals 半順序プランニング 37

Uninstantiated actions and goals n 変数を確定しないまま進めていく方法 2004/5/17 38

Uninstantiated actions and goals n 変数を確定しないまま進めていく方法 2004/5/17 38

例 a d e b e f d c f 7 8 b a

例 a d e b e f d c f 7 8 b a c 1 2 3 2004/5/17 4 5 6 1 2 3 4 5 6 7 8 40

START move(b, a, c ) move(e, d, f) move(a, 1, b ) move(d, 8,

START move(b, a, c ) move(e, d, f) move(a, 1, b ) move(d, 8, e ) FINISH 2004/5/17 42

参考文献(Internet) 人 知能論 http: //bruch. sfc. keio. ac. jp/course/AI 01/ai 01 -6/tsld 001. htm

参考文献(Internet) 人 知能論 http: //bruch. sfc. keio. ac. jp/course/AI 01/ai 01 -6/tsld 001. htm n 問題解決と学習 ~問題解決プログラムの作成と評価~ 第2章 http: //isl. educ. fukushima-u. ac. jp/~hitomi/soturon. html n プランニング http: //www. watanabe. nuie. nagoyau. ac. jp/member/sagawa/AI/cha p 3. ppt n プランニング技術 http: //www. jaist. ac. jp/~itota/Lecture/K 415 -4. ppt 半順序プランニングを調べるのに参照。 n 2004/5/17 51

END 2004/5/17 53

END 2004/5/17 53

おまけ 2004/5/17 54

おまけ 2004/5/17 54

Uninstantiated actions and goals move(b, a, c) move(c, a, 1) move(c, a, 2) can(move(Block,

Uninstantiated actions and goals move(b, a, c) move(c, a, 1) move(c, a, 2) can(move(Block, From, To), [clear(Block), clear(To), on(Blo ck, From)]). move(Something, a, Somewhere) 前提条件 [clear(Something), clear(Somewhere), on(Something, a)] Something = c Somewhere = 2 move(c, a, c) これは駄目 2004/5/17 55

Uninstantiated actions and goals Can(move(Block, From, To), [clear(Block), clear(To), on(Blo ck, From)]) : Block(Block),

Uninstantiated actions and goals Can(move(Block, From, To), [clear(Block), clear(To), on(Blo ck, From)]) : Block(Block), Object(To), ・・・ move(Something, a, Somewhere) can(move(Something, a, somewhere), Condition) move(b, a, 1) move(b, a, 2) move(b, a, 3) move(b, a, 4) 2004/5/17 56

M 1 = move(a, X, b) M 2 = move(b, Y, c) M 3

M 1 = move(a, X, b) M 2 = move(b, Y, c) M 3 = move(U, a, V) Before(M 3, M 1) [M 3, M 1, M 2] [M 3, M 2, M 1] [M 2, M 3, M 1] 2004/5/17 58