CS-424 Gregory Dudek Lecture 10 Annealing (final comments) Adversary Search Genetic Algorithms (genetic search)

Slides:



Advertisements
Similar presentations
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.
Advertisements

For Friday Finish chapter 5 Program 1, Milestone 1 due.
CMSC 671 Fall 2001 Class #8 – Thursday, September 27.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
CS 484 – Artificial Intelligence
Search in AI.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Games CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Lecture 13 Last time: Games, minimax, alpha-beta Today: Finish off games, summary.
1 Using Search in Problem Solving Part II. 2 Basic Concepts Basic concepts: Initial state Goal/Target state Intermediate states Path from the initial.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
1 Game Playing Chapter 6 Additional references for the slides: Luger’s AI book (2005). Robert Wilensky’s CS188 slides:
Game Playing CSC361 AI CSC361: Game Playing.
Optimization via Search CPSC 315 – Programming Studio Spring 2009 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
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)
Find a Path s A D B E C F G Heuristically Informed Methods  Which node do I expand next?  What information can I use to guide this.
Review Best-first search uses an evaluation function f(n) to select the next node for expansion. Greedy best-first search uses f(n) = h(n). Greedy best.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
CSC344: AI for Games Lecture 4: Informed search
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
Optimization via Search CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 4 Adapted from slides of Yoonsuck Choe.
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
CSC 412: AI Adversarial Search
Game Trees: MiniMax strategy, Tree Evaluation, Pruning, Utility evaluation Adapted from slides of Yoonsuck Choe.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning CPSC 315 – Programming Studio Spring 2008 Project 2, Lecture 2 Adapted from slides of Yoonsuck.
Lecture 5 Note: Some slides and/or pictures are adapted from Lecture slides / Books of Dr Zafar Alvi. Text Book - Aritificial Intelligence Illuminated.
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
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.
Game Playing.
AD FOR GAMES Lecture 4. M INIMAX AND A LPHA -B ETA R EDUCTION Borrows from Spring 2006 CS 440 Lecture Slides.
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.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Notes on Game Playing by Yun Peng of theYun Peng University of Maryland Baltimore County.
For Wednesday Read Weiss, chapter 12, section 2 Homework: –Weiss, chapter 10, exercise 36 Program 5 due.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
For Wednesday Read chapter 7, sections 1-4 Homework: –Chapter 6, exercise 1.
Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.
Quiz 4 : Minimax Minimax is a paranoid algorithm. True
Lecture 3: Uninformed Search
CSCI 4310 Lecture 6: Adversarial Tree Search. Book Winston Chapter 6.
For Friday Finish chapter 6 Program 1, Milestone 1 due.
GAME PLAYING 1. There were two reasons that games appeared to be a good domain in which to explore machine intelligence: 1.They provide a structured task.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
Game Playing Revision Mini-Max search Alpha-Beta pruning General concerns on games.
Today’s Topics Playing Deterministic (no Dice, etc) Games –Mini-max –  -  pruning –ML and games? 1997: Computer Chess Player (IBM’s Deep Blue) Beat Human.
CSE373: Data Structures & Algorithms Lecture 23: Intro to Artificial Intelligence and Game Theory Based on slides adapted Luke Zettlemoyer, Dan Klein,
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Game-playing AIs Part 2 CIS 391 Fall CSE Intro to AI 2 Games: Outline of Unit Part II  The Minimax Rule  Alpha-Beta Pruning  Game-playing.
Graph Search II GAM 376 Robin Burke. Outline Homework #3 Graph search review DFS, BFS A* search Iterative beam search IA* search Search in turn-based.
Adversarial Search 2 (Game Playing)
Artificial Intelligence in Game Design Board Games and the MinMax Algorithm.
Chapter 5 Adversarial Search. 5.1 Games Why Study Game Playing? Games allow us to experiment with easier versions of real-world situations Hostile agents.
Search: Games & Adversarial Search Artificial Intelligence CMSC January 28, 2003.
1 Chapter 6 Game Playing. 2 Chapter 6 Contents l Game Trees l Assumptions l Static evaluation functions l Searching game trees l Minimax l Bounded lookahead.
Adversarial Search and Game-Playing
Announcements Homework 1 Full assignment posted..
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Artificial Intelligence (CS 370D)
Games with Chance Other Search Algorithms
Chapter 6 : Game Search 게임 탐색 (Adversarial Search)
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
More on Search: A* and Optimization
Game Playing Fifth Lecture 2019/4/11.
Lecture 9 Administration Heuristic search, continued
Search.
Search.
Games & Adversarial Search
Minimax strategies, alpha beta pruning
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

CS-424 Gregory Dudek Lecture 10 Annealing (final comments) Adversary Search Genetic Algorithms (genetic search)

CS-424 Gregory Dudek Comments on Assignment 2 Who’s gotten started? JAVA has a class for calling C functions. –See SUN’s java 1.1 web page. It’s open ended. Give yourself time to ponder. What are good heuristics. –Things in the URL? –Things in the page content of the “current node”? –Things in the content of the destination URL? Tricks are important. –(This is typical of AI in practice). Measure your performance. –This is always important! Do it scientifically. Try easy stuff first. –A good general rule.

CS-424 Gregory Dudek A comment On minimal length paths…. The Dynamic-Programming Principle [Winston]: “The best way through a particular, intermediate place is the best way to it from the starting place, followed by the best way from it to the goal. There is no need to look at any other paths to or from the intermediate place.” A variation on the A* theme called dynamic programming. Use the h instead of h’ and efficiently compute true path costs.

CS-424 Gregory Dudek Simulated Annealing Initially act more randomly. As time passes, we assume we are doing better and act less randomly. Analogy: associate each state with an energy or “goodness”. Specifics: –Pick a random successor s 2 to the current state s 1. –Compute ∂E = energy(s 2 ) - energy(s 1 ). –If ∂E good (positive) go to the new state. –If ∂E bad (negative), still take it sometime¨, with probability e ( ∂E/T ) Annealing schedule specifies how to change T over time.

CS-424 Gregory Dudek Adversary Search Basic formalism 2 players. Each has to beat the other (competing objective functions). Complete information. Alternating moves for the 2 players.

CS-424 Gregory Dudek The players Players want to achieve “opposite” goals: –What’s bad for A is good for B, and vice versa. With respect to our static evaluation functions, one wants to maximize the function, the other wants to minimize it. Use a game tree to describe the state space. Approach: MINIMAX procedure.

CS-424 Gregory Dudek Game Tree Nodes represent board configurations. Edges represent allowed moves from one configuration to another. For most 2-player games, alternating levels in the tree refer to alternating moves by the 2 players. Static evaluation function measures the (apparent) goodness of a given configuration. –Returns a signed value, to indicate goodness for the minimizing or maximizing player.

CS-424 Gregory Dudek See overhead (based on RN Figure )

CS-424 Gregory Dudek MINIMAX If the limit of search has been reached, compute the static value of the current position relative to the appropriate player. Return the result Otherwise, use MINIMAX on the children of the current position. –If the level is a minimizing level, return the minimum of the results –If the level is a maximizing layer, return the maximum of the results.

CS-424 Gregory Dudek MINIMAX observations The static evaluation function is… –Crucial: all decisions are eventually based of the value it returns. –Irrelevant: if we search to the end of the game, we always know the outcome. In practice, if same has a large search space then the static evaluation is especially important.

CS-424 Gregory Dudek Minimax Divide tree into plies Propagate information up from terminal nodes. Storage needs grow exponentially with depth.

CS-424 Gregory Dudek Alpha-Beta Search Can we avoid all the search-tree expansion implicit in MINIMAX? Yes, with a simple observation closely related to A * : Once you have found a good path, you only need to consider alternative paths that are better than that one. See example….

CS-424 Gregory Dudek The  “    ” ” 

CS-424 Gregory Dudek The  principle. “If you have an idea that is surely bad, do not take time to see how truly awful it is.” [Winston]

CS-424 Gregory Dudek  cutoff: How good is it? What is the best-case improvement for alpha-beta? What is the worst-case improvement for alpha-beta? Best case: only examine one leftmost “pre-terminal” nodes fully. Worst-case: –For some trees, it won’t help at all. –For some trees, even though it could help, it might not help if the nodes are encountered in the wrong order. Not in text

CS-424 Gregory Dudek Progressive deepening How do you deal with (potential) time pressure? Search progressively deeper: first depth 1, then depth 2, etc. As before, ratio of interior to leaf nodes is b d (b-1)/(b d -1) or roughly (b-1) [so if b=30, it only takes 1/30th extra time to do the progressive part of progressive deepening] Not in text

CS-424 Gregory Dudek Tricks Several techniques have proven important in practice. Many critical techniques lead to improvements that have no importance in terms of worst-case asymptotic complexity. Transposition tables Cache positions and their eventual outcome. Is a position re-occurs, don’t need to reevaluate it, since the information is in cache.

CS-424 Gregory Dudek Issues Horizon effect Search-until-quiescent heuristic Singular-extension heuristic Not in text

CS-424 Gregory Dudek Next major topic: LEARNING First, a transitional problem. How can we do hill climbing in a space of –representations ? –programs ? –entire systems ? e.g. Find the best program for (small) problem X. Find the best settings for the knowb on a refinery. Find the best LOGO program for a picture. Find the best organism encoded as DNA.

CS-424 Gregory Dudek GA’s Genetic Algorithms Cool, novel, controversial, costly (?), powerful (?). Inspired by real evolution. Idea: Encode the problem as a string. For example, a character string on a restricted alphabet. Define a fitness function.

CS-424 Gregory Dudek GA’s Define a population of strings to encode a set of alternative solutions to a problem. Now, we want to keep good solutions and improve them. Add operators for: –mixing strings –randomly changing strings Add an algorithm to repeatedly select the best, add variations, and evaluate.

CS-424 Gregory Dudek GA’s Genetic Algorithms Plastic transparencies & blackboard.