G eneral p roblem s olver
This presentation is the property of its rightful owner.
Sponsored Links
1 / 36

G eneral P roblem S olver PowerPoint PPT Presentation


  • 100 Views
  • Uploaded on
  • Presentation posted in: General

G eneral P roblem S olver. Monkey and Banana. 2013 Artificial Intelligence Lecture no. 14. G eneral P roblem S olver. 人間の問題解決過程のモデル. 与えられた 知識 → 問題 を解決. 初期 状態 (Initial State) 目的 状態 (target State) オペレータ (operator) 状態 表現 (state representation). 与えられ た 知識 Given Knowledge. など.

Download Presentation

G eneral P roblem S olver

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


G eneral p roblem s olver

GeneralProblemSolver

Monkey and Banana

2013 Artificial Intelligence

Lecture no. 14


G eneral p roblem s olver1

GeneralProblemSolver

  • 人間の問題解決過程のモデル

与えられた知識 → 問題を解決

  • 初期状態(Initial State)

  • 目的状態(target State)

  • オペレータ(operator)

  • 状態表現(state representation)

与えられた知識

Given Knowledge

など


Monkey and banana

Monkeyand Banana

How the monkey gets banana?

Needs to climb up on the box


State representaiton

状態表現(State Representaiton)


I nitial state target state

初期状態(initial state),目的状態(target state)

AT(monkey, a)

AT(box, b)

EMPTY

HOLD

(monkey holds banana)

Initial State

Target State


Operators

Operators


How to solve the problem

問題解決How to solve the problem?

現在の状態(S)と目的状態(G)を近づける

S → G

S=G:同じ状態

Reduce

difference=G-S


Importance of differences

Importance of Differences

D3 = distance between monkey and banana

Most important

D2= distance between the box and banana

Necessary to solve D3

D1 = distance between monkey and banana

Necessary to solve D2

importance D3 > D2 > D1


Operators to reduce distances

Operators to reduce distances

operators

distances


Gps algorithm

GPS algorithm

LOOP1:if S satisfy then exit(S)

find D=most important difference between G & S

put all the operators to reduce D into oplist

LOOP2:if empty(oplist) then return(null)

operator:=first(oplist),

remove(operator, oplist),

pc := operatorの前提条件,

if not effective(operator) then goto LOOP2 :

give up, if operator fails to reduce d

if (pc = null) then goto APPLY

S1 = GPS(S, pc)

If S1=fail then goto LOOP2

APPLY : S := operator (S1)

goto LOOP1


Gps algorithm solves monkey and banana

GPS algorithm solves“Monkey and Banana”


Introduction

Introduction

AT(monkey, a)

AT(box, b)

EMPTY

HOLD

Monkey gets banana

Initial state S0

Final state G0

GPS(S0 , G0)


Gps s 0 g 0

GPS(S0, G0)

Step 1:

Continue GPS unless S0=G0

Step 2:

Find differences between S0 and G0

D3 = |monkey – banana|

D2 = |box – banana|

D1 = |box – monkey|

D3is most important!


Gps s 0 g 01

GPS(S0, G0)

Step 3

Operator to reduce D3is GRASP

GRASP is put into oplist

Step 4

oplist is not empty

Continue GPS


Gps s 0 g 02

GPS(S0, G0)

Step 5

operator = first(oplist),

first(oplist) is removed from oplist,

pc

GRASP solves D !


Gps s 0 g 03

GPS(S0, G0)

Step 6

Continue to Step 7 if pc exists

(if not, jump to Step 9)

Step 7

GPS(S0, pc)


Gps s 0 g 1

GPS(S0, G1)

Step 1

Continue GPS, unless S0=G1

Step 2

Distances between S0& G1

D2 =|box - banana|

D1 = |monkey – box|

D2is most important


Gps s 0 g 11

GPS(S0, G1)

Step 3

D is solved by MOVEBOX,

Put MOVEBOX into oplist

Step 4

ContinueGPS unless oplist is empty


Gps s 0 g 12

GPS(S0, G1)

Step 5

Substitute prerequisit conditions into pc

AT(box, y), AT(monkey, y)}

where y=b is necessary to solve D2

pc = {AT(box, b), AT(monkey, b)}

Continue,

since MOVEBOX reduces D2


Gps s 0 g 13

GPS(S0, G1)

Step 6

Continue to Step 7 since pc is not empty

(if not, jump to Step9)

Step 7

Run GPS(S0, pc)


Gps s 0 g 2

GPS(S0, G2)

Step 1

Continue GPS unless S0=G2

Step 2

Distance between S0and G2

D1 =|monkey - box|

D1is most important


Gps s 0 g 21

GPS(S0, G2)

Step 3

Find operators to reduce D1すand put them into oplist

GOTO and CLIMB are put into oplist

Step 4

Continue GPS unless oplistis empty


Gps s 0 g 22

GPS(S0, G2)

Step 5

oplist = {CLIMB} , operator =GOTO

Prerequisit conditions of the operator are substituted to pc

pc = (none)

GOTOreduces D1

Step 6

No more pc exist

Jump to Step 9


Gps s 0 g 2 gps s 1 g 2

GPS(S0, G2) → GPS(S1, G2)

Step 9

Apply operator on S0

operator =GOTO(b)

New state S1


Gps s 1 g 2 gps s 1 g 1

GPS(S1, G2) → GPS(S1, G1)

Step 10

Go to Step 1

Step 1

S0=G1

End GPS(S1, G2)

Go back to GPS(S1, G1)


Gps s 1 g 1 gps s 2 g 1

GPS(S1, G1) → GPS(S2, G1)

Step 8

Continue if S1 is not fail

Step 9

Apply operator on S1

operator =MOVEBOX(c)

New state S2


Gps s 2 g 1

GPS(S2, G1)

Step10

Go to Step1

Step 1

Continue GPS unless S0=G1

Step 2

Difference between S2and G1

D1 =|monkey – box|

D1is most important


Gps s 2 g 11

GPS(S2, G1)

Step3

Operators to solve D1 are GOTO and CLIMB

Add GOTO and CLIMB to oplist

Step 4

Continue GPS unless oplist is empty


Gps s 2 g 12

GPS(S2, G1)

Step5

oplist = {CLIMB} , operator = GOTO

Substitute prerequisite conditions to pc

pc = (none)

Go to Step 4, since

No operator can reduce D1


Gps s 2 g 13

GPS(S2, G1)

Step 5

oplist = {} , operator =CLIMB

Substitute prerequisite conditions of operators into pc

AT(box, y), AT(monkey, y)}

where y=c reduces D1

pc= {AT(box, c), AT(monkey, c)}

Continue since

CLIMB reduces D1


Gps s 2 g 14

GPS(S2, G1)

Step 6

Continue since pc exists

Step 7

Run GPS(S2, pc)


Gps s 2 g 3 gps s 2 g 1

GPS(S2, G3) → GPS(S2, G1)

Step1

S2=G3

GPS ends.

Go upwards


Gps s 2 g 1 gps s 3 g 1

GPS(S2, G1) → GPS(S3, G1)

Step 8

Continue since S2 is not fail

Step 9

Apply operator on S1

operator =CLIMB

New state S3


Gps s 3 g 1 gps s 3 g 0

GPS(S3, G1) → GPS(S3, G0)

Step 10

Go to Step 1

Step 1

S3=G1

Finish GPS

Go upwards.


Gps s 3 g 0 gps s 4 g 0

GPS(S3, G0) → GPS(S4, G0)

Step8

Continue since S2is not fail

Step 9

Apply operator on S1

operator =DRASP

New state S4


Gps s 4 g 0

GPS(S4, G0)

Step10

Go to Step 1

Step 1

S4=G0

Finish GPS

End


  • Login