Graphs and Search other searches in addition to breadth-first/depth-first search in game trees search in optimization problems shortest path from vertex.

Slides:



Advertisements
Similar presentations
CS 206 Introduction to Computer Science II 11 / 07 / 2008 Instructor: Michael Eckmann.
Advertisements

Graph Theory - I. Today’s Plan Introduction Special Graphs Various Representations Depth First Search Solve a problem from GCJ Breadth First Search Solve.
A Knight’s Tour A decision problem. A Legal Move Can only move 1 x 2...Or 2 x 1.
CompSci 100e Program Design and Analysis II March 3, 2011 Prof. Rodger CompSci 100e, Spring
November 10, 2009Introduction to Cognitive Science Lecture 17: Game-Playing Algorithms 1 Decision Trees Many classes of problems can be formalized as search.
Using Search in Problem Solving
CS 206 Introduction to Computer Science II 03 / 30 / 2009 Instructor: Michael Eckmann.
CISC220 Fall 2009 James Atlas Nov 13: Graphs, Line Intersections.
Backtracking.
CS261 Data Structures DFS and BFS – Edge List Representation.
Busby, Dodge, Fleming, and Negrusa. Backtracking Algorithm Is used to solve problems for which a sequence of objects is to be selected from a set such.
Artificial Intelligence Lecture 9. Outline Search in State Space State Space Graphs Decision Trees Backtracking in Decision Trees.
Development of a Machine-Learning-Based AI For Go By Justin Park.
Lecture 5: Backtracking Depth-First Search N-Queens Problem Hamiltonian Circuits.
Dijkstra’s Algorithm. Announcements Assignment #2 Due Tonight Exams Graded Assignment #3 Posted.
Exact methods for ALB ALB problem can be considered as a shortest path problem The complete graph need not be developed since one can stop as soon as in.
Game Playing. Towards Intelligence? Many researchers attacked “intelligent behavior” by looking to strategy games involving deep thought. Many researchers.
Lecture 3: Uninformed Search
Michael Walker. From Maps to Graphs  Make Intersections Vertices  Make Roads Edges  Result is Weighted Directed Graph  Weights: Speed Limit Length.
Breadth First Search and Depth First Search. Greatest problem in Computer Science Has lead to a lot of new ideas and data structures Search engines before.
Searches Algorithms for Exploration. Graphs Graphs represent spatial data How do I get from Augsburg to Wurzburg?
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.
CompSci Backtracking, Search, Heuristics l Many problems require an approach similar to solving a maze ä Certain mazes can be solved using the.
CPS Backtracking, Search, Heuristics l Many problems require an approach similar to solving a maze ä Certain mazes can be solved using the “right-hand”
Best-first search is a search algorithm which explores a graph by expanding the most promising node chosen according to a specified rule.
CSE 326: Data Structures Lecture #17 Heuristic Graph Search Henry Kautz Winter Quarter 2002.
Representing Graphs Depth First Search Breadth First Search Graph Searching Algorithms.
Game playing Types of games Deterministic vs. chance
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
Backtracking, Search, Heuristics
CSE 214 – Computer Science II Maps
Data Structures Lab Algorithm Animation.
Depth-First Search N-Queens Problem Hamiltonian Circuits
Done Done Course Overview What is AI? What are the Major Challenges?
Pengantar Kecerdasan Buatan
Hamiltonian Graphs Graphs Hubert Chan (Chapter 9.5)
Artificial Intelligence (CS 370D)
Types of Algorithms.
Depth First Search—Backtracking
Algorithms for Exploration
CSC 172 DATA STRUCTURES.
Breadth First Search 11/21/ s
Problem Solving and Searching
CSE 4705 Artificial Intelligence
Problem Solving and Searching
Graphs Part 2 Adjacency Matrix
Graphs – Adjacency Matrix
Search Exercise Search Tree? Solution (Breadth First Search)?
CSE (c) S. Tanimoto, 2001 Search-Introduction
Blay Whitby 2003 Search Blay Whitby 2003
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.
Presented By: David Miller
CO Games Development 1 Week 8 Depth-first search, Combinatorial Explosion, Heuristics, Hill-Climbing Gareth Bellaby.
(1) Breadth-First Search  S Queue S
Algorithms Lecture # 29 Dr. Sohail Aslam.
Breadth First Search s
Backtracking and Branch-and-Bound
Chap 4: Searching Techniques
CSE (c) S. Tanimoto, 2002 State-Space Search
Informed Search Idea: be smart about what paths to try.
Breadth First Search s
Spanning Trees Lecture 20 CS2110 – Spring 2015.
CSE (c) S. Tanimoto, 2004 State-Space Search
Backtracking, Search, Heuristics
Informed Search Idea: be smart about what paths to try.
Search Strategies CMPT 420 / CMPG 720.
Lecture 4: Tree Search Strategies
Backtracking, Search, Heuristics
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Graphs and Search other searches in addition to breadth-first/depth-first search in game trees search in optimization problems shortest path from vertex a to vertex b (or all vertices) consider Deep Blue (chess-playing computer, beat Kasparov) specialized hardware lots of application-specific knowledge searched/analyzed 200,000,000 moves/sec (compared to Kasparov 3 moves/sec)

backtracking search: Knight’s Tour Knight backtracking place a knight on an NxN chessboard, have the knight move, try to cover all squares on the board idea: try each possible square if square leads to a solution stop otherwise try another square Key Concepts: tentatively try a move undo the move if it doesn’t work 2 1 3 4 5 1 6 3 4 8 7 2 5

Backtracking and Heuristic Search Lots of possible moves, general schema is similar to depth first search keep going looking for a solution, if a path doesn’t work then back up, try again down another path Heuristic Search order the moves according to a rule-of-thumb try the moves “best-first” priority queues are useful for storing potential moves

Code Issues templated classes functions need access to template source, problem with .h and .cc Solutions to template problem use #include “foo.cc” from foo.h (may need -frepo) write all functions inline, part of foo.h template <class Kind> class Foo { void getVal(){return myVal;} } use explicit instantiation: template class PQueue<string,int>;