0% found this document useful (0 votes)
43 views17 pages

Session 3

Uploaded by

Venkata Rajesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views17 pages

Session 3

Uploaded by

Venkata Rajesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

DATA DRIVEN

ARTIFICIAL
INTELLIGENT SYSTEMS
SESSION NO: 3.2
TOPIC: INTRODUCTION TO HEURISTICS
SESSION INTRODUCTION

• This session provides the basics of Heuristic.


• This session also gives an idea about types of Heuristic functions

2
SESSION INTRODUCTION…..

• Heuristic functions are the most common form in which additional knowledge of the
problem is imparted to the search algorithm.
• Heuristics is a method of problem-solving where the goal is to come up with a workable
solution in a feasible amount of time.
• Heuristic techniques strive for a rapid solution that stays within an appropriate accuracy
range rather than a perfect solution.
• When it seems impossible to tackle a specific problem with a step-by-step approach,
heuristics are utilized in AI (artificial intelligence) and ML (machine learning).

3
SESSION INTRODUCTION…..

• Heuristic functions in AI prioritize speed above accuracy; hence they are frequently
paired with optimization techniques to provide better outcomes.
• What is the Heuristic Function?
• If there are no specific answers to a problem or the time required to find one is too great,
a heuristic function is used to solve the problem.
• The aim is to find a quicker or more approximate answer, even if it is not ideal.
• Put another way, utilizing a heuristic means trading accuracy for speed.
• A heuristic is a function that determines how near a state is to the desired state.
• Heuristics functions vary depending on the problem and must be tailored to match that
particular challenge.

4
SESSION INTRODUCTION…..

• The majority of AI problems revolve around a large amount of information, data, and
constraints, and the task is to find a way to reach the goal state.
• The heuristics function in this situation informs us of the proximity to the desired
condition.
• With a good heuristic function, however, the complexity can be reduced substantially.
• The amount of the reduction depends on the particular problem and on the quality of the
heuristic.

5
PROPERTIES OF A HEURISTIC SEARCH
ALGORITHM
• Heuristic search algorithms have the following properties:
• Admissible Condition: If an algorithm produces an optimal result, it is considered
admissible.
• Completeness: If an algorithm ends with a solution, it is considered complete.
• Dominance Property: If A1 and A2 are two heuristic algorithms and have h1 and h2
heuristic functions, respectively, then A1 Will dominate A2 if h1 is superior to h2 for all
possible values of node n.
• Optimality Property: If an algorithm is thorough, allowable, and dominates the
other algorithms, that'll be the optimal one and will unquestionably produce an optimal result.

6
CATEGORIES OF HEURISTIC SEARCH TECHNIQUES IN AI

• We can categorize the Heuristic Search techniques into two types:


• Direct Heuristic Search Techniques:
• Direct heuristic search techniques may also be called blind control strategy, blind search,
and uninformed search.
• They utilize an arbitrary sequencing of operations and look for a solution throughout the
entire state space. These include Depth First Search (DFS) and Breadth First Search
(BFS).
• BFS is a heuristic search method to diagram data or quickly scan intersection or tree
structures. DFS is predicated on the likelihood of last in, first out. Similarly, the LIFO
stack data structure is used to complete the process in recursion

7
Categories of Heuristic Search Techniques in AI
• Weak Heuristic Techniques:
• Weak heuristic techniques are known as a Heuristic control strategy, informed
search, and Heuristic search. These are successful when used effectively on the
appropriate tasks and typically require domain-specific knowledge.
• To explore and expand, users require additional information to compute preferences
across child nodes. A heuristic function is connected to each node.

8
STRATEGIES WHERE USE HEURISTIC FUNCTIONS

• Let's first look at some of the strategies we frequently see before detailing specific ones.
Here are a few examples.
• A* Search
• Best-first search
• Tabu search
• Bidirectional search
• Constant satisfaction problems
• Hill climbing

9
EXAMPLES OF HEURISTIC FUNCTIONS IN AI

• A variety of issues can be solved using a heuristic function in AI.


• Traveling Salesman Problem:
• What is the quickest path between each city and its starting point, given a list of cities and
the distances between each pair of them?
• This problem could be brute-forced for a small number of cities. But as the number of
cities grows, finding a solution becomes more challenging.
• This issue is well-solved by the nearest-neighbor heuristic, which directs the computer to
always choose the closest unexplored city as the next stop on the path.
• While NN only sometimes offers the optimum solution, it is frequently near enough that
the variation is insignificant to respond to the salesman's problem.
• This approach decreases TSP's complexity from O(n!) to O (n^2).
10
EXAMPLES OF HEURISTIC FUNCTIONS IN AI

• Search Engine:
• People have been interested in SEO as long as there have been searching engines.
• Users want to quickly discover the information they need when utilizing a search engine.
• Search engines use heuristics to speed up the search process because such a staggering
amount of data is available.
• A heuristic could initially attempt each alternative at each stage. Still, as the search
progresses, it can quit at any point if the present possibility is inferior to the best solution
already found.
• The search engine's accuracy and speed can be improved in this way.

11
EXAMPLES OF HEURISTIC FUNCTIONS IN AI

• Best-first algorithms include as a component of f, a heuristic function, denoted with h(n) where:

H(n) = estimated cost of the cheapest path from the state at node n to a goal state.
• Greedy best-first search tries to expand the node that is closest to the goal, on the grounds that this
is likely to lead to a solution quickly. Thus, it evaluates nodes by using just the heuristic function;
that is,
f (n) = h(n).
• A* Search: The most widely known form of best-first search is called A* search evaluates nodes by
combining g(n), the cost to reach the node, and h(n), the cost to get from the node to the goal:
f(n) = g(n) + h(n)
g(n) gives the path cost from the start node to node n, and h(n) is the estimated cost of the cheapest
path from r. to the goal, we have
f (n) = estimated cost of the cheapest solution through n.
12
SUMMARY

• In conclusion, Heuristic functions in ai are critical to accelerating solution discovery.

• One benefit of using heuristic algorithms is the ability to generate a workable solution to
the situation at hand quickly.

• Since the solution is quick enough, it can be imperfect; a close fit will do.

13
SELF ASSESSMENT QUESTIONS

1.Which of the following heuristic function used in Greedy Best first search?

(a) Farthest neighbor heuristic

(b) f(n)=g(n)

(c) f(n)=g(n)+h(n)

(d) f(n)=h(n)

14
SELF ASSESSMENT QUESTIONS

• Which of the following search strategy uses direct heuristic techniques?

(a) A*

(b) TSP

(c) GBFS

(d) DFS

15
TERMINAL QUESTIONS

1. Discuss how heuristic functions will be useful in achieving rapid solution in search
problems.
2. List out the types of heuristics.
3. List out some examples of direct and indirect heuristic techniques.

16
REFERENCE BOOKS AND WEB LINKS

• Reference Books:
• 1. Patrick Henry Winston, ‘Artificial Intelligence’, Pearson Education (2003)
• 2. G. Luger, W. A. Stubblefield, "Artificial Intelligence", Third Edition, Addison-Wesley,
(2007)
• 3. William F. Clocksin, Christopher S. Mellish-Programming in Prolog-Springer (2003)
• 4. Introducing Data science by Davy cielen, Arno D.B.Meysmen, Mohamed Ali
• Sites and Web links:
• 1. https://www.youtube.com/watch?v=K9gH7hBAdpo (by IIT Delhi)
• 2. https://www.youtube.com/watch?
v=GHpchgLoDvI&list=PLp6ek2hDcoNB_YJCruBFjhF79f5ZHyBuz
• 3. https://www.ics.uci.edu/~dechter/courses/ics-271/fall-12/
17

You might also like