SlideShare a Scribd company logo
Artificial Intelligence
Search and Heuristics
“Can a machine think?”
• Alan Turing asked this question in the 1950 article titled
Computing Machinery and Intelligence
• His answer was “Yes”
• This led to the question
"If a computer could think, how could we tell?"
• Turing's suggestion:
– if the responses from the computer were
indistinguishable from that of a human, the
computer could be said to be thinking.
The Turing test
• Turing proposed the following criterion in 1950 for
deciding whether a computer is intelligent
– A human holds a teletype conversation on any topic
with an
unseen correspondent
– If the human believes he is talking to another human
when he is really talking to a computer then the
computer is deemed to be intelligent
• Turing predicted that by the year 2000 a computer
program would be able to fool the average questioner for
five minutes about 70% of the time
Chatterbots
• A group of programs attempting to cross the language
barrier between humans and computers were developed
in an attempt to pass - or ridicule - Turing's test
• Such programs are now known as Chatterbots
– computer programs which simulate conversation with
a user in a (written) natural language
• The most famous such program, ELIZA, was published
in 1966 by Joseph Weizenbaum from MIT in
Communications of the ACM
• ELIZA attempts to communicate in a natural language by
engaging humans in conversation with a simulated
Rogerian psychotherapist
How ELIZA works
• ELIZA simulates a conversation between psychiatrist
and patient
– stereotypical method: mirror the patient's feelings by
repeating the input statements as questions
• Looks for patterns of words in the input
• Applies a series of pattern matching rules
• Replies with predetermined output
• Uses a very small database of words and phrases
• ELIZA is relatively effective because it exploits the fact
that humans read so much meaning into what is said
– fools users into interpreting nonsense as conversation
http://www.manifestation.com/neurotoys/eliza.php3
http://www.cs.duke.edu/courses/summer04/cps001/chatterbots/eliza.html
The Loebner prize
• The first formal instantiation of a Turing test
• Implemented in 1991 by Dr. Hugh Loebner, a professor
very much interested in seeing AI succeed
– pledged $100,000 to the first computer (programmer)
that could pass the test.
• Each year an annual prize of $2000 and a bronze medal
is awarded to the most human computer.
– winner of the annual contest is best entry relative to
other entries that year
– irrespective of how good it is in an absolute sense.
http://www.loebner.net/Prizef/loebner-prize.html
Loebner prize winners & more bots
• 1991 Loebner Prize winner Joseph Weintraub
– PC Therapist
• 2001 Loebner Prize winner Richard Wallace
http://alicebot.org
• 2003 Loebner Prize winner Juergen Pirner
http://www.abenteuermedien.de/jabberwock
• Sites for all things Chatterbot:
http://www.simonlaven.com
http://www.botspot.com/pages/chatbots.html
Validity of the Turing test?
• Supporters
– human-like interaction is seen as essential to human-
like intelligence
• Opponents
– test is neither necessary nor sufficient for intelligence
– what is important is that the computer demonstrates
cognitive ability regardless of its behavior
– not necessary for program to speak for it to be
intelligent
– there are humans that would fail the Turing test
– there are unintelligent computers that might pass
The origins of AI
• Alan Turing proposed that machines could be
programmed to exhibit intelligent behavior in 1950
• John McCarthy gave the name artificial intelligence to
the field in his 1956 proposal to explore
– “the conjecture that every aspect of learning or any
other feature of intelligence can in principle be so
precisely described that a machine can be made to
simulate it”
What is intelligence?
• Intelligence is the computational part of the ability to
achieve goals in the world
– varying degrees of intelligence occur in people, many
animals and some machines
• The ultimate effort is to make computer programs that
can solve problems and achieve goals in the world as
well as humans
http://www-formal.stanford.edu/jmc/whatisai/
Reasoning
• If we are to build machines that are able to perform
complex tasks without human intervention, we must
make them more humanlike in the sense that they must
possess or at least simulate the ability to reason
• How can machines be programmed to simulate
reasoning? Is it possible?
• Adversary’s argument:
– it is impossible to write down formal rules for every
situation
• Alan Turing says:
– it is scientifically impossible to prove that people are
not driven by rules
Reasoning
• Making a conclusion or logical judgment on the basis of
circumstantial evidence and prior conclusions rather than
on the basis of direct observation
• Program a computer to represent conclusions as states
• The ultimate conclusion or judgment is called the goal
• Process of reasoning can be viewed as searching the
space of all possible states to find path or sequence of
actions from the initial state to the goal
• Based on observation of current state (and possibly prior
states) select some new goal state it wishes to achieve
and devise a strategy for achieving it
Methods for reasoning
• Start at initial state and systematically consider possible
actions and reason forward toward the goal
• Reason backwards from the goal state
• Identify subgoals
– goal cannot be achieved until certain a subgoal is
reached, where that subgoal depends upon some
previous achievement
• Distance measures
– estimate how close moving to a particular state will
bring you to the goal
Search
• Many structures are used to model the abstract nature of
search
– search states, search spaces, search trees
• There are many search algorithms
• Search algorithms are one of two types
– complete or exhaustive
• guaranteed to find solution or prove there is none
– incomplete
• may not find a solution even when it exists
• often more efficient than complete search
– else there would be no reason to use them
Search states
• Search states summarize information about the current
state of the search
• The goal state is a special instance of a search state
– contains complete information
– gives the solution to the problem
• In general, a search state other than the goal
– provides partial information only
– will not solve the problem
– may not even extend to the solution
Search in AI
• Search states allow us to generalize search
• Do not view search is as just a process to reach the goal
• Instead we seek a solution or subgoal to extend our
current search state
– increase distance on path from some other state
– there may be no such solution along the current path,
even if the overall problem is solvable
• Original search problem is to extend the initial state
• Most search in AI performed by structured exploration of
search states
Search space
• Search space is an abstract logical space composed of
nodes and links (edges)
– nodes represent the search states
– edges are all legal connections between search
states
• Search algorithms are well-defined instructions for
navigating the search space
Search trees
• Search trees are an abstraction of one possible search
• Root node is the initial state
• Leaves represent all possible solutions and failures
• All other nodes represent states in between
• Edges represent actions
– consider two nodes X, Y
and edge E between them
– state Y is the consequence
of performing action E while in state X
• Child nodes represent extensions
– children of a node give all possible consequences of
moving forward from that node
X
Y
E
Tic-Tac-Toe
• The first player is X and the
second is O
• Object of game: get three of
your symbol in a horizontal,
vertical or diagonal row on a
33 game board
• X always goes first
• Players alternate placing Xs and Os on the game board
• Game ends when a player has three in a row (a wins) or
all nine squares are filled (a draw)
Partial search tree for Tic-Tac-Toe
• Impossible to draw entire tree
• 9! = 362,880 possible states
Frontier
• Search trees are a useful concept in theory
• In practice, search algorithms do not compute and store
the entire search tree
– requires exponential time/space
– we can discard nodes we already explored
– we can discard nodes we will never use
• Search algorithms store frontier of search
– nodes in search tree with unexplored children
• Many search algorithms are easy to understand in terms
of search trees and how they explore the frontier
Classic search algorithms
• Breadth-first search
• Depth-first search
• Best-first search
• Depth-bounded depth-first search
• Iterative deepening search
Breadth-first search
• Explore all nodes at one
height in tree before any
other nodes
• Always move to
shallowest and
leftmost node
in the frontier
1
6
3
12 13
7
14 15
4
2
8 9
5
10 11
16 17 18 19
21
20
Depth-first search
• Explore all nodes
in subtree of current
node before any
other nodes
• Always move to
leftmost and
deepest node
in the frontier
• Tree must be
finite
1
15
14
16 17
19
20 21
3
2
4 7
8
9 10
5 6 11 12
13
18
Complete or incomplete search?
• Breadth-first and depth-first search are complete
– exhaustively search the tree
– guaranteed to find the goal (if it exists)
• Depth-bounded and iterative deepening searches are
incomplete search algorithms based on depth-first
search
– Depth-bounded depth-first search
• set limit on depth of search in tree
– Iterative deepening search
• use depth-bounded search but increase limit as
search progresses
Best-first search
• What if the system has some knowledge about how to
find the goal, and selects its search in the direction of the
earliest possible achievement of the goal?
– enables the search to move as quickly as possible in
the direction of the goal
• Best-first search
– pick whichever element of frontier seems most
promising
• Information given to the system may or may not help in
finding the solution
– best-first search is an incomplete search
What is “best”?
• Best-first search builds tree by pursuing the more
promising paths to greater depths and consider alternate
paths only if our current path leads to a failure state
– strategic search
– similar to the process a human would follow
– follow option that appears best rather than pursing all
possible options at once
• How does one judge which option is most promising?
– intuition, reasoning, …
• How does one program a computer to judge which
option is most promising?
Heuristics
• General definition
– educated guess that reduces or limits the search for
solutions in spaces that are complex and poorly
understood
• In CS terms
– quantitative value associated with each state that
attempts to characterize the distance from that state
to the nearest goal
• Value to minimize cost or maximize gain
• Given a choice between two or more states the one with
the smallest cost (or largest gain) is the one representing
the direction we should pursue
Why do we use heuristics?
• Required when problems have many solutions and
performing an exhaustive search would be near
impossible
• We can perform an exhaustive search for Tic-Tac-Toe
– 9! = 362,880 states
• Not practical for games like checkers ( 1040 states) ,
chess ( 10 120 states) or Go (361!  10750 states)
• However …
– heuristics have no theoretical guarantee!
• solution not necessarily optimal or even feasible
Good heuristics
• Good heuristics should have the following characteristics
– give a reasonable estimate of the amount of work
required to reach the associated solution state
• provides meaningful information when selecting
among options
• the better the estimate given by the heuristic, the
better the decisions made based on that
information will be
– easy to compute
• use of the heuristic should not become a burden to
the search process (i.e. slow it down completely)

More Related Content

PDF
Module-1.1.pdf of aiml engineering mod 1
PPTX
Artificial Intelligence -1.pptx. ajudnshdbdb
PPT
Unit I Introduction to AI K.Sundar,AP/CSE,VEC
PPT
AI.ppt
PPTX
Unit 1 AI.pptx
PPTX
PPTX
l1.pptx
PPTX
Module-1.1.pdf of aiml engineering mod 1
Artificial Intelligence -1.pptx. ajudnshdbdb
Unit I Introduction to AI K.Sundar,AP/CSE,VEC
AI.ppt
Unit 1 AI.pptx
l1.pptx

Similar to turning test, how it works and winners.ppt (20)

PPTX
UNIT II ARTIFICIQL INTELLIGENCE SEARCH STRATEGIES OSMANIA UNIVERSITY
PPTX
introductioartificial intelligencen.pptx
PPTX
introduction technology technology tec.pptx
PDF
C1 into to ai
PPT
cloud computing and distributedcomputing
PPTX
PDF
Ai lecture 1
PPTX
Artificial intelligence(02)
PPTX
1.Introductiontrdrdtrresrrzrexrextrtrc.pptx
PPTX
introduction.pptx
PDF
Intro AI.pdf
PPTX
Chapter_1_Introductnvjygcgfxhgfxhfxhgfion.pptx
PDF
Presentation on the artificial intelligenc
PPT
Artificail Intelligent lec-1
PPTX
1.Introduction to AI.pptx.........................
PDF
Presentation of Intro to AI unit -3.pdf
PPTX
csc384-Lecture01-Introduction_abcdpdf_pdf_to_ppt.pptx
PPTX
AIArtificial intelligence (AI) is a field of computer science a
PPT
Artificial Intelligence
PPTX
AI_Unit_IARTIFICIAL INTELLIGENCE UNIT 1 OSMANIA UNIVERSITY
UNIT II ARTIFICIQL INTELLIGENCE SEARCH STRATEGIES OSMANIA UNIVERSITY
introductioartificial intelligencen.pptx
introduction technology technology tec.pptx
C1 into to ai
cloud computing and distributedcomputing
Ai lecture 1
Artificial intelligence(02)
1.Introductiontrdrdtrresrrzrexrextrtrc.pptx
introduction.pptx
Intro AI.pdf
Chapter_1_Introductnvjygcgfxhgfxhfxhgfion.pptx
Presentation on the artificial intelligenc
Artificail Intelligent lec-1
1.Introduction to AI.pptx.........................
Presentation of Intro to AI unit -3.pdf
csc384-Lecture01-Introduction_abcdpdf_pdf_to_ppt.pptx
AIArtificial intelligence (AI) is a field of computer science a
Artificial Intelligence
AI_Unit_IARTIFICIAL INTELLIGENCE UNIT 1 OSMANIA UNIVERSITY
Ad

More from MuhammadAbdullah311866 (20)

PDF
NVIDIA DGX User Group 1st Meet Up_30 Apr 2021.pdf
PPTX
GCCS-privacy-PP-final presentation-3-1.pptx
PPTX
presentationcloud-18123333331185718.pptx
PPTX
cybersecurity assessS-Ment-and-I(1).pptx
PPTX
Security-Monitoring-and-Improvement.pptx
PPTX
Responsibilities of the CSIRT--abss.pptx
PPTX
Fusion-Center-ITS-Security-and-Privacy-Operations (1).pptx
PDF
bash_1_2021-command line introduction.pdf
PPTX
framework_update_report-yer20170301.pptx
PPTX
cybersecurity_framework_webinar_2017.pptx
PPTX
package module in the python environement.pptx
PPTX
Supply-Chain-Management-and-Cloud-Security.pptx
DOCX
1-William Stallings - Effective Cybersecurity_ A Guide to Using Best Practice...
PPT
overview of principles of computerss.ppt
PPT
information security importance and use.ppt
PPT
implementing the encryption in the JAVA.ppt
PPT
compatibility and complexity in the IS.ppt
PPT
games, infosec, privacy, adversaries .ppt
PPT
Authentication Authorization-Lesson-2-Slides.ppt
PPTX
PTE-A Coaching- information slidess.pptx
NVIDIA DGX User Group 1st Meet Up_30 Apr 2021.pdf
GCCS-privacy-PP-final presentation-3-1.pptx
presentationcloud-18123333331185718.pptx
cybersecurity assessS-Ment-and-I(1).pptx
Security-Monitoring-and-Improvement.pptx
Responsibilities of the CSIRT--abss.pptx
Fusion-Center-ITS-Security-and-Privacy-Operations (1).pptx
bash_1_2021-command line introduction.pdf
framework_update_report-yer20170301.pptx
cybersecurity_framework_webinar_2017.pptx
package module in the python environement.pptx
Supply-Chain-Management-and-Cloud-Security.pptx
1-William Stallings - Effective Cybersecurity_ A Guide to Using Best Practice...
overview of principles of computerss.ppt
information security importance and use.ppt
implementing the encryption in the JAVA.ppt
compatibility and complexity in the IS.ppt
games, infosec, privacy, adversaries .ppt
Authentication Authorization-Lesson-2-Slides.ppt
PTE-A Coaching- information slidess.pptx
Ad

Recently uploaded (20)

PPTX
Cell Structure & Organelles in detailed.
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Pre independence Education in Inndia.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Business Ethics Teaching Materials for college
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
master seminar digital applications in india
PPTX
Institutional Correction lecture only . . .
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Insiders guide to clinical Medicine.pdf
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
Cell Structure & Organelles in detailed.
102 student loan defaulters named and shamed – Is someone you know on the list?
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Microbial disease of the cardiovascular and lymphatic systems
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Pre independence Education in Inndia.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
human mycosis Human fungal infections are called human mycosis..pptx
Business Ethics Teaching Materials for college
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Abdominal Access Techniques with Prof. Dr. R K Mishra
master seminar digital applications in india
Institutional Correction lecture only . . .
Supply Chain Operations Speaking Notes -ICLT Program
Insiders guide to clinical Medicine.pdf
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
2.FourierTransform-ShortQuestionswithAnswers.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
O5-L3 Freight Transport Ops (International) V1.pdf

turning test, how it works and winners.ppt

  • 2. “Can a machine think?” • Alan Turing asked this question in the 1950 article titled Computing Machinery and Intelligence • His answer was “Yes” • This led to the question "If a computer could think, how could we tell?" • Turing's suggestion: – if the responses from the computer were indistinguishable from that of a human, the computer could be said to be thinking.
  • 3. The Turing test • Turing proposed the following criterion in 1950 for deciding whether a computer is intelligent – A human holds a teletype conversation on any topic with an unseen correspondent – If the human believes he is talking to another human when he is really talking to a computer then the computer is deemed to be intelligent • Turing predicted that by the year 2000 a computer program would be able to fool the average questioner for five minutes about 70% of the time
  • 4. Chatterbots • A group of programs attempting to cross the language barrier between humans and computers were developed in an attempt to pass - or ridicule - Turing's test • Such programs are now known as Chatterbots – computer programs which simulate conversation with a user in a (written) natural language • The most famous such program, ELIZA, was published in 1966 by Joseph Weizenbaum from MIT in Communications of the ACM • ELIZA attempts to communicate in a natural language by engaging humans in conversation with a simulated Rogerian psychotherapist
  • 5. How ELIZA works • ELIZA simulates a conversation between psychiatrist and patient – stereotypical method: mirror the patient's feelings by repeating the input statements as questions • Looks for patterns of words in the input • Applies a series of pattern matching rules • Replies with predetermined output • Uses a very small database of words and phrases • ELIZA is relatively effective because it exploits the fact that humans read so much meaning into what is said – fools users into interpreting nonsense as conversation http://www.manifestation.com/neurotoys/eliza.php3 http://www.cs.duke.edu/courses/summer04/cps001/chatterbots/eliza.html
  • 6. The Loebner prize • The first formal instantiation of a Turing test • Implemented in 1991 by Dr. Hugh Loebner, a professor very much interested in seeing AI succeed – pledged $100,000 to the first computer (programmer) that could pass the test. • Each year an annual prize of $2000 and a bronze medal is awarded to the most human computer. – winner of the annual contest is best entry relative to other entries that year – irrespective of how good it is in an absolute sense. http://www.loebner.net/Prizef/loebner-prize.html
  • 7. Loebner prize winners & more bots • 1991 Loebner Prize winner Joseph Weintraub – PC Therapist • 2001 Loebner Prize winner Richard Wallace http://alicebot.org • 2003 Loebner Prize winner Juergen Pirner http://www.abenteuermedien.de/jabberwock • Sites for all things Chatterbot: http://www.simonlaven.com http://www.botspot.com/pages/chatbots.html
  • 8. Validity of the Turing test? • Supporters – human-like interaction is seen as essential to human- like intelligence • Opponents – test is neither necessary nor sufficient for intelligence – what is important is that the computer demonstrates cognitive ability regardless of its behavior – not necessary for program to speak for it to be intelligent – there are humans that would fail the Turing test – there are unintelligent computers that might pass
  • 9. The origins of AI • Alan Turing proposed that machines could be programmed to exhibit intelligent behavior in 1950 • John McCarthy gave the name artificial intelligence to the field in his 1956 proposal to explore – “the conjecture that every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it”
  • 10. What is intelligence? • Intelligence is the computational part of the ability to achieve goals in the world – varying degrees of intelligence occur in people, many animals and some machines • The ultimate effort is to make computer programs that can solve problems and achieve goals in the world as well as humans http://www-formal.stanford.edu/jmc/whatisai/
  • 11. Reasoning • If we are to build machines that are able to perform complex tasks without human intervention, we must make them more humanlike in the sense that they must possess or at least simulate the ability to reason • How can machines be programmed to simulate reasoning? Is it possible? • Adversary’s argument: – it is impossible to write down formal rules for every situation • Alan Turing says: – it is scientifically impossible to prove that people are not driven by rules
  • 12. Reasoning • Making a conclusion or logical judgment on the basis of circumstantial evidence and prior conclusions rather than on the basis of direct observation • Program a computer to represent conclusions as states • The ultimate conclusion or judgment is called the goal • Process of reasoning can be viewed as searching the space of all possible states to find path or sequence of actions from the initial state to the goal • Based on observation of current state (and possibly prior states) select some new goal state it wishes to achieve and devise a strategy for achieving it
  • 13. Methods for reasoning • Start at initial state and systematically consider possible actions and reason forward toward the goal • Reason backwards from the goal state • Identify subgoals – goal cannot be achieved until certain a subgoal is reached, where that subgoal depends upon some previous achievement • Distance measures – estimate how close moving to a particular state will bring you to the goal
  • 14. Search • Many structures are used to model the abstract nature of search – search states, search spaces, search trees • There are many search algorithms • Search algorithms are one of two types – complete or exhaustive • guaranteed to find solution or prove there is none – incomplete • may not find a solution even when it exists • often more efficient than complete search – else there would be no reason to use them
  • 15. Search states • Search states summarize information about the current state of the search • The goal state is a special instance of a search state – contains complete information – gives the solution to the problem • In general, a search state other than the goal – provides partial information only – will not solve the problem – may not even extend to the solution
  • 16. Search in AI • Search states allow us to generalize search • Do not view search is as just a process to reach the goal • Instead we seek a solution or subgoal to extend our current search state – increase distance on path from some other state – there may be no such solution along the current path, even if the overall problem is solvable • Original search problem is to extend the initial state • Most search in AI performed by structured exploration of search states
  • 17. Search space • Search space is an abstract logical space composed of nodes and links (edges) – nodes represent the search states – edges are all legal connections between search states • Search algorithms are well-defined instructions for navigating the search space
  • 18. Search trees • Search trees are an abstraction of one possible search • Root node is the initial state • Leaves represent all possible solutions and failures • All other nodes represent states in between • Edges represent actions – consider two nodes X, Y and edge E between them – state Y is the consequence of performing action E while in state X • Child nodes represent extensions – children of a node give all possible consequences of moving forward from that node X Y E
  • 19. Tic-Tac-Toe • The first player is X and the second is O • Object of game: get three of your symbol in a horizontal, vertical or diagonal row on a 33 game board • X always goes first • Players alternate placing Xs and Os on the game board • Game ends when a player has three in a row (a wins) or all nine squares are filled (a draw)
  • 20. Partial search tree for Tic-Tac-Toe • Impossible to draw entire tree • 9! = 362,880 possible states
  • 21. Frontier • Search trees are a useful concept in theory • In practice, search algorithms do not compute and store the entire search tree – requires exponential time/space – we can discard nodes we already explored – we can discard nodes we will never use • Search algorithms store frontier of search – nodes in search tree with unexplored children • Many search algorithms are easy to understand in terms of search trees and how they explore the frontier
  • 22. Classic search algorithms • Breadth-first search • Depth-first search • Best-first search • Depth-bounded depth-first search • Iterative deepening search
  • 23. Breadth-first search • Explore all nodes at one height in tree before any other nodes • Always move to shallowest and leftmost node in the frontier 1 6 3 12 13 7 14 15 4 2 8 9 5 10 11 16 17 18 19 21 20
  • 24. Depth-first search • Explore all nodes in subtree of current node before any other nodes • Always move to leftmost and deepest node in the frontier • Tree must be finite 1 15 14 16 17 19 20 21 3 2 4 7 8 9 10 5 6 11 12 13 18
  • 25. Complete or incomplete search? • Breadth-first and depth-first search are complete – exhaustively search the tree – guaranteed to find the goal (if it exists) • Depth-bounded and iterative deepening searches are incomplete search algorithms based on depth-first search – Depth-bounded depth-first search • set limit on depth of search in tree – Iterative deepening search • use depth-bounded search but increase limit as search progresses
  • 26. Best-first search • What if the system has some knowledge about how to find the goal, and selects its search in the direction of the earliest possible achievement of the goal? – enables the search to move as quickly as possible in the direction of the goal • Best-first search – pick whichever element of frontier seems most promising • Information given to the system may or may not help in finding the solution – best-first search is an incomplete search
  • 27. What is “best”? • Best-first search builds tree by pursuing the more promising paths to greater depths and consider alternate paths only if our current path leads to a failure state – strategic search – similar to the process a human would follow – follow option that appears best rather than pursing all possible options at once • How does one judge which option is most promising? – intuition, reasoning, … • How does one program a computer to judge which option is most promising?
  • 28. Heuristics • General definition – educated guess that reduces or limits the search for solutions in spaces that are complex and poorly understood • In CS terms – quantitative value associated with each state that attempts to characterize the distance from that state to the nearest goal • Value to minimize cost or maximize gain • Given a choice between two or more states the one with the smallest cost (or largest gain) is the one representing the direction we should pursue
  • 29. Why do we use heuristics? • Required when problems have many solutions and performing an exhaustive search would be near impossible • We can perform an exhaustive search for Tic-Tac-Toe – 9! = 362,880 states • Not practical for games like checkers ( 1040 states) , chess ( 10 120 states) or Go (361!  10750 states) • However … – heuristics have no theoretical guarantee! • solution not necessarily optimal or even feasible
  • 30. Good heuristics • Good heuristics should have the following characteristics – give a reasonable estimate of the amount of work required to reach the associated solution state • provides meaningful information when selecting among options • the better the estimate given by the heuristic, the better the decisions made based on that information will be – easy to compute • use of the heuristic should not become a burden to the search process (i.e. slow it down completely)