Heuristics in AI Search. waretopics/software/story/0,10801, 99340,00.html waretopics/software/story/0,10801,

Slides:



Advertisements
Similar presentations
Chapter 6, Sec Adversarial Search.
Advertisements

Artificial Intelligence
Heuristics, and what to do if you dont know what to do Carl Hultquist.
Heuristic Functions By Peter Lane
Informed search algorithms
CPSC 322, Lecture 7Slide 1 Heuristic Search Computer Science cpsc322, Lecture 7 (Textbook Chpt 3.5) January, 19, 2009.
Review: Search problem formulation
Informed Search Algorithms
Informed search strategies
Informed search algorithms
An Introduction to Artificial Intelligence
The A* Algorithm Héctor Muñoz-Avila. The Search Problem Starting from a node n find the shortest path to a goal node g ?
A* Search. 2 Tree search algorithms Basic idea: Exploration of state space by generating successors of already-explored states (a.k.a.~expanding states).
Informed Search Strategies
Problem Solving: Informed Search Algorithms Edmondo Trentin, DIISM.
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.
Informed Search Methods Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 4 Spring 2004.
Solving Problem by Searching
February 7, 2006AI: Chapter 6: Adversarial Search1 Artificial Intelligence Chapter 6: Adversarial Search Michael Scherger Department of Computer Science.
Adversarial Search Chapter 5.
An Introduction to Artificial Intelligence Lecture VI: Adversarial Search (Games) Ramin Halavati In which we examine problems.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Artificial Intelligence in Game Design
Review: Search problem formulation
Game Playing CSC361 AI CSC361: Game Playing.
Problem Solving and Search in AI Heuristic Search
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
1 State Space of a Problem Lecture 03 ITS033 – Programming & Algorithms Asst. Prof.
Computer Science CPSC 322 Lecture A* and Search Refinements (Ch 3.6.1, 3.7.1, 3.7.2) Slide 1.
Informed search strategies Idea: give the algorithm “hints” about the desirability of different states – Use an evaluation function to rank nodes and select.
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.
Heuristic Search Andrea Danyluk September 16, 2013.
Artificial Intelligence Lecture No. 6 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Informed Search II CIS 391 Fall CIS Intro to AI 2 Outline PART I  Informed = use problem-specific knowledge  Best-first search and its variants.
Heuristic Functions. A Heuristic is a function that, when applied to a state, returns a number that is an estimate of the merit of the state, with respect.
Game tree search Chapter 6 (6.1 to 6.3 and 6.6) cover games. 6.6 covers state of the art game players in particular. 6.5 covers games that involve uncertainty.
Pedagogical Possibilities for the 2048 Puzzle Game Todd W. Neller.
A* optimality proof, cycle checking CPSC 322 – Search 5 Textbook § 3.6 and January 21, 2011 Taught by Mike Chiang.
Searches Algorithms for Exploration. Graphs Graphs represent spatial data How do I get from Augsburg to Wurzburg?
Introduction to State Space Search
Heuristic Functions.
Ch. 4 – Informed Search Supplemental slides for CSE 327 Prof. Jeff Heflin.
G5AIAI Introduction to AI Graham Kendall Heuristic Searches.
Artificial Intelligence in Game Design Board Games and the MinMax Algorithm.
For Monday Read chapter 4 exercise 1 No homework.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Adversarial Search and Game-Playing
Review: Tree search Initialize the frontier using the starting state
Heuristic Functions.
Artificial Intelligence (CS 370D)
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Heuristic Search A heuristic is a rule for choosing a branch in a state space search that will most likely lead to a problem solution Heuristics are used.
Artificial Intelligence Lecture No. 6
Abstraction Transformation & Heuristics
Adversarial Search Chapter 5.
Artificial Intelligence Problem solving by searching CSC 361
Algorithms for Exploration
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.
Finding Heuristics Using Abstraction
Artificial Intelligence
Informed search algorithms
Informed search algorithms
Artificial Intelligence
Announcements This Friday Project 1 due Talk by Jeniya Tabassum
Reading: Chapter 4.5 HW#2 out today, due Oct 5th
Minimax strategies, alpha beta pruning
Informed Search.
Unit II Game Playing.
Presentation transcript:

Heuristics in AI Search

waretopics/software/story/0,10801, 99340,00.html waretopics/software/story/0,10801, 99340,00.html AI agents used to smooth wrinkles in housing project A Chicago agency has turned to Agentis Software for help

Choosing a Good Heuristic For a given problem, there might be many different heuristics one can choose. However, some heuristics are better than others. We say the heuristic is better if it needs few nodes to examine in the search tree. We also call this kinds of heuristics are better informed.

Efficiency is Very important in Picking a Heuristic It is very important to consider the efficiency of running the heuristic itself. More information about a problem may mean more time to process the information.

Examples about Heuristic The 8 (N) -puzzle problem. The 8-puzzle - also known as the sliding- block/tile-puzzle - is one of the most popular instrument in the artificial intelligence (AI) studies. It belongs to AI exercises commonly referred as toy-problems.

8-Puzzle

Demo of the 8-Puzzle x.htmlhttp:// x.html zle.html

It is a Popular Game, too. Toy problems - as the name implies - are somewhat fun. They are not real-world problems, but they're useful because they are simple to define and confined. It means that an exact description of the problems are possible, and all the factors that affects the problem are known (there is no need to worry about unpredictable factors such as weather or terrain).

8-Puzzle The 8-puzzle, along with chess, tic-tac-toe, and backgammon, has been used to study new search algorithms, neural-network, and path-finding. It's usually one of the first instrument that computer-scientists use to test a new search algorithm.

Heuristic Involved in 8-Puzzle We known that typically, it takes about 20 moves to get from a random start state to the goal state. Therefore, the search tree has a depth of 20. The branching factor will depends on the location of the blank square.

Branching Factor (B) When the blank square is in the middle of the grid, B=4; When the blank square is on the edge, B=3; When the blank square is in a corner, B=2. The average B=3

General Approach Most of the search tree have majority of the nodes in the deepest level; it means searching spends most of its time examining these nodes. In general, for a tree of depth d with a branching factor of B, the total number of nodes is:

1 root node B nodes in the first layer B nodes in the second layer : B nodes in the n layer Hence, the total number of nodes is: 1 + B + B + B + …, + B 2 n th 213d

Sum of Nodes Obviously, that is a geometric progression with the sum as: Sum of Nodes = for a tree of depth of 2 and B = 3, Sum of nodes = = B d B

The Search Tree The search tree will be looked as:

For 8 – Puzzle with d=20 and B=3 We would have a tree that has to examine around 3.5 billion states. However, for the given problem, We only have 9! = 362,880 possible states. This state number reduction is from the problem itself, and it can be considered as h0

More Heuristics H1 – How many tiles are in the wrong place. We will find for the following example:

More Heuristics H1 – How many tiles are in the wrong place in comparison with the final goal is

An Improved Heuristic H2 H2 – How far each tile has to move to get to its correct goal state;

More Heuristics H2 (node)= =

And, More Heuristics H3 H3 = H2 + (2 x k (node)), where k is a function that is equal to the number of direct swaps that need to be made between adjacent tiles to move them into the correct sequence.

Admissible ? To be useful as a heuristic, the heuristic must never over-estimate the cost of changing from a given state to the goal state. Such a heuristic is defined as being admissible.

Heuristic Function f A heuristic function is a function that when applied to a node gives a value that represents a good estimate of the distance of the node from the goal. For two nodes m and n, If f (m) < f (n), m is said more likely to be on an optimal path than n to the goal node.

H1, H2, and H3 in 8-puzzle Obviously, all of them are admissible, And we also have: H3 is more informed than H2 and H2 is more informed than H1

Relaxed Problem A Relaxed Problem is a version of a problem that has fewer Constraints.