we have 3 jugs with 12,8,3 at the first time the jugs are
(0,0,0)
we can fill them, pour a jug in other jugs and empty jug.
we want to have the only one liter in jugs.
the initial state is: (0,0,0)
the successor function is:
add is: [x,y,z]
fill is: [12,x,y],[x,8,z],[x,y,3]
empty is:
[0,y,z],[x,0,z],[x,y,0]
so i think i have problem with its tree. i want to draw its tree but i'm not sure it is right or not:
the tree is:
(0,0,0)
/ | \
(12,0,0) (0,8,0) (0,0,3)
now the child for(12,0,0)is:
(12,0,0),(12,8,0),(12,8,3),(0,8,3),(0,0,3),(0,0,0),(9,8,3),(12,8,0),(4,8,3),(12,0,3),(12,5,3),(12,5,3),(12,8,0)
fail node is:(12,0,0),(0,0,0)==>because it is in root,(12,8,0)==>cause same,
-----------------------
the child for the node (0,0,3):
(3,0,0),(0,3,0),(0,0,3),(1,1,1)
(1,1,1) is the goal state am i right?
i attached a file that could help to find out about what i want to do?
state tree for 3 water jugs problem
Page 1 of 11 Replies - 796 Views - Last Post: 12 December 2012 - 10:09 PM
Replies To: state tree for 3 water jugs problem
#2
Re: state tree for 3 water jugs problem
Posted 12 December 2012 - 10:09 PM
Closing duplicate topic. Do not open so many.
Page 1 of 1
|
|

New Topic/Question
This topic is locked


MultiQuote







|