Presentation is loading. Please wait.

Presentation is loading. Please wait.

Search Model 2 Using a tree we don’t need to keep information about previous states in the search control, rather this data is kept in the search model.

Similar presentations


Presentation on theme: "Search Model 2 Using a tree we don’t need to keep information about previous states in the search control, rather this data is kept in the search model."— Presentation transcript:

1 Search Model 2 Using a tree we don’t need to keep information about previous states in the search control, rather this data is kept in the search model itself Tyson Kendon © 2007

2 Search Model 2 s0= (0,-) (1, 2, 3, 4, 5, 6, 7, 8) (1,1)
Tyson Kendon © 2007

3 Search Model 2  (0,-) (1, 2, 3, 4, 5, 6, 7, 8) (1,1) (7,d) (0,-)
(1,u) (0,-) (1, 2, 3, 4, 5, 6, 8) (1,2) (2, 3, 4, 5, 6, 7, 8) (1,2) (3,r) (0,-) (6r,-) (0,-) (1, 2, 4, 5, 6, 7, 8) (1,2) (1, 2, 3, 4, 5, 7, 8) (1,2) Tyson Kendon © 2007

4 Search Model 2   Tyson Kendon © 2007 (0,-) (1, 2, 3, 4, 5, 6, 7, 8)
(1,1) (7,u) (0,-) (1,u) (0,-) (1, 2, 3, 4, 5, 6, 8) (1,2) (2, 3, 4, 5, 6, 7, 8) (1,2) (3,r) (0,-) (6,r) (0,-) (1,u) (4,u) (0,-) (1, 2, 4, 5, 6, 7, 8) (1,2) (1, 2, 3, 4, 5, 7, 8) (1,2) (1, 2, 3, 5, 7, 8) (2,1) Tyson Kendon © 2007

5 Search Model 2    Tyson Kendon © 2007 (0,-)
(1, 2, 3, 4, 5, 6, 7, 8) (1,1) (7,u) (0,-) (1,u) (0,-) (1, 2, 3, 4, 5, 6, 8) (1,2) (2, 3, 4, 5, 6, 7, 8) (1,2) (3,r) (0,-) (6,r) (0,-) (1,u) (4,u) (0,-) (1, 2, 4, 5, 6, 7, 8) (1,2) (1, 2, 3, 4, 5, 7, 8) (1,2) (2, 3, 5, 6, 7, 8) (2,1) (1,u) (4,u) (0,-) (6,d) Tyson Kendon © 2007 (2, 3, 5, 7, 8) (1,3)

6 Search Model 2    Tyson Kendon © 2007 (1,u) (0,-)
(2, 3, 4, 5, 6, 7, 8) (1,2) (1,u) (4,u) (0,-) (2, 3, 5, 6, 7, 8) (2,1) (1,u) (4,u) (0,-) (6,d) (2, 3, 5, 7, 8) (1,3) (1,u) (4,u) (8,u) (0,-) (6,d) Tyson Kendon © 2007 (2, 3, 5, 7) (2,2)

7 Search Model 2    Tyson Kendon © 2007 (1,u) (4,u) (0,-)
(2, 3, 5, 6, 7, 8) (2,1) (1,u) (4,u) (0,-) (6,d) (2, 3, 5, 7, 8) (1,3) (1,u) (4,u) (8,u) (0,-) (6,d) (2, 3, 5, 7) (2,2) (1,u) (4,u) (8,u) (0,-) (6,d) (5,d) Tyson Kendon © 2007 (2, 3, 7) (1,4)

8 Search Model 2    Tyson Kendon © 2007 (1,u) (4,u) (0,-) (6,d)
(2, 3, 5, 7, 8) (1,3) (1,u) (4,u) (8,u) (0,-) (6,d) (2, 3, 5, 7) (2,2) (1,u) (4,u) (8,u) (0,-) (6,d) (5,d) (2, 3, 7) (1,4) (1,u) (4,u) (8,u) (3,u) (6,d) (5,d) (0,-) Tyson Kendon © 2007 (2, 7) (2,3)

9 Search Model 2    Tyson Kendon © 2007 (1,u) (4,u) (8,u) (0,-) (6,d)
(2, 3, 5, 7) (2,2) (1,u) (4,u) (8,u) (0,-) (6,d) (5,d) (2, 3, 7) (1,4) (1,u) (4,u) (8,u) (3,u) (6,d) (5,d) (0,-) (2, 7) (2,3) (1,u) (4,u) (8,u) (3,u) (6,d) (5,d) (2,d) (0,-) Tyson Kendon © 2007 (7) (2,4)

10 Search Model 2    Tyson Kendon © 2007 (1,u) (4,u) (8,u) (0,-) (6,d)
(2, 3, 7) (1,4) (1,u) (4,u) (8,u) (3,u) (6,d) (5,d) (0,-) (2, 7) (2,3) (1,u) (4,u) (8,u) (3,u) (6,d) (5,d) (2,d) (0,-) (7) (2,4) (1,u) (4,u) (8,u) (3,u) (6,d) (5,d) (2,d) (7,d) Tyson Kendon © 2007 () (-,-)

11 Tyson Kendon © 2007

12 Search Model 2 Gpuzzle2(s9) = yes, since s9 has a node where Rest is empty This search control worked very well for the problem example, on another example it may have generated many more nodes, vice versa another control might have been less efficient on this example Tyson Kendon © 2007

13 Notes Change a node to FAIL if you cannot extend the matrix to any successors Tyson Kendon © 2007

14 Notes  Tyson Kendon © 2007 (0,-) (1, 2, 3, 4, 5, 6, 7, 8) (1,1) (7,u)
(1, 2, 3, 4, 5, 6, 8) (1,2) (1,u) (0,-) (3,r) (0,-) (6,r) (0,-) (2, 3, 4, 5, 6, 7, 8) (1,2) (1, 2, 4, 5, 6, 7, 8) (1,2) (1, 2, 3, 4, 5, 7, 8) (1,2) Tyson Kendon © 2007

15 Notes (-,-) FAIL   Tyson Kendon © 2007 (0,-)
(1, 2, 3, 4, 5, 6, 7, 8) (1,1) (7,u) (0,-) (1, 2, 3, 4, 5, 6, 8) (1,2) (1,u) (0,-) (6,r) (0,-) (-,-) FAIL (2, 3, 4, 5, 6, 7, 8) (1,2) (1, 2, 3, 4, 5, 7, 8) (1,2) Tyson Kendon © 2007


Download ppt "Search Model 2 Using a tree we don’t need to keep information about previous states in the search control, rather this data is kept in the search model."

Similar presentations


Ads by Google