Presentation is loading. Please wait.

Presentation is loading. Please wait.

Homework 0 This homework will NOT normally be graded or turned in, unless you want extra credit. If you do want to hand in your work, you can earn 0.5%

Similar presentations


Presentation on theme: "Homework 0 This homework will NOT normally be graded or turned in, unless you want extra credit. If you do want to hand in your work, you can earn 0.5%"— Presentation transcript:

1 Homework 0 This homework will NOT normally be graded or turned in, unless you want extra credit. If you do want to hand in your work, you can earn 0.5% to 2% extra credit for everyone in your group. Solid work = 0.5% Very good work = 1% Excellent work that I want to show in class = 2% (original or little known problem, interesting observations, beautiful figures, references to books/websites for more info…) Format: Create slides similar to the ones I am using to teach this class. In editable PowerPoint format. Due: Oct 15 th Hand in one paper copy AND email me the slides. You may work in groups of one, two or three. Find a problem, and discuss how you would go about making it into a search problem (as in the water- jug example, or the tangram example below). In particular, what is the initial state, the goal state, the operators. Does the search tree have any special properties? What is the diameter? How would that effect your choice of search algorithm… Your problem could be a real world problem (like container ship loading, or GPS directions). However, if you want to do “puzzles”, then a great source of puzzles are: The works of Henry Dudeney (free books in many formats at http://www.gutenberg.org/ebooks/search/?query=Dudeney+Henry+) http://www.gutenberg.org/files/27635/27635-h/27635-h.htm http://www.gutenberg.org/files/16713/16713-h/16713-h.htm The works of Martin Gardner www.puzzles.com/puzzleplayground/Authors/MartinGardner.htm (Many of his puzzle books are available in the library)

2 Below is a sample, I would grade it at Solid work = 0.5%

3 The Tangram Problem Informal Problem Description: Given these 7 shapes, assemble them into a square.

4 Note that the goal state here is implicit. We can describe it, but we cannot actually draw it out. In general, we don’t know if there is a goal state. As it happens, in this case there is 1 (not counting rotations and reflections). goal state solution At a low level, how do we know if the shapes make up the goal state?

5 The initial state is a “blank” square. We know the size of the square (we can simply sum the areas of the seven shapes)

6 What should the operators be? How about insert(shape_number,x,y,r) ? Bad idea, operators must be atomic… We can use an insertion function that requires: At least one edge of the shape must touch an edge of another shape or the walls of the box. At least one vertex of the shape must coincide with a vertex of another shape or of the box.

7 … … …

8 An idea to reduce the branching factor. Since like the 8-queens problem, the order in which the shapes are inserted does not matter (unlike the 8-puzzle or FWDC) we could randomly label the shapes 1 to 7 and only attempt to insert the i th shape at the i th level 1 2 3 4 5 6 7

9 An BAD idea to reduce the branching factor! Since like the 8-queens problem, the order in which the shapes are inserted does not matter (true for humans, but not for search with the operators I defined) we could randomly label the shapes 1 to 7 and only attempt to insert the i th shape at the i th level 2 1 3 4 5 6 7 Assume this labeling No solution!

10 An good idea to reduce the branching factor. If both 6 and 7 (or 3 and 5) are still available to be inserted, only consider inserting one of them. 1 2 3 4 5 6 7

11 … … … What can we say about the search tree? It is exactly depth 7 Every node at depth 7 is a solution. How does this effect the choice of search algorithm?


Download ppt "Homework 0 This homework will NOT normally be graded or turned in, unless you want extra credit. If you do want to hand in your work, you can earn 0.5%"

Similar presentations


Ads by Google