1.05k likes | 1.09k Views
Artificial Intelligence. Problem Solving and Search. Dae-Won Kim. School of Computer Science & Engineering Chung-Ang University. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms. Problem-Solving Agents. On holiday In Romania;
E N D
Artificial Intelligence Problem Solving and Search Dae-Won Kim School of Computer Science & Engineering Chung-Ang University
Outline • Problem-solving agents • Problem types • Problem formulation • Example problems • Basic search algorithms
On holiday In Romania; currently in Arad. Flight leaves tomorrow for Bucharest.
Input, Output, Solution: ??? Performance measure: ???
Problem formulation: states – various cities actions – drive between cities
Problem Formulation: How To vs. Problem Modeling
A problem is defined by four items: • Initial state • Successor function: • set of action-state pairs • Goal test • Path cost (performance measure)
A solution is a sequence of actions leading from the initial state to a goal state. Consider a solution in algorithm
Initial state: • Successor function: sequence • Goal test: • Path cost: performance measure
Initial state: x = “at Arad” • Successor function: • S = {<AradZerind,Zerind>, …} • Goal test: x = “at Bucharest” • Path cost: sum of distances
States: • Actions: • Goal test: • Path cost:
States: integer dirt and robot locations • Actions: left, right, suck, stay • Goal test: no dirt • Path cost: 1 per action (performance measure)
States: • Actions: • Goal test: • Path cost:
States: real-valued coordinates of joint angles • Actions: continuous motions of robot joints • Goal test: complete assembly • Path cost: time to execute
States ? • Actions ? • Goal test ? • Path cost ?
How to achieve the goal state through the complex state space from the initial state? How to solve problems?
Idea: exploration of state space by generating successors of already-explored states (expanding states)
A state is a conceptual representation of a physical configuration A node is data structure constituting part of a search tree includes parents, children, depth, path cost.
A search strategy is defined by picking the order of node expansion.
Strategies are evaluated along the following dimensions: • Completeness • Time complexity • Space complexity • Optimality
Uninformed search strategies use only the information available in the problem definition. • Breadth-first search • Uniform-cost search • Depth-first search • Depth-limited search • Iterative deepening search
Expand shallowest unexpanded node. Implementation: FIFO queue
Complete? • Time complexity? • Space complexity? • Optimal?
Complete? Yes (if b is finite) • Time complexity? O(bd+1) • Space complexity? O(bd+1) • Optimal? Yes (if cost = 1 per step)
Uniform-Cost Search Expand least-cost unexpanded node using queue ordered by path cost Equivalent to BFS if step costs equal.
Expand deepest unexpanded node. Implementation: LIFO queue
Complete? • Time complexity? • Space complexity? • Optimal?
Complete? No (infinite-depth, loops) • Time complexity? O(bm) • Space complexity? O(bm) • Optimal? No
Depth-Limited Search = DFS with depth limit (L). i.e., nodes at depth (L) have no successors