פתרון על ידי בעיות חיפוש בינה מלאכותית יעל נצר. סוכנים פותרי בעיות Reflex agents לא יכולים לתכנן קדימה Reflex agents עם מצב פנימי ( מודל עולם ) – קשה.

Slides:



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

Additional Topics ARTIFICIAL INTELLIGENCE
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
January 26, 2003AI: Chapter 3: Solving Problems by Searching 1 Artificial Intelligence Chapter 3: Solving Problems by Searching Michael Scherger Department.
Problem Solving and Search Andrea Danyluk September 9, 2013.
Part2 AI as Representation and Search
Problem Solving Agents A problem solving agent is one which decides what actions and states to consider in completing a goal Examples: Finding the shortest.
CS 480 Lec 3 Sept 11, 09 Goals: Chapter 3 (uninformed search) project # 1 and # 2 Chapter 4 (heuristic search)
Blind Search1 Solving problems by searching Chapter 3.
Search Strategies Reading: Russell’s Chapter 3 1.
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.
Touring problems Start from Arad, visit each city at least once. What is the state-space formulation? Start from Arad, visit each city exactly once. What.
Artificial Intelligence for Games Uninformed search Patrick Olivier
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
חיפוש בינה מלאכותית אבי רוזנפלד. סוכנים פותרי בעיות Reflex agents לא יכולים לתכנן קדימה כדי לחפש, יש צורך לייצר מודל לחפש בו !
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.
CS 380: Artificial Intelligence Lecture #3 William Regli.
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.
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2004.
Artificial Intelligence Chapter 3: Solving Problems by Searching
Introduction to Artificial Intelligence Blind Search Ruth Bergman Fall 2004.
בעיות חיפוש – informed search בינה מלאכותית יעל נצר.
Uninformed Search Reading: Chapter 3 by today, Chapter by Wednesday, 9/12 Homework #2 will be given out on Wednesday DID YOU TURN IN YOUR SURVEY?
Introduction to Artificial Intelligence Blind Search Ruth Bergman Fall 2002.
1 Data Structures, CS, TAU, Perfect Hashing בעיה: נתונה קבוצה S של n מפתחות מתחום U השוואה ל- Hash : * טבלה קבועה (Hash רגיל - דינאמי) * רוצים זמן קבוע.
מודל הלמידה מדוגמאות Learning from Examples קלט: אוסף של דוגמאות פלט: קונסיסטנטי עם פונקציה f ב- C ז"א קונסיסטנטי עם S ז"א מודל הלמידה מדוגמאות Learning.
Markov Decision Processes (MDP) תומר באום Based on ch. 14 in “Probabilistic Robotics” By Thrun et al. ב"הב"ה.
מודל הלמידה מדוגמאות Learning from Examples קלט: אוסף של דוגמאות פלט: קונסיסטנטי עם פונקציה f ב- C ז"א קונסיסטנטי עם S ז"א.
Solving problems by searching
1 Formal Specifications for Complex Systems (236368) Tutorial #3 Z introduction and notation (contd.); Birthday book example (Chapter 1 in the book)
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.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
1 Problem Solving and Searching CS 171/271 (Chapter 3) Some text and images in these slides were drawn from Russel & Norvig’s published material.
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.
Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
Vilalta&Eick:Uninformed Search Problem Solving By Searching Introduction Solutions and Performance Uninformed Search Strategies Avoiding Repeated States/Looping.
1 Solving problems by searching 171, Class 2 Chapter 3.
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
SOLVING PROBLEMS BY SEARCHING Chapter 3 August 2008 Blind Search 1.
A General Introduction to Artificial Intelligence.
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
1 Solving problems by searching Chapter 3. Depth First Search Expand deepest unexpanded node The root is examined first; then the left child of the root;
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
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 as Search. Problem Types Deterministic, fully observable  single-state problem Non-observable  conformant problem Nondeterministic and/or.
Search CSC 358/ Outline  Homework #7  GPS States and operators Issues  Search techniques DFS, BFS Beam search A* search Alpha-beta search.
Problem Solving by Searching
Implementation: General Tree Search
3.5 Informed (Heuristic) Searches This section show how an informed search strategy can find solution more efficiently than uninformed strategy. Best-first.
Solving problems by searching A I C h a p t e r 3.
1 Solving problems by searching Chapter 3. 2 Outline Problem types Example problems Assumptions in Basic Search State Implementation Tree search Example.
Search Part I Introduction Solutions and Performance Uninformed Search Strategies Avoiding Repeated States Partial Information Summary.
Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008.
Search CSC 358/ Outline Homework #6 Game search States and operators Issues Search techniques DFS, BFS Beam search A* search Alpha-beta.
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.
Artificial Intelligence
Solving problems by searching
Artificial Intelligence
Solving problems by searching
Solving problems by searching
Solving problems by searching
Solving problems by searching
Presentation transcript:

פתרון על ידי בעיות חיפוש בינה מלאכותית יעל נצר

סוכנים פותרי בעיות Reflex agents לא יכולים לתכנן קדימה Reflex agents עם מצב פנימי ( מודל עולם ) – קשה לבטא מדיניות במונחים של מיפוי ממצב לפעולה לעיתים צריך לתכנן פעולה עכשווית על פי הערכת העתיד. בתחילה : הגדרת האלמנטים המרכיבים ' בעיה ' ו ' פתרון ' שלה על ידי דוגמאות General problem solver יכולים לפתור בעיות

Problem solving agents סוכנים רציונליים אמורים למקסם את מדד הביצועים שלהם. אפשר לפשט את הבעייה על ידי הגדרת מטרה ונסיון להשיג אותה

אלגוריתם לסוכנים פותרי בעיות

מפת רומניה

להגדרת אלגוריתם חיפוש סוכן צריך לדחות פעולות שלא מקדמות למטרה המטרות מאפשרות לארגן את התנהגות הסוכן ולהגביל את הפעולות שלו לפעולות שמקדמות למטרה Goal formulation - נוסחת מטרה המבוססת על מדד הביצועים הנוכחיים של הסוכן ועל המצב הנוכחי מטרה – אוסף של מצבים בעולם שצריכים להתקיים אם המטרה הושגה. מטרת הסוכן היא למצוא את רצף הפעולות שיביא אותו לאוסף הזה של מצבים קודם לכן, עליו להחליט אילו פעולות ואילו מצבים הם רלוונטיים.

חיפוש כשיש לסוכן מספר אפשרויות מיידיות לפעולה בעלות ערך בלתי ידוע יכול להחליט מה לעשות על ידי בחינה מקדימה של רצפי הפעולות האפשריות שיובילו אותו למצבים בעלי ערך ידוע – ואז לבחור באפשרות הטובה ביותר. חיפוש : אלגוריתם חיפוש מקבל בעייה כפלט ומחזיר פתרון בצורת רצף פעולות. לאחר מציאת פתרון, רצף הפעולות המוצע יכול להיעשות – execution phase

הגדרת סוכן חיפוש Formulate – ניסוח הבעייה Search Execute עיצוב הסוכן : סביבה סטאטית ( ניסוח ופתרון בעייה לא מתחשב בהשתנות הסביבה ) סביבה דיסקרטית ( לקיחה בחשבון של סדרת פעולות אלטרנטיבית מתבססת על כך שהסביבה דיסקרטית ) כל האלגוריתמים בפרק מניחים שהמצב ההתחלתי הוא ידוע – הכי קל כשהסביבה היא observable ההנחה שהסביבה היא דטרמיניסטית

הגדרת הבעייה ארבעה מרכיבים : המצב ההתחלתי תיאור הפעולות האפשריות של הסוכן ( שימוש בפונקציה ( succ(x שמחזירה קבוצה של זוגות סדורים (action, successor state). המצב ההתחלתי יחד עם פונקציית succ מגדירים את מרחב המצבים האפשריים : גרף מכוון שבו קדקדים הם מצבים וקשתות הן פעולות. מסלול במרחב המצבים מוגדר כרצף מצבים המיוחס לרצף פעולות מבחן מטרה goal test שהסוכן יכול להפעיל על מצב כדי לבדוק אם מדובר במטרה " עלות מסלול " Path cost היא פונקציה שמחזירה ערך מספרי עבור כל מסלול g(n). סוכן פותר - בעיות בוחר את פונקציית העלות שמתאימה למדד הביצועים שלו ( למשל – הסוכן ברומניה – מדד הביצועים הוא זמן, לכן עלות יכולה להמדד בקילומטרים ). ההנחה היא שעלות מסלול היא סכום עלויות הפעולות הבודדות. Step cost – עלות פעולה a ממצב x למצב y מוגדר c(a, x, y)

Example: 8-Puzzle

State Space 1. initial state 2. successor function

Goal Test 3. goal test

(Partial) Search Space for 8- Puzzle Problem 1. initial state 2. successor function 3. goal test

Vaccuum World Revisited

Vacuum World (continued)

Example: Route Planning in a Map Graph: nodes are cities and links are roads. Map gives world dynamics Current state is known World is fully predictable World (set of cities) is finite and enumerable. Cost: total distance or total time for path.

Route Planning: Romania A B Z O S F C P R T L M D Slides on Route Planning Adapted from Leslie Kaelbling’s AI notes.

General Search-Tree Algorithm

Breadth-First Search A B Z O SF C P R T L M D

A B Z O SF C P R T L M D A

A B Z O SF C P R T L M D A Z A S A T A

Breadth-First Search A B Z O SF C P R T L M D A Z A S A T A S A T A O AZ

Breadth-First Search A B Z O SF C P R T L M D A Z A S A T A S A T A O AZ T A O AZ O AS F AS R AS

Breadth-First Search A B Z O SF C P R T L M D A Z A S A T A S A T A O AZ T A O AZ O AS F AS R AS O AZ O AS F AS R AS L AT

Breadth-First Search A B Z O SF C P R T L M D A Z A S A T A S A T A O AZ T A O AZ O AS F AS R AS O AZ O AS F AS R AS L AT O AS F AS R AS L AT

Breadth-First Search A B Z O SF C P R T L M D A Z A S A T A S A T A O AZ T A O AZ O AS F AS R AS O AZ O AS F AS R AS L AT O AS F AS R AS L AT

Breadth-First Search A B Z O SF C P R T L M D A Z A S A T A S A T A O AZ T A O AZ O AS F AS R AS O AZ O AS F AS R AS L AT O AS F AS R AS L AT R AS L AT B ASF Result = B ASF

Breadth-First Search B A Z O SF C P R T L M D

Evaluation of Search Strategies Completeness Time Complexity Space Complexity Optimality To evaluate, we use the following terms b = branching factor m = maximum depth d = goal depth

Complete Complexity: –O(b d ) time –O(b d ) space Optimal (counting by number of arcs). Evaluation of BFS

Depth-First Search A B Z O SF C P R T L M D

A B Z O SF C P R T L M D A

A B Z O SF C P R T L M D A Z A S A T A

Depth-First Search A B Z O SF C P R T L M D A Z A S A T A

Depth-First Search A B Z O SF C P R T L M D A Z A S A T A O AZ S A T A

Depth-First Search A B Z O SF C P R T L M D A Z A S A T A O AZ S A T A S AZO S A T A

Depth-First Search A B Z O SF C P R T L M D A Z A S A T A O AZ S A T A S AZO S A T A F AZOS R AZOS S A T A

Depth-First Search A B Z O SF C P R T L M D A Z A S A T A O AZ S A T A S AZO S A T A F AZOS R AZOS S A T A B AZOSF R AZOS S A T A

Depth-First Search A B Z O SF C P R T L M D A Z A S A T A O AZ S A T A S AZO S A T A F AZOS R AZOS S A T A B AZOSF R AZOS S A T A Result = B AZOSF

Depth-first Search O A B Z SF C P R T L M D

Evaluation of DFS Not complete Complexity: –O(b m ) time –O(mb) space Non-optimal

Lisp Implementation (defun tree-search (states goal-successors combiner) "Find a state that satisfies goal-p. Start with states, and search according to successors and combiner." (cond ((null states) fail) ((funcall goal-p (first states)) (first states)) (t (tree-search (funcall combiner (funcall successors (first states)) (rest states)) goal-p successors combiner))))