Artificial Intelligence Search and Heuristics. “Can a machine think?” Alan Turing asked this question in the 1950 article titled Computing Machinery and.

Slides:



Advertisements
Similar presentations
The Development of AI St Kentigerns Academy Unit 3 – Artificial Intelligence.
Advertisements

Artificial Intelligence Presentation
Adversarial Search We have experience in search where we assume that we are the only intelligent being and we have explicit control over the “world”. Lets.
October 1, 2012Introduction to Artificial Intelligence Lecture 8: Search in State Spaces II 1 A General Backtracking Algorithm Let us say that we can formulate.
Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
Part2 AI as Representation and Search
Problem Solving Agents A problem solving agent is one which decides what actions and states to consider in completing a goal Examples: Finding the shortest.
Branch & Bound Algorithms
Chapter 4 Search Methodologies.
CSC 423 ARTIFICIAL INTELLIGENCE
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
September 26, 2012Introduction to Artificial Intelligence Lecture 7: Search in State Spaces I 1 After our “Haskell in a Nutshell” excursion, let us move.
Heidi Newton Peter Andreae Artificial Intelligence.
Learning Objectives Explain similarities and differences among algorithms, programs, and heuristic solutions List the five essential properties of an algorithm.
Best-First Search: Agendas
Problem Solving and Search in AI Part I Search and Intelligence Search is one of the most powerful approaches to problem solving in AI Search is a universal.
Mahgul Gulzai Moomal Umer Rabail Hafeez
November 10, 2009Introduction to Cognitive Science Lecture 17: Game-Playing Algorithms 1 Decision Trees Many classes of problems can be formalized as search.
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
1 search CS 331/531 Dr M M Awais A* Examples:. 2 search CS 331/531 Dr M M Awais 8-Puzzle f(N) = g(N) + h(N)
Robotics Versus Artificial Intelligence. Search. SearchSearch “All AI is search” “All AI is search”  Game theory  Problem spaces Every problem is a.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
Building Knowledge-Driven DSS and Mining Data
Backtracking.
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
State-Space Searches.
Artificial Intelligence
Intelligence & Artificial Intelligence You must have a pre-prepared sentence or two to spout about what is a description of intelligence.. And what is.
Lecture 5 Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
The Turing Test Jen Brandner for CSCI 405 Conversational AI and the Loebner Prize Competition.
Artificial Intelligence Dr. Paul Wagner Department of Computer Science University of Wisconsin – Eau Claire.
CSCI 4410 Introduction to Artificial Intelligence.
Artificial Intelligence Introduction (2). What is Artificial Intelligence ?  making computers that think?  the automation of activities we associate.
Artificial Intelligence Lecture 9. Outline Search in State Space State Space Graphs Decision Trees Backtracking in Decision Trees.
Reduction Episode 9 0 The operation of reduction and the relation of reducibility Examples of reductions The variety of reduction concepts and their systematization.
Artificial Intelligence Introductory Lecture Jennifer J. Burg Department of Mathematics and Computer Science.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 1.2 Introduction to Algorithms.
1 Artificial Intelligence GholamReza GhassemSani Fall 1383.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Game Playing. Towards Intelligence? Many researchers attacked “intelligent behavior” by looking to strategy games involving deep thought. Many researchers.
Artificial Intelligence Bodies of animals are nothing more than complex machines - Rene Descartes.
CS 415 – A.I. Slide Set 5. Chapter 3 Structures and Strategies for State Space Search – Predicate Calculus: provides a means of describing objects and.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
How Solvable Is Intelligence? A brief introduction to AI Dr. Richard Fox Department of Computer Science Northern Kentucky University.
1 Introduction to Artificial Intelligence (Lecture 1)
For Monday Read chapter 4, section 1 No homework..
Introduction to Artificial Intelligence CS 438 Spring 2008 Today –AIMA, Chapter 1 –Defining AI Next Tuesday –Intelligent Agents –AIMA, Chapter 2 –HW: Problem.
Basic Problem Solving Search strategy  Problem can be solved by searching for a solution. An attempt is to transform initial state of a problem into some.
Ricochet Robots Mitch Powell Daniel Tilgner. Abstract Ricochet robots is a board game created in Germany in A player is given 30 seconds to find.
Knowledge Search CPTR 314.
Chapter 10 Algorithmic Thinking. Learning Objectives Explain similarities and differences among algorithms, programs, and heuristic solutions List the.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Search in State Spaces Problem solving as search Search consists of –state space –operators –start state –goal states A Search Tree is an efficient way.
A Brief History of AI Fall 2013 COMP3710 Artificial Intelligence Computing Science Thompson Rivers University.
Solving problems by searching A I C h a p t e r 3.
February 18, 2016Introduction to Artificial Intelligence Lecture 8: Search in State Spaces III 1 A General Backtracking Algorithm Sanity check function.
G5AIAI Introduction to AI
#1 Make sense of problems and persevere in solving them How would you describe the problem in your own words? How would you describe what you are trying.
CSCE 552 Fall 2012 AI By Jijun Tang. Homework 3 List of AI techniques in games you have played; Select one game and discuss how AI enhances its game play.
Understanding AI of 2 Player Games. Motivation Not much experience in AI (first AI project) and no specific interests/passion that I wanted to explore.
Introduction Artificial Intelligent.
Artificial Intelligence (Lecture 1)
Haskell Tips You can turn any function that takes two inputs into an infix operator: mod 7 3 is the same as 7 `mod` 3 takeWhile returns all initial.
COMP3710 Artificial Intelligence Thompson Rivers University
Search.
Search.
Unit II Game Playing.
Presentation transcript:

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

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.

Loebner prize winners & more bots 1991 Loebner Prize winner Joseph Weintraub –PC Therapist 2001 Loebner Prize winner Richard Wallace Loebner Prize winner Juergen Pirner Sites for all things Chatterbot:

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

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

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

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 (  states), chess (  states) or Go (361!  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)