Russell and Norvig, Chapter 3: Solving Problems by Searching 3.1 Problem-Solving Agents [Fig3.1] - update state - formulate goal - e.g., get gold, get home - formulate problem - actions, states, initial/goal states - search -> action sequence - return action 3.2 Formulating Problems - problem types - single state - accessible world - agent always knows what one state it is in - multiple state - inaccessible world - agent knows which set of states it can be in - contingency - action depends on what is found to be true - exploration - no knowledge of states or actions - experimentation - problem definition (multi-state) - initial state (set of states) - operators (determine set of states reachable) - goal test (satisfied by every state in the set) - path cost function - measuring problem-solving performance - correctness - search cost = time/memory to find solution - total cost = path cost + search cost 3.3 Example Problems - toy problems - 8 puzzle - 8 queens - cryptarithmetic - vacuum world - missionaries and cannibals - real world problems - route finding - touring and travelling salesperson problems - VLSI layout - robot navigation - assembly sequencing 3.4 Searching for Solutions - search tree - select node on frontier (search strategy) - if not goal, expand node 3.5 Search Strategies - breadth-first search - uniform-cost search - select node with least path cost so far - costs = 1 --> breadth-first - depth-first search - depth-limited search - how to choose depth limit - iterative-deepening search - for d = 0 to inf {depth-limit-search(d)} - most nodes at last level, so repeating previous levels not bad - bidirectional search - how to reverse operators - how to detect a connection - remember frontier (expensive) - performance comparison [Fig3.18] 3.6 Avoiding Repeated States - do not return to your parent state - do not return to an ancestor state - do not return to any previously-visited state - b^d memory - hash function to speed access 3.7 Constraint Satisfaction Search - state = assignment to a set of variables - goal test = constraints on variable values - depth-first search - solution depth = number of variables - operators consist of assigning possible values to one variable - big branching factor - backtracking search - apply tests after each assignment, rather than after all variables assigned - forward checking - as variables are assigned values, removes conflicting values from the domains of unassigned variables - reduces branching factor - backtracking occurs earlier - arc consistency and constraint propagation - continually remove values from domains inconsistent with constraints