Reasoning as Search. Reasoning We can describe reasoning as search in a space of possible situations.

Slides:



Advertisements
Similar presentations
Artificial Intelligence: Knowledge Representation
Advertisements

Heuristic Search techniques
An Introduction to Artificial Intelligence
State Space Heuristic Search. Three Algorithms  Backtrack  Depth First  Breadth First All work if we have well-defined:  Goal state  Start state.
Ch 4. Heuristic Search 4.0 Introduction(Heuristic)
Greedy best-first search Use the heuristic function to rank the nodes Search strategy –Expand node with lowest h-value Greedily trying to find the least-cost.
State Space 3 Chapter 4 Heuristic Search. Three Algorithms Backtrack Depth First Breadth First All work if we have well-defined: Goal state Start state.
Heuristic Search Chapter 3.
October 1, 2012Introduction to Artificial Intelligence Lecture 8: Search in State Spaces II 1 A General Backtracking Algorithm Let us say that we can formulate.
1 Heuristic Search Chapter 4. 2 Outline Heuristic function Greedy Best-first search Admissible heuristic and A* Properties of A* Algorithm IDA*
5-1 Chapter 5 Tree Searching Strategies. 5-2 Satisfiability problem Tree representation of 8 assignments. If there are n variables x 1, x 2, …,x n, then.
CS 484 – Artificial Intelligence1 Announcements Department Picnic: today, after class Lab 0 due today Homework 2 due Tuesday, 9/18 Lab 1 due Thursday,
Chapter 4 Search Methodologies.
CSC 423 ARTIFICIAL INTELLIGENCE
Heuristic search, page 1 CSI 4106, Winter 2005 Heuristic search Points Definitions Best-first search Hill climbing Problems with hill climbing An example:
Best-First Search: Agendas
The Foundations of Artificial Intelligence. Our Working Definition of AI Artificial intelligence is the study of how to make computers do things that.
Mahgul Gulzai Moomal Umer Rabail Hafeez
SE Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Review: Search problem formulation
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2004.
Branch and Bound Searching Strategies
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
Intelligent Agents What is the basic framework we use to construct intelligent programs?
Problem Solving and Search in AI Heuristic Search
1 Tree Searching Strategies. 2 The procedure of solving many problems may be represented by trees. Therefore the solving of these problems becomes a tree.
5-1 Chapter 5 Tree Searching Strategies. 5-2 Breadth-first search (BFS) 8-puzzle problem The breadth-first search uses a queue to hold all expanded nodes.
CS 561, Session 6 1 Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Brute Force Search Depth-first or Breadth-first search
Heuristic Search Heuristic - a “rule of thumb” used to help guide search often, something learned experientially and recalled when needed Heuristic Function.
Informed Search Idea: be smart about what paths to try.
Informed search algorithms
Informed Search Strategies
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
Informed Search R & N Chapter 4, except 4.4. Heuristics The word heuristic comes from the Greek word  (heuriskein), meaning “to discover”, which.
1 Chapter 2 Heuristic Search Techniques AI & ESChapter 2 2 Defining the problem A water jug problem: 4-gallon and 3-gallon - no marker on the.
Chapter 2 Problems, Problem Spaces, and Search?
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Today’s Topics FREE Code that will Write Your PhD Thesis, a Best-Selling Novel, or Your Next Methods for Intelligently/Efficiently Searching a Space.
Problem Solving by Searching Search Methods : informed (Heuristic) search.
A RTIFICIAL I NTELLIGENCE UNIT : 2 Search Techniques.
Chapter 2 Problems, Problem Spaces, and Search?
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
Informed search strategies Idea: give the algorithm “hints” about the desirability of different states – Use an evaluation function to rank nodes and select.
Informed Search Include specific knowledge to efficiently conduct the search and find the solution.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
Review: Tree search Initialize the frontier using the starting state While the frontier is not empty – Choose a frontier node to expand according to search.
For Wednesday Read chapter 6, sections 1-3 Homework: –Chapter 4, exercise 1.
For Wednesday Read chapter 5, sections 1-4 Homework: –Chapter 3, exercise 23. Then do the exercise again, but use greedy heuristic search instead of A*
Artificial Intelligence for Games Informed Search (2) Patrick Olivier
Informed Search Reading: Chapter 4.5 HW #1 out today, due Sept 26th.
Searching for Solutions
3.5 Informed (Heuristic) Searches This section show how an informed search strategy can find solution more efficiently than uninformed strategy. Best-first.
G5AIAI Introduction to AI Graham Kendall Heuristic Searches.
February 18, 2016Introduction to Artificial Intelligence Lecture 8: Search in State Spaces III 1 A General Backtracking Algorithm Sanity check function.
Best-first search is a search algorithm which explores a graph by expanding the most promising node chosen according to a specified rule.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
Romania. Romania Problem Initial state: Arad Goal state: Bucharest Operators: From any node, you can visit any connected node. Operator cost, the.
Review: Tree search Initialize the frontier using the starting state
Last time: Problem-Solving
For Monday Chapter 6 Homework: Chapter 3, exercise 7.
Artificial Intelligence Problem solving by searching CSC 361
HW #1 Due 29/9/2008 Write Java Applet to solve Goats and Cabbage “Missionaries and cannibals” problem with the following search algorithms: Breadth first.
Heuristic search INT 404.
Informed search algorithms
Informed Search Idea: be smart about what paths to try.
Chapter 2 Problems, Problem Spaces, and Search?
Reading: Chapter 4.5 HW#2 out today, due Oct 5th
Informed Search Idea: be smart about what paths to try.
Presentation transcript:

Reasoning as Search

Reasoning We can describe reasoning as search in a space of possible situations.

State Space Search We need: A set of states A start state A set of operators (a successor function), possibly with costs attached. A set of goal states (or a way to test for goal)

Recall the 8-Puzzle What are the states?

A Water Jug Problem You are given two jugs, a 4-gallon one and a 3-gallon one. Neither has any measuring markers on it. There is a pump that can be used to fill the jugs with water. How can you get exactly 2 gallons of water into the 4-gallon jug? States: Start state: Operators: Goal state:

School Lunch Planning States: Start state: Operators: Goal state:

Criminal Defense Lawyer States: Start state: Operators: Goal state:

Search Two key decisions: Use a tree or a graph How to choose which node to expand next Example:

Performance Criteria Completeness Optimality How good is the solution? How efficient is the search algorithm at finding the solution?

Breadth-First Search

Depth-First Search

The British Museum Algorithm A simple algorithm: Generate and test When done systematically, it is basic depth-first search. But suppose that each time we end a path, we start over at the top and choose the next path randomly. If we try this long enough, we may eventually hit a solution. We’ll call this The British Museum Algorithm or The Monkeys and Typewriters Algorithm

A Version of Depth-First Search: Branch and Bound Consider the problem of planning a ski vacation. Fly to A $600Fly to B $800Fly to C $2000 Stay D $200 (800) Stay E $250 (850) Total cost (1200)

Problem Reduction Goal: Acquire TV Steal TVEarn MoneyBuy TV Or another one: Theorem proving in which we reason backwards from the theorem we’re trying to prove.

Heuristics The word heuristic comes from the Greek word  (heuriskein), meaning “to discover”, which is also the origin of eureka, derived from Archimedes’ reputed exclamation, heurika (“I have found”), uttered when he had discovered a method for determining the purity of gold. We typically use the term heuristic to refer to a technique that is likely, but not guaranteed, to produce a good (but not necessarily best) answer or the best answer with a good but not necessarily best expenditure of effort.

Heuristic Functions The job of a heuristic function f(n) is to evaluate a node n in a search tree so that the “best” node can be selected for expansion. Two approaches to defining f: f measures the value of the state contained in the node. f measures the cost of the state (and possibly the path to it). Often, in this case, we decompose f: f(n) = g(n) + h(n), where g(n) = the cost to get to n, and h(n) = an estimate of the cost to get from n to a goal

Examples - f Measures the Value Often, in these cases, f is the weighted sum of a set of component values: Chess School lunch planning Autonomous Mars rover Perry Mason defense lawyer

Examples – f Measures the Cost to a Goal In many problems, all goal states are equally good. Then all we care about is the cost of getting to one. So a state is good if the estimated cost of getting from it to a goal is low. Or we may also want to take into account the cost, so far, of getting to it. 8–Puzzle Water jug Route planning

Hill Climbing Problem: You have just arrived in Washington, D.C. You’re in your car, trying to get downtown to the Washington Monument.

Hill Climbing – Some Problems

Sometimes the Problem is f From the initial state, move A to the table. Three choices for what to do next. A local heuristic function: Add one point for every block that is resting on the thing it is supposed to be resting on. Subtract one point for every block that is sitting on the wrong thing.

Sometimes the Problem is f From the initial state, move A to the table. Three choices for what to do next. A global heuristic function: For each block that has the correct support structure (i. e., the complete structure underneath it is exactly as it should be), add one point for every block in the support structure. For each block that has an incorrect support structure, subtract one point for every block in the existing support structure.

Hill Climbing – Is Close Good Enough? A B Is A good enough? Choose winning lottery numbers

Hill Climbing – Is Close Good Enough? A B Is A good enough? Choose winning lottery numbers Get the cheapest travel itinerary Clean the house