State Space Representa ons and Search Algorithms
CS171, Fall 2016 Introduc on to Ar ficial Intelligence Prof. Alexander Ihler
Reading: R&N 3.1-3.4 Architectures for Intelligence • Search? – Determine how to achieve some goal; “what to do”
• Logic & inference? – Reason about what to do – Encode knowledge / “expert” systems – Know what to do
• Learning? – Learn what to do
• Modern view: complex & mul -faceted Search • Formulate “what to do” as a search problem – Solu on tells the agent what to do
• If no solu on in the current search space? – Find space that does contain a solu on (use search!) – Solve original problem in new search space
• Many powerful extensions to these ideas – Constraint sa sfac on; planning; game playing; …
• Human problem-solving o en looks like search Why search? • Engaged in bigger, important problem – Hit a search subproblem we need to solve – Search, solve it, get back to original problem
• Predict the results of our ac ons in the future
• Many sequences of ac ons, each with some u lity – Maximize performance measure
• Want to achieve some goal by some (any?) means • Or, find the best (op mal) way to achieve it Example: Romania • On holiday in Romania – Currently in Arad – Flight leaves tomorrow from Bucharest
• Formulate goal: – Be in Bucharest
• Formulate problem: – States: various ci es – Ac ons: drive between ci es / choose next city
• Find a solu on: – Sequence of ci es, e.g.: Arad, Sibiu, Fagaras, Bucharest Example: Romania
Oradea
71 Neamt
87 75 Zerind 151 Iasi 140 92 Arad Sibiu Fagaras 99 118 Vaslui Timisoara 80 Rimnicu Vilcea
97 211 142 111 Pitesti Lugoj 70 98 146 Hirsova Mehadia 85 101 Urziceni 86 75 138 Bucharest 120 Dobreta 90 Cralova Eforie Giurgiu Problem types Classifying the environment:
• Sta c / Dynamic Previous problem was sta c: no a en on to changes in environment
• Determinis c / Stochas c Previous problem was determinis c: no new percepts were necessary, we can predict the future perfectly
• Observable / Par ally Observable / Unobservable Previous problem was observable: it knew the ini al state, &c
• Discrete / Con nuous Previous problem was discrete: we can enumerate all possibili es Why not Dijkstra’s Algorithm? • D’s algorithm inputs the en re graph – Want to search in unknown spaces – Combine search with “explora on” – Ex: autonomous rover on Mars must search an unknown space
• D’s algorithm takes connec ons as given – Want to search based on agent’s ac ons, w/ unknown connec ons – Ex: web crawler may not know what connec ons are available on a URL before visi ng it – Ex: agent may not know the result of an ac on before trying it
• D’s algorithm won’t work on infinite spaces – Many ac ons spaces are infinite or effec vely infinite – Ex: logical reasoning space is infinite – Ex: real world is essen