180 likes | 192 Views
Learn about uninformed search strategies like Breadth-first, Depth-first, Uniform-cost, and Iterative Deepening to solve problems efficiently in artificial intelligence. Understand key properties and comparisons, and apply these algorithms to practical activities.
E N D
Uninformed Search Strategies • Uninformed strategies use only information available in the problem definition • Breadth-first search • Uniform-cost search • Depth-first search • Depth-limited search • Iterative deepening search
Iterative Deepening Search l = 0 • Limit = 0
Iterative Deepening Search l = 1 • Limit = 1
Iterative Deepening Search l = 2 • Limit = 2
Iterative Deepening Search l = 3 • Limit = 3
Properties of Iterative Deepening Search • Complete?? Yes • Time?? (d+1)b0 + db1 + (d-1)b2 + … + bd = O(bd) • Space?? O(bd) • Optimal?? Yes, if step cost = 1Can be modified to explore uniform-cost treeNumerical comparison for b=10 and d=5, solution at far right:N(IDS) = 50 + 400 + 3,000 + 20,000 + 100,000 = 123,450N(BFS) = 10 + 100 + 1,000 + 10,000 + 100,000 + 999,990 = 1,111,100
Activity • Consider a state space where the start state is number 1 and the successor function for state n returns two states, numbers 2n and 2n+1. • Suppose the goal state is 11. • List the order in which nodes will be visited in depth limited search with limit 4
Solution • Depth Limited, l=4 • 1, 2, 4, 8, 16, 17, 9, 18, 19, 5, 10, 20, 21, 11
Activity • Consider a state space where the start state is number 1 and the successor function for state n returns two states, numbers 2n and 2n+1. • Suppose the goal state is 11. • List the order in which nodes will be visited using iterative deepening.
Solution • Iterative Deepening • 1, 1, 2, 3, 1, 2, 4, 5, 3, 6, 7, 1, 2, 4, 8, 9, 5, 10, 11
Let’s Try Another • Breadth First • Depth First • Uniform Cost • Iterative Deepening
PA #1 • Twiddle • Convert the 3x3 board from 9 "randomly placed" numbers to an ordered solution…
PA#1 • You can play a version online at: http://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/twiddle.html • http://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/twiddle.html#3x3n2:9,5,7,2,3,1,8,4,6
PA #1 • READ the specific requirements • Should use Python, Java, or get a language approved by me first. • Should print an optimal path, the number of nodes considered so far, and the number of nodes in memory at the end. • Should return the optimal path • Must follow naming conventions listed in assignment. (File named HW1, method named search)