Artificial Intelligence

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 Solving problems by searching
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.
Search Search plays a key role in many parts of AI. These algorithms provide the conceptual backbone of almost every approach to the systematic exploration.
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.
UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.
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.
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 Chapter 3: Solving Problems by Searching
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.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Solving Problems by Searching CPS Outline Problem-solving agents Example problems Basic search algorithms.
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.
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
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.
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.
Artificial Intelligence Solving problems by searching.
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
State Space Representations and Search Algorithms
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
ECE 448 Lecture 4: Search Intro
Problem Solving as Search
Problem solving and search
Solving problems by searching
Solving problems by searching
Artificial Intelligence
Solving problems by searching
Solving problems by searching
ARTIFICIAL INTELLIGENCE
Solving problems by searching
Solving Problems by Searching
Solving Problems by Searching
CS440/ECE 448 Lecture 4: Search Intro
Solving problems by searching
Presentation transcript:

Artificial Intelligence Lecture 3 – Problem-Solving (Search) Agents Dr. Muhammad Adnan Hashmi 8 November 2018

Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms 8 November 2018

What is SEARCH? Suppose an agent can execute several actions immediately in a given state It doesn’t know the utility of these actions Then, for each action, it can execute a sequence of actions until it reaches the goal The immediate action which has the best sequence (according to the performance measure) is then the solution Finding this sequence of actions is called search, and the agent which does this is called the problem-solver. NB: Its possible that some sequence might fail, e.g., getting stuck in an infinite loop, or unable to find the goal at all. 8 November 2018

Linking Search to Trees You can begin to visualize the concept of a graph Searching along different paths of the graph until you reach the solution The nodes can be considered congruous to the states The whole graph can be the state space The links can be congruous to the actions…… 8 November 2018

Problem-solving agents 8 November 2018

Example: Traveling in Romania On holiday in Romania; currently in Arad. Flight leaves tomorrow from Bucharest Formulate goal: Be in Bucharest Formulate problem: States: various cities Actions: drive between cities Find solution: Sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest. 8 November 2018

Example: Traveling in Romania 8 November 2018

Search Problem Types Static: The configuration of the graph (the city map) is unlikely to change during search Observable: The agent knows the state (node) completely, e.g., which city I am in currently Discrete: Discrete number of cities and routes between them Deterministic: Transiting from one city (node) on one route, can lead to only one possible city Single-Agent: We assume only one agent searches at one time, but multiple agents can also be used. 8 November 2018

Problem-Solver Formulation A problem is defined by five items: An Initial state, e.g., “In Arad“ Possible actions available, ACTIONS(s) returns the set of actions that can be executed in s. A successor function S(x) = the set of all possible {Action–State} pairs from some state, e.g., Succ(Arad) = {<Arad  Zerind, In Zerind>, … } Goal test, can be explicit, e.g., x = "In Bucharest implicit, e.g., Checkmate(x) Path cost (additive) 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. 8 November 2018

State Space Abstraction Real world is absurdly complex: State space must be abstracted for problem solving Abstract state space = compact representations of the real world state space, e.g., “In Arad” = weather, traffic conditions etc. of Arad Abstract action = a complex combination of real world actions, e.g., "Arad  Zerind" represents a complex set of possible routes, detours, rest stops, etc. In order to guarantee that an abstract solution works, any real state “In Arad“ must be representative of some real state "in Zerind“ An abstract solution is valid if we can expand it into a solution of the real world An abstract solution should be useful, i.e., easier than the solution in the real world. 8 November 2018

Vacuum World State Space Graph States? Actions? Goal test? Path cost? 8 November 2018

Vacuum World State Space Graph States? dirt and robot location Actions? Left, Right, Pick Goal test? no dirt at all locations Path cost? 1 per action 8 November 2018

Example: The 8-puzzle States? Actions? Goal test? Path cost? 17 8 November 2018 17

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] 8 November 2018 18

Example: Robotic Assembly States?: real-valued coordinates of robot joint angles, parts of the object to be assembled, current assembly Actions?: continuous motions of robot joints Goal test?: complete assembly Path cost?: time to execute 8 November 2018 19

Tree Search Algorithms Basic idea: Offline (not dynamic), simulated exploration of state space by generating successors of already-explored states (a.k.a. expanding the states) The expansion strategy defines the different search algorithms. 8 November 2018 20

Tree search example 8 November 2018 21

Tree search example 8 November 2018 22

Tree search example 8 November 2018 23

Fringe Fringe: The collection of nodes that have been generated but not yet expanded Each element of the fringe is a leaf node, with (currently) no successors in the tree The search strategy defines which element to choose from the fringe fringe fringe 8 November 2018 24

Queue Functions The fringe is implemented as a queue MAKE_QUEUE(element,…): makes a queue with the given elements EMPTY?(queue): checks whether queue is empty FIRST(queue): returns 1st element of queue REMOVE_FIRST(queue): returns FIRST(queue) and removes it from queue INSERT(element, queue): add element to queue INSERT_ALL(elements,queue): adds the set elements to queue and return the resulting queue 8 November 2018 25

Implementation: General Tree Search 8 November 2018 26

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. 8 November 2018 27

Search Strategies A search strategy is defined by picking the order of node expansion Strategies are evaluated along the following dimensions: Completeness: Does it always find a solution if one exists? Time complexity: Number of nodes generated Space complexity: Maximum number of nodes in memory Optimality: Does it always find a least-cost solution? Time and space complexity are measured in terms of b: maximum no. of successors of any node d: depth of the shallowest goal node m: maximum length of any path in the state space. 8 November 2018 28

Questions 8 November 2018