580 likes | 611 Views
Search Problems. Russell and Norvig: Chapter 3, Sections 3.1 – 3.3. sensors. environment. ?. agent. actuators. Problem-Solving Agent. sensors. environment. ?. agent. actuators. Actions Initial state Goal test. Problem-Solving Agent. 문제를 어떻게 탐색 문제로. 단순한 탐색 길 찾기 추적하기
E N D
Search Problems Russell and Norvig: Chapter 3, Sections 3.1 – 3.3
sensors environment ? agent actuators Problem-Solving Agent Search Problems
sensors environment ? agent actuators • Actions • Initial state • Goal test Problem-Solving Agent Search Problems
문제를 어떻게 탐색 문제로 • 단순한 탐색 • 길 찾기 • 추적하기 • 규칙 문제를 탐색으로 • If 비교조건 then 행동 또는 결론 • 우선순위 없는 수많은 규칙에서 적합한 것 찾기 • 고차원적 문제 • Meta-knowledge에서 찾기 Search Problems
state space successor function State Space and Successor Function • Actions • Initial state • Goal test Search Problems
state space successor function Initial State • Actions • Initial state • Goal test Search Problems
successor function Goal Test state space • Actions • Initial state • Goal test Search Problems
8 2 1 2 3 3 4 7 4 5 6 5 1 6 7 8 Initial state Goal state Example: 8-puzzle Search Problems
8 2 8 2 7 3 4 7 3 4 5 1 6 5 1 6 8 2 8 2 3 4 7 3 4 7 5 1 6 5 1 6 Example: 8-puzzle Search Problems
0.18 sec 6 days 12 billion years 10 millions states/sec Example: 8-puzzle Size of the state space = 9!/2 = 181,440 15-puzzle .65 x1012 24-puzzle .5 x 1025 Search Problems
Search Problem • State space • Initial state • Successor function • Goal test • Path cost Search Problems
Search Problem • State space • each state is an abstract representation of the environment • the state space is discrete • Initial state • Successor function • Goal test • Path cost Search Problems
Search Problem • State space • Initial state: • usually the current state • sometimes one or several hypothetical states (“what if …”) • Successor function • Goal test • Path cost Search Problems
Search Problem • State space • Initial state • Successor function: • [state subset of states] • an abstract representation of the possible actions • Goal test • Path cost Search Problems
Search Problem • State space • Initial state • Successor function • Goal test: • usually a condition • sometimes the description of a state • Path cost Search Problems
Search Problem • State space • Initial state • Successor function • Goal test • Path cost: • [path positive number] • usually, path cost = sum of step costs • e.g., number of moves of the empty tile Search Problems
Search of State Space Search Problems
Search of State Space Search Problems
Search State Space Search Problems
Search of State Space Search Problems
Search of State Space Search Problems
Search of State Space search tree Search Problems
Simple Agent Algorithm Problem-Solving-Agent • initial-state sense/read state • goal select/read goal • successor select/read action models • problem (initial-state, goal, successor) • solution search(problem) • perform(solution) Search Problems
Example: 8-queens Place 8 queens in a chessboard so that no two queens are in the same row, column, or diagonal. A solution Not a solution Search Problems
Example: 8-queens • Formulation #1: • States: any arrangement of • 0 to 8 queens on the board • Initial state: 0 queens on the • board • Successor function: add a • queen in any square • Goal test: 8 queens on the • board, none attacked 648 states with 8 queens Search Problems
Example: 8-queens • Formulation #2: • States: any arrangement of • k = 0 to 8 queens in the k • leftmost columns with none • attacked • Initial state: 0 queens on the • board • Successor function: add a • queen to any square in the leftmost empty column such that it is not attacked • by any other queen • Goal test: 8 queens on the • board 2,067 states Search Problems
실제 n-queen 문제 • Neural, Genetic 또는 Heuristic 방법으로 잘 해결 • 최악의 경우에는 처리 불가능 • 실제 n이 커지면 답이 매우 많으므로 간단한 Heuristics로도 답을 쉽게 찾음 • 따라서 n이 커도 답을 잘 찾는다고 해서 인공지능 접근방법이 문제를 해결한다는 증거는 아님 • 그러나 많은 실제 문제는 알고리즘에서 이야기하는 최악의 경우로는 잘 가지 않음 • 더구나 대부분 우리가 원하는 답은 최적이 아니라 실제 활용해서 도움이 되는, feasible solution을 원하므로 인공지능 기법이 효과적으로 이용될 수 있음 Search Problems
Example: Robot navigation What is the state space? Search Problems
Cost of one horizontal/vertical step = 1 Cost of one diagonal step = 2 Example: Robot navigation Search Problems
Example: Robot navigation Search Problems
Example: Robot navigation Search Problems
Example: Robot navigation Cost of one step = ??? Search Problems
Example: Robot navigation Search Problems
Example: Robot navigation Search Problems
Cost of one step: length of segment Example: Robot navigation Search Problems
Example: Robot navigation Search Problems
Complex function: it must find if a collision-free merging motion exists • Successor function: • Merge two subassemblies Example: Assembly Planning Initial state Goal state Search Problems
Example: Assembly Planning Search Problems
Example: Assembly Planning Search Problems
Assumptions in Basic Search • The environment is static • The environment is discretizable • The environment is observable • The actions are deterministic open-loop solution Search Problems
Search Problem Formulation • Real-world environment Abstraction Search Problems
Search Problem Formulation • Real-world environment Abstraction • Validity: • Can the solution be executed? Search Problems
Search Problem Formulation • Real-world environment Abstraction • Validity: • Can the solution be executed? • Does the state space contain the solution? Search Problems
Search Problem Formulation • Real-world environment Abstraction • Validity: • Can the solution be executed? • Does the state space contain the solution? • Usefulness • Is the abstract problem easier than the real-world problem? Search Problems
Search Problem Formulation • Real-world environment Abstraction • Validity: • Can the solution be executed? • Does the state space contain the solution? • Usefulness • Is the abstract problem easier than the real-world problem? • Without abstraction an agent would be swamped by the real world Search Problems
Search Problem Variants • One or several initial states • One or several goal states • The solution is the path or a goal node • In the 8-puzzle problem, it is the path to a goal node • In the 8-queen problem, it is a goal node Search Problems