[ ARTIFICIAL INTELLIGENCE (C.ENG 303) ]


Chapter 3

PROBLEM SOLVING AND SEARCH

3.1 WATER CONTAINER PROBLEM :   SOLUTION :
 

        From initial state to goal state through appropriate sequence of moves or actions    such
        as filling and emptying the containers.

        Let     x - content of the 4l container
                  y - content of the 3l container

        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

      Problem statement :

                  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 :

    1.   Fill the 4l container
    2.   Fill the 3l container
    3.   Empty the 3l container
    4.   Empty the 3l container
    5.   Pour water from 3l container into 4l conatiner until 4l container is full
    6.   Pour water from 4l container into the 3l container until the 3l container is    full
    7.   Pour all the water from 3l container into the 4l container
    8.   Pour all the water from 4l container into the 3l container
       Preconditions need to be staisfied before an operator can be applied.
       e.g :
 
           # 1 can be applied if there is less than 4l water in the container.
 
        IF there is less than 4l in the 4l container THEN fill the 4l container.
 
       Adding pre-conditions to operators => generation of production rules.
 
      Forwarded form of rule # 1 :
         IF (x,y| x?4) THEN (4,y)
      The forwarded set of production rules : 3.2 HEURISTIC SEARCH (Informed Search) 3.3 UNINFORMED  (BLIND) SEARCH
 
back home forward 

This page is maintained by: 
Mehmet R.TOLUN tolun@ceng.metu.edu.tr 
Last updated at: