Solving problems by searching Chapter 3 Modified by Vali Derhami.

Slides:



Advertisements
Similar presentations
Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
Advertisements

INTRODUÇÃO AOS SISTEMAS INTELIGENTES
Additional Topics ARTIFICIAL INTELLIGENCE
Solving problems by searching
Announcements Course TA: Danny Kumar
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
1 Solving problems by searching Chapter 3. 2 Why Search? To achieve goals or to maximize our utility we need to predict what the result of our actions.
Artificial Intelligence Problem Solving Eriq Muhammad Adams
May 12, 2013Problem Solving - Search Symbolic AI: Problem Solving E. Trentin, DIISM.
1 Chapter 3 Solving Problems by Searching. 2 Outline Problem-solving agentsProblem-solving agents Problem typesProblem types Problem formulationProblem.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
Artificial Intelligence Spring 2009
PSU CS 370 – Artificial Intelligence Dr. Mohamed Tounsi Artificial Intelligence 3. Solving Problems By Searching.
Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
Artificial Intelligence for Games Uninformed search Patrick Olivier
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
EIE426-AICV 1 Blind and Informed Search Methods Filename: eie426-search-methods-0809.ppt.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
1 Solving problems by searching Chapter 3. 2 Why Search? To achieve goals or to maximize our utility we need to predict what the result of our actions.
CHAPTER 3 CMPT Blind Search 1 Search and Sequential Action.
An Introduction to Artificial Intelligence Lecture 3: Solving Problems by Sorting Ramin Halavati In which we look at how an agent.
Problem Solving and Search in AI Part I Search and Intelligence Search is one of the most powerful approaches to problem solving in AI Search is a universal.
CS 380: Artificial Intelligence Lecture #3 William Regli.
Problem Solving What is AI way of solving problem?
1 Solving problems by searching Chapter 3. 2 Why Search? To achieve goals or to maximize our utility we need to predict what the result of our actions.
Solving problems by searching
1 Solving problems by searching Chapter 3. 2 Why Search? To achieve goals or to maximize our utility we need to predict what the result of our actions.
Solving problems by searching This Lecture Read Chapters 3.1 to 3.4 Next Lecture Read Chapter 3.5 to 3.7 (Please read lecture topic material before and.
1 Solving problems by searching This Lecture Chapters 3.1 to 3.4 Next Lecture Chapter 3.5 to 3.7 (Please read lecture topic material before and after each.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
Carla P. Gomes CS4700 CS 4700: Foundations of Artificial Intelligence Prof. Carla P. Gomes Module: Search I (Reading R&N: Chapter.
مرتضي صاحب الزماني 1 Basic Graph Algorithms. مرتضي صاحب الزماني 2 Graph Data Structures Adjacency Matrix [©Bazargan]
1 Solving problems by searching 171, Class 2 Chapter 3.
An Introduction to Artificial Intelligence Lecture 3: Solving Problems by Sorting Ramin Halavati In which we look at how an agent.
SOLVING PROBLEMS BY SEARCHING Chapter 3 August 2008 Blind Search 1.
A General Introduction to Artificial Intelligence.
Problem Solving Agents
Solving problems by searching 1. Outline Problem formulation Example problems Basic search algorithms 2.
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 3 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
Pengantar Kecerdasan Buatan
Problem Solving by Searching
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Ch. 3 –Problem Solving Agents State space search –Programming Assignment Thursday.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Problem Solving Methods – Lecture 7 Prof. Dieter Fensel (&
Solving problems by searching A I C h a p t e r 3.
1/19 Informed search algorithms Chapter 4 Modified by Vali Derhami.
1/27 Informed search algorithms Chapter 4 Modified by Vali Derhami.
Solving problems by searching Chapter 3, part 2 Modified by Vali Derhami.
1 Solving problems by searching Chapter 3. 2 Outline Problem types Example problems Assumptions in Basic Search State Implementation Tree search Example.
Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008.
WEEK 5 LECTURE -A- 23/02/2012 lec 5a CSC 102 by Asma Tabouk Introduction 1 CSC AI Basic Search Strategies.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Solving problems by searching Chapter 3. Types of agents Reflex agent Consider how the world IS Choose action based on current percept Do not consider.
Solving problems by searching
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
ECE 448 Lecture 4: Search Intro
Problem Solving as Search
Artificial Intelligence
Solving problems by searching
Solving problems by searching
Artificial Intelligence
Solving problems by searching
Solving problems by searching
Solving problems by searching
Solving Problems by Searching
Solving Problems by Searching
Solving problems by searching
Presentation transcript:

Solving problems by searching Chapter 3 Modified by Vali Derhami

2/20 Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms

3/20 عاملهاي حل مساله  عاملهاي حل مساله با پيدا كردن رشته هايي از اقدامات كه به حالتهاي مطلوب منجر مي شوند تصميم ميگرند كه چه عملي را انجام دهند.  عامل مذكور هدف گرا است.  اين روش حل offline (برون خط) است.  حل بر خط (online) شامل عمل كردن بدون دانش كاملي از مساله و پاسخ آن مي باشد.  مراحل انجام كار: 1-تعيين هدف Goal formulation مجموعه اي از حالتها كه كه هدف در آنها برآورده مي شود. 2-تعريف مساله Problem formulation 3-جستجو در فضاي حالت Search پيدا كردن توالي هاي مختلف ممكن از اقدامات كه به حالتهايي با مقادير معلوم منجر مي شوند و انتخاب بهترين آنها. 4- اجراي راه حل Execution

4/20 Example: Romania On holiday in Romania; currently in Arad. Flight leaves tomorrow from Bucharest Agent has to be Bucharest on tomorrow Formulate goal: be in Bucharest Formulate problem: states: various cities, initial state (Arad) actions: drive between cities Find solution: sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest

5/20 Example: Romania

6/20 Problem-solving agents ابتدا هدف بر اساس ادراك مشاهده شده تدوين، بعد مساله تدوين مي شود. آنگاه جستجو براي سلسله اقداماتي كه به هدف منجر ميشود و بعد انتخاب بهترين سلسله اقدامات و اجراي آن.

7/20 Discussion about Environment Static: تدوين و حل مساله بدون توجه به تغييراتي كه ممكن است در محيط رخ دهد صورت گرفته Deterministic fully observable  single-state problem Agent knows exactly which state it will be in; solution is a sequence Discrete: Open loop: انجام عملها بدون توجه به ادراكات

8/20 Single-state problem formulation A problem is defined by four items: 1. initial state e.g., "at Arad" In (Arad) 2. actions or successor function S(x) = set of action–state pairs هر تابع پسين يك حالت را گرفته و يك مجموعه از زوجهاي مرتب (پسين،اقدام)را بر مي گرداند كه هر اقدام يكي از اقدامهاي ممكن در حالت فعلي و پسين حالتي است كه پس از آن اقدام محيط به آن حالت مي رود. e.g., S(Arad) = {, … } حالت ابتدايي و تابع پسين بهمراه يكديگر بطور ضمني فضای حالت مساله را تعريف ميكنند.

9/20 Single-state problem formulation (Cont.) 3. goal test, determines whether a given state is a goal state. can be explicit, e.g., x = "at Bucharest“ مجموعه شمارش پذيري از حالات. implicit, e.g., Checkmate(x) يك ويژگي مجرد 4. path cost (additive): assigns a numeric cost to each path e.g., sum of distances, number of actions executed, etc. c(x,a,y) is the step cost, assumed to be ≥ 0 A solution is a sequence of actions leading from the initial state to a goal state

10/20 Selecting a state space Real world is absurdly complex  state space must be abstracted for problem solving (Abstract) state = set of real states بسياري از جنبه هاي دنياي واقعي از قلم مي افتند چرا كه نسبت به هدف بي ارتباط هستند (Abstract) action = complex combination of real actions e.g., "Arad  Zerind" represents a complex set of possible routes, detours, rest stops, etc. تجريد: فرايند حذف جزييات از يك بازنمايي را گويند For guaranteed realizability, any real state "in Arad“ must get to some real state "in Zerind" (Abstract) solution = set of real paths that are solutions in the real world Each abstract action should be "easier" than the original problem

11/20 Vacuum world state space graph states? integer dirt and robot location actions? Left, Right, Suck goal test? no dirt at all locations path cost? 1 per action

12/20 Example: The 8-puzzle states? actions? goal test? path cost?

13/20 Example: The 8-puzzle states? locations of tiles actions? move blank left, right, up, down goal test? = goal state (given) path cost? 1 per move [Note: optimal solution of n-Puzzle family is NP-hard]

14/20 Example: robotic assembly states?: real-valued coordinates of robot joint angles parts of the object to be assembled actions?: continuous motions of robot joints goal test?: complete assembly path cost?: time to execute

15/20 Tree search example درخت جستجو با استفاده از حالت ابتدايي و تابع پيسين ايجاد ميشود. زماني كه يك حالت از چند مسير قابل دسترسي باشد بجاي درخت گراف جستجو داريم.

16/20 Tree search example

17/20 Tree search example

18/20 Tree search algorithms Basic idea: offline, simulated exploration of state space by generating successors of already-explored states (a.k.a.~expanding states)

19/20 گره ها ساختار داده اي با پنج جز: 1- حالت: حالت متناظر با گره 2- گره والد: گره توليد كنندهِ گره مذكور از درخت جستجو 3- اقدام: اقدام اعمال شده بر گره والد براي توليد گره مذكور 4- هزينه مسير: هزينه مسير ازحالت اوليه تا گره مذكور، g(n) 5- عمق: تعداد گامهاي مسير از حالت اوليه

20/20 Implementation: states vs. nodes A state is a (representation of) a physical configuration A node is a data structure constituting part of a search tree includes state, parent node, action, path cost g(x), depth The Expand function creates new nodes, filling in the various fields and using the SuccessorFn of the problem to create the corresponding states. لبه (Fringe): گره هاي توليد شده ولي گسترش نيافته. هر عنصر لبه، گره برگي (Leaf Node) ناميده ميشود.