Chapter 3
From initial state to goal
state through appropriate sequence of moves or actions
such
as filling and emptying
the containers.
Then (x,y) - problem state
represented by an ordered pair.
The set of all ordered pairs
is the space of problem states or the state-space of the
problem .
State-space : { (x,y)
| x = 0,1,2,3,4 y=0,1,2,3 }
Data structure to represent
the state-space can be
initial state (0,0)
goal state (2,y) where y = any possible number.
Moves transform from one state into another
state.
Operators determine the moves.
Operators for the problem state-space :
3.1.1 Control or Search Strategy :
Selecting rules; keeping track of those
sequences of rules that have already been tried and the states
produced by them.
Goal state provides a basis for the termination of the problem solving task.
1- PATTERN MATCHING STAGE
Execution of a rule requires a match.
preconditions
match
content of
of a rule
<=====> the working
memory.
when match is found => rule is applicable
several rules may be applicable
2- CONFLICT RESOLUTION (SELECTION STRATEGY ) STAGE
Selecting one rule to execute;
3- ACTION STAGE
Applying the action part of the rule => changing the content
of the workspace
=>new patterns,new matches => new set of rules eligible for
execution
Recognize -act control cycle
1. Content of workspace => candidate rules for execution
(search strategy )
2. Each rule surveys the entire workspace
3. A rule activates itself when its condition matches
the content of the workspace
Adv : Adding, deleting, revising rules without disturbing the rest of the system.
Water Container Problem
PRODUCTION RULES
FACTS IN WORKING MEMORY
IF (x<4) THEN FILL x
(4,y)
IF (y<3) THEN FILL y
(x,3)
IF (x>0) THEN EMPTY x
(0,y)
IF (y>0) THEN EMPTY y
(x,0)
IF (x+y>=4 AND y>0) THEN FILL x FROM y
(4,y-(4-x))
IF (x+y>=3 AND x>0) THEN FILL y FROM x
(x-(3-y),3)
IF (x+y<=4 AND y>0) THEN FILL x FROM y
(x+y,0)
IF (x+y<=3 AND x>0) THEN FILL y FROM x
(0,x+y)
PRODUCTION SYSTEM
no information is available to judge that one rule is better than the rest of the applicable rules
=>systematic search of the state-space is necessary for finding a solution.
=>no information which action is better than the others
=>no information on the progress towards solutio
blind search (exhaustive search) is being done.
when number of states is high it is not an efficient method.
3.1.3 Standard Terminology
State j is an immediate successor of state i.
State i is a successor of state k.
All states that can be reached from initila state are search space.
Each intermediate state generates an exhaustive set of successors.
Exhaustive search leading to combinational explosion .To prevent combinational explosion, information at each intermediate state to identify which immediate successor is most promising.
Blind search,exhaustive search,uninformed search mean the same thing.
open node : node that has not yet been examined for possible expansion
closed node : node that has already been examined and expanded.
search technique =>the order in which the open nodes are to be expanded.
Partial Search Graph for Water Container Problem
Search proceeding in the parent-to children direction untill
forced to backtrack.(stopping search in one direction, going back to the
previous node and expand in a new direction. )
Open nodes are ordered in descending order of their depth
in a search tree(deepest node at the front of the list ).
Such structure is stack data structure(LIFO).
3.3.3 Heuristic Search:
Uninformed search eventually finds a solution to the problem
but, with large problem spaces these methods are not feasible due to the
problem of combinational explosion.
A search which uses information about the current
situation to traverse a search tree is called heuristic search.
Organization of the heuristic search :
1) Ordering of successors ( most promising successors are expanded
first ) A* algorithm .
Evaulation function, h , is used which
measures the cost of going from the node to the goal node.Approximation
of h* is used.
g*(i)=g(i)+h*(i) for any
node i.
g*(j)=g(i)+c(i,j)+h*(j) for all
successors, j , of i.
This page is maintained by: | Mehmet R.TOLUN tolun@ceng.metu.edu.tr |
Last updated at: |