Download presentation

Presentation is loading. Please wait.

Published byLaurel Flinders Modified over 3 years ago

1
Heuristics in AI Search

2
http://www.computerworld.com/soft waretopics/software/story/0,10801, 99340,00.html http://www.computerworld.com/soft 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

3
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.

4
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.

5
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.

6
8-Puzzle

7
Demo of the 8-Puzzle http://www.permadi.com/java/puzzle8/inde x.htmlhttp://www.permadi.com/java/puzzle8/inde x.html http://sciris.shu.edu/~borowski/Puzzle/Puz zle.html

8
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).

9
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.

10
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.

11
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

12
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:

13
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

14
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 = = 13 1 - B d + 1 1 - B 1 - 27 1 - 3

15
The Search Tree The search tree will be looked as:

16
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

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

18
More Heuristics H1 – How many tiles are in the wrong place in comparison with the final goal is 8 1 6 4 32 5 8 7

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

20
More Heuristics H2 (node)= 2+2+2+2+3+3+1+3 = 18 76 43 258 1 22 22 3 3 13

21
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.

22
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.

23
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.

24
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

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

Similar presentations

Presentation is loading. Please wait....

OK

Informed Search Reading: Chapter 4.5.

Informed Search Reading: Chapter 4.5.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on causes of 1857 revolt ppt Ppt on our government of india Free ppt on brain machine interface signal Project report ppt on job satisfaction Ppt on conservation of momentum examples Urinary tract anatomy and physiology ppt on cells Ppt on viruses and bacteria facts Converter pub to ppt online reader Ppt on supply chain management of a mule Ppt on articles of association for unincorporated