formulating problems
play

Formulating Problems - PowerPoint PPT Presentation

ProblemSolving Agents Formulating Problems Problem Types


  1. �������� � Problem�Solving Agents ����������������� � Formulating Problems ����������������������� ��������� � Problem Types � Example Problems Problem�Solving Agents, Formulating Problems, Search � Search Strategies Strategies ���������������������������������� ������������������������������������� 03/2 SA�1 ���������������������� ������������������������������ � Goal�based agents Formulation: ���� and ������� Given: ������������� Goal: To reach the specified goal (a state) through the ������������������������� �������� � Search for a suitable action sequence and execute the actions 03/3 03/4

  2. ������������������������ ������������������� � Goal formulation World states with certain properties � Static world � Definition of the state space (important: only the relevant aspects � abstraction) � Observable environment � Definition of the actions that can change the world state � Definition of the problem type, which depends on the � Discrete states knowledge of the world states and actions � states in the search space � Deterministic environment � Specification of the search costs (search costs, offline costs) and the execution costs (path costs, online costs) ���� The type of problem formulation can have a serious influence on the difficulty of finding a solution. 03/5 03/6 !"������������������������� ������������������������������� Given an nxn board from which two diagonally opposite corners have been removed (here 8x8): Question: Can a chess board consisting of n 2 /2 black and n 2 /2�2 white squares be completely covered with dominoes such Goal: Cover the board completely with dominoes, each of that each domino covers one black and one white which covers two neighbouring squares. square? � Goal, state space, actions, search, … … clearly not. 03/7 03/8

  3. ����������������������������#������ ��������%���� � ��������$���� &��'��������������������������� Single�state problem � Complete world state knowledge � World state space: Complete action knowledge 2 positions, dirt or no dirt � The agent always knows its world state � 8 world states Multiple�state problem � � Actions: Incomplete world state knowledge Left (L), Right (R), or Suck (S) Incomplete action knowledge � The agent only knows which group of world states it is � Goal: in no dirt in the rooms Contingency problem � � Path costs: It is impossible to define a complete sequence of actions that constitute a solution in advance because information one unit per action about the intermediary states is unknown. Exploration problem � State space and effects of actions unknown. Difficult! 03/9 03/10 %���#��������������������������� %���#��������������$���������� (���������������� )��������������������� If the environment is completely accessible, the vacuum If the vacuum cleaner always knows where it is and where the dirt is. cleaner has no The solution then is reduced to searching for a path from sensors, it doesn’t the initial state to the goal state. know where it or the dirt is. In spite of this, it can still solve the problem. Here, states are knowledge states. States for the search: The power set of the world states 1�8. States for the search: The world states 1�8. 03/11 03/12

  4. ���������*+, Initial State The state from which the agent infers that it is at the beginning State Space Set of all possible states Actions Description of possible actions and their outcome (successor function) Goal Test Tests whether the state description matches a goal state 03/13 03/14 ���������*-, !"����� �%���.���//�� Path A sequence of actions leading from one state to another. Path Costs Cost function g over paths. Usually the sum of the costs of the actions along the path. States: � Description of the location of each of the eight tiles and (for efficiency) Solution the blank square. Path from an initial to a goal state Initial State: � Initial configuration of the puzzle. Search Costs Actions or Successor function: � Moving the blank left, right, up, or down. Time and storage requirements to find a solution Goal Test: � Does the state match the configuration on the right (or any other Total Costs configuration)? Search costs + path costs Path Costs: � Each step costs 1 unit (path costs corresponds to its length). 03/15 03/16

  5. !"����� �.�0������������� !"����� �.�0������������� Almost a solution: A solution: � States: States: � Any arrangement of 0 to 8 queens on the board. Any arrangement of 0 to 8 queens on the board. � Initial state: Initial state: � No queen on the board. No queen on the board. � Successor function: Successor function: � Add a queen to an empty field on the board. Add a queen to an empty field on the board. � Goal test: Goal test: � 8 queens on the board such that no queen attacks another 8 queens on the board such that no queen attacks another � Path costs: Path costs: � 0 (we are only interested in the solution). 0 (we are only interested in the solution). 03/17 03/18 ������������������������� !"����� �)������������������������� � Naïve formulation Informal problem description: � States: Any arrangement of 0�8 queens � Problem: 64—63 —…— 57 ≈ 10 14 possible states � Three missionaries and three cannibals are on one � Better formulation side of a river that they wish to cross. � States: any arrangement of � queens (0 ≤ � ≤ 8) one � A boat is available that can hold at most two per column in the leftmost � columns such that no queen attacks another. people. � Successor function: add a queen to any square in the � You must never leave a group of missionaries leftmost empty column such that it is not attacked by outnumbered by cannibals on the same bank. any other queen. � Problem: 2,057 states � Sometimes no admissible states can be found. Find an action sequence that brings � everyone safely to the opposite bank. 03/19 03/20

  6. !"����������2����$������������� �������/�������������)1��������� � Route Planning, Shortest Path Problem States: triple (x,y,z) with 0 ≤ x,y,z ≤ 3, where x,y, and Simple in principle (polynomial problem). Complications z represent the number of missionaries, cannibals and arise when path costs are unknown or vary dynamically boats currently on the original bank. (e.g., route planning in Canada) � Travelling Salesperson Problem (TSP) Initial State: (3,3,1) A common prototype for NP�complete problems � VLSI Layout Successor function: from each state, either bring one missionary, one cannibal, two missionaries, two Another NP�complete problem cannibals, or one of each type to the other bank. � Robot Navigation (with high degrees of freedom) Note: not all states are attainable (e.g., (0,0,1)), and Difficulty increases quickly with the number of degrees some are illegal. of freedom. Further possible complications: errors of perception, unknown environments Goal State: (0,0,0) � Assembly Sequencing Planning of the assembly of complex objects (by Path Costs: 1 unit per crossing robots) 03/21 03/22 3������������� ������������������������%��� �������������������������������������������� From the initial state, produce all successive states step State: state in the state space by step � search tree. Parent�Node: Predecessor nodes (a) initial state (3,3,1) Action: The operator that generated the node Depth: number of steps along the path from the initial state (b) after expansion (3,3,1) Path Cost: Cost of the path from the initial state to the node of (3,3,1) ���������������������� (2,3,0) (3,2,0) (2,2,0) (1,3,0)(3,1,0) Make�Queue(Elements): Creates a queue Empty?(Queue): Empty test (c) after expansion (3,3,1) First(Queue): Returns the first element of the queue of (3,2,0) Remove�First(Queue): Returns the first element (2,3,0) (3,2,0) (2,2,0) (1,3,0)(3,1,0) Insert(Element, Queue): Inserts new elements into the queue (various possibilities) (3,3,1) Insert�All(Elements, Queue): Inserts a set of elements into the queue 03/23 03/24

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend