2. Introduction
• A heuristic is a mental shortcut that allows people to solve problems and make judgments
quickly and efficiently.
• These rule-of-thumb strategies shorten decision-making time and allow people to function
without constantly stopping to think about their next course of action.
• Maximizing what you already know and have experienced and recalled when needed.
• Heuristics are helpful in many situations, but they can also lead to cognitive biases.
Dr. Irfan ul Haq Akhoon
3. Introduction
• It was during the 1950s that the Nobel-prize winning economist and
cognitive psychologist Herbert Simon originally introduced the concept of
heuristics when he suggested that while people strive to make rational
choices, human judgment is subject to cognitive limitations.
• Heuristics are methods for solving problems in a quick way that delivers a
result that is sufficient enough to be useful given time constraints.
• Investors and financial professionals use a heuristic approach to speed up
analysis and investment decisions
Dr. Irfan ul Haq Akhoon
4. Introduction
• Heuristics in general occur because they are efficient ways of responding
when we are faced with problems or decisions.
• They come about automatically, allowing us to allocate our mental energy
elsewhere.
• The specific types of heuristics occur in different contexts;
• the availability heuristic happens because we remember certain memories better than
others,
Dr. Irfan ul Haq Akhoon
5. Based on inference
On past experience
• Solves problem on the basis of heuristic.
• Heuristic gives direction to our query
Dr. Irfan ul Haq Akhoon
6. Heuristic Searching and AI
• Heuristic searching comes under Artificial Intelligence.
• The major goal of AI is to give computers the ability to think or mimic
human behavior.
• Since computers don’t function the way we do, they require a series of well
reasoned steps to reach to a solution
Dr. Irfan ul Haq Akhoon
7. E
To solve a problem
• Representation of a search problem in terms of a tree.
• A tree is a series of interconnected nodes. node
path
A
B C
D G
F
N
K
I
H O
M
L
J
Dr. Irfan ul Haq Akhoon
8. Heuristic search strategies
• Generate and test
• Depth first
• Breadth first
• Best first
• Hill climbing
Dr. Irfan ul Haq Akhoon
9. Generate and test
• Simplest
• Keep guessing
• Requires complete solutions be generated for testing.
• Test to see if this is the expected solution.
• If yes then quit.
• If not then repeat.
Generator
Stop
Tester
Possible
solutions
Correct
solutions
Dr. Irfan ul Haq Akhoon
10. Depth first search
• Searches depth-wise.
• Explores all children of a node first.
• Sequence : ABD…ECFG
• May go into infinite loop.
• To overcome this, DLS.
• DLS: limit the search to specific depth.
A
G
D
C
B
F
E
Dr. Irfan ul Haq Akhoon
11. Breadth first search
• Searches breadth-wise.
• Sequence: ABCDEFG
• Doesn’t get trapped into dead end.
A
G
D
C
B
F
E
Dr. Irfan ul Haq Akhoon
12. Best first search
• Combines two advantages of BFS (doesn’t get trapped into dead end) and DFS(gets
solution without expanding all competing branches).
• Follows a single path at a time but switches whenever some competing path looks
more promising than the current one.
A
C
B D
B C
D
A
F
E
D
C
B
E
A
H
G
I
F
J
3 2
5
3 5
2
4
5
6
2
3
4
1
2
6
6 5
Dr. Irfan ul Haq Akhoon
13. Hill climbing
• The basic idea is to always head to a state which
is better than the current one.
• Chooses its next step the node which places it
nearest to the goal node.
• Example: A hiker being lost in the dark, halfway
up the mountain will always move up towards
his goal. Each step up is a step towards the goal.
A
B C
E
D
F Closer
Closer
Goal state
Dr. Irfan ul Haq Akhoon
15. Web search queries
• A web search query is a query based on a specific search term that a user enters into a web search
engine to satisfy his or her information needs.
There are three broad categories that cover most web search queries:
• Informational queries – Queries that cover a broad topic (e.g., Kashmir or Global warming for which
there may be thousands of relevant results.
• Transactional queries – Queries that reflect the intent of the user to perform a particular action, like
purchasing a car or downloading an antivirus.
• Navigational queries – Queries that seek a single website or web page of a single entity
(e.g., youtube or goair).
Dr. Irfan ul Haq Akhoon
16. Navigational Queries
• Navigation-oriented searches target a certain kind of website. The user is not
seeking a particular product or company and has no clear intent to purchase.
• He simply wishes to visit a particular type of website and uses the search engine to
navigate there.
• Navigational searches are also conducted when the user does not know the exact
web address (URL) or the correct spelling of the brand name or company he is
looking for or he just finds it easy to work this way.
Dr. Irfan ul Haq Akhoon
17. Navigational Queries
• People often search for pages that they expect to find on the Web, likely from a site
that they know exists or assume should exist. Such type of a query is navigational.
• If I type Trivago into a Google toolbar, I’m expecting that the Trivago website will be
the first result that shows up. These are navigational queries where I know there is a
page about what I am looking for, and my search is to find that page.
• Navigational queries can however transform into;
• Transactional: e.g. when searching for ebay. Informational: Wikipedia.
Dr. Irfan ul Haq Akhoon
18. How does a search engine know?
• Not all requests can be clearly assigned to a search-query category. For example, the query “Apple
iPhone” may suggest the need for an informational, transactional, or navigational response.
• Thus for certain keyword combinations, search engines will display online stores, different websites,
and varied types of content such as knowledge databases and tutorials, all on one results page.
• Google also tries to customize each individual user’s search results. Therefore, the results of any
search query will always be influenced by previous searches, the user’s location, and whether or not he
is logged into his Google account.
Dr. Irfan ul Haq Akhoon