Kevin Mason Michael Suggs

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

Adversarial Search Reference: “Artificial Intelligence: A Modern Approach, 3 rd ed” (Russell and Norvig)
Techniques for Dealing with Hard Problems Backtrack: –Systematically enumerates all potential solutions by continually trying to extend a partial solution.
For Friday Finish chapter 5 Program 1, Milestone 1 due.
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2008.
Game Playing (Tic-Tac-Toe), ANDOR graph By Chinmaya, Hanoosh,Rajkumar.
Lecture 12 Last time: CSPs, backtracking, forward checking Today: Game Playing.
Search Strategies.  Tries – for word searchers, spell checking, spelling corrections  Digital Search Trees – for searching for frequent keys (in text,
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
This time: Outline Game playing The minimax algorithm
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)
ICS-271:Notes 6: 1 Notes 6: Game-Playing ICS 271 Fall 2006.
Adversarial Search and Game Playing Examples. Game Tree MAX’s play  MIN’s play  Terminal state (win for MAX)  Here, symmetries have been used to reduce.
Adversarial Search: Game Playing Reading: Chess paper.
Game Playing: Adversarial Search Chapter 6. Why study games Fun Clear criteria for success Interesting, hard problems which require minimal “initial structure”
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.
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.
Search CSE When you can’t use A* Hill-climbing Simulated Annealing Other strategies 2 person- games.
Space Complexity. Reminder: P, NP classes P NP is the class of problems for which: –Guessing phase: A polynomial time algorithm generates a plausible.
Connect Four AI Robert Burns and Brett Crawford. Connect Four  A board with at least six rows and seven columns  Two players: one with red discs and.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
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.
Adversarial Search Chapter Games vs. search problems "Unpredictable" opponent  specifying a move for every possible opponent reply Time limits.
ARTIFICIAL INTELLIGENCE (CS 461D) Princess Nora University Faculty of Computer & Information Systems.
Will Britt and Bryan Silinski
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 and Game Playing Russell and Norvig: Chapter 6 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2004/home.htm Prof: Dekang.
Space Complexity. Reminder: P, NP classes P is the class of problems that can be solved with algorithms that runs in polynomial time NP is the class of.
Parallel Programming in Chess Simulations Part 2 Tyler Patton.
February 25, 2016Introduction to Artificial Intelligence Lecture 10: Two-Player Games II 1 The Alpha-Beta Procedure Can we estimate the efficiency benefit.
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 Decisions in games Minimax algorithm  -  algorithm Tic-Tac-Toe game Decisions in games Minimax algorithm  -  algorithm Tic-Tac-Toe game.
Adversarial Search Chapter Two-Agent Games (1) Idealized Setting – The actions of the agents are interleaved. Example – Grid-Space World – Two.
Game Playing Why do AI researchers study game playing?
Adversarial Search and Game-Playing
Announcements Homework 1 Full assignment posted..
By: Casey Savage, Hayley Stueber, and James Olson
BackTracking CS255.
Last time: search strategies
Depth-First Search N-Queens Problem Hamiltonian Circuits
Iterative Deepening A*
PENGANTAR INTELIJENSIA BUATAN (64A614)
Games and adversarial search (Chapter 5)
Adversarial Search and Game Playing (Where making good decisions requires respecting your opponent) R&N: Chap. 6.
Pengantar Kecerdasan Buatan
AlphaGo with Deep RL Alpha GO.
Game Playing.
Dakota Ewigman Jacob Zimmermann
Game Playing in AI by: Gaurav Phapale 05 IT 6010
Artificial Intelligence
Artificial Intelligence Chapter 12 Adversarial Search
Game playing.
Chapter 6 : Game Search 게임 탐색 (Adversarial Search)
Announcements Homework 3 due today (grace period through Friday)
NIM - a two person game n objects are in one pile
Artificial Intelligence
The Alpha-Beta Procedure
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
Search and Game Playing
Minimax strategies, alpha beta pruning
Artificial Intelligence
Adversarial Search and Game Playing Examples
Adversarial Search CMPT 420 / CMPG 720.
Adversarial Search CS 171/271 (Chapter 6)
Games & Adversarial Search
Minimax strategies, alpha beta pruning
CS51A David Kauchak Spring 2019
Unit II Game Playing.
Minimax Trees: Utility Evaluation, Tree Evaluation, Pruning
Presentation transcript:

Kevin Mason Michael Suggs DOUBLE TAP TO ADD TITLE Kevin Mason Michael Suggs

Background Two player connection game Red / yellow (or black) “pucks” First player with 4 of their colour in a row wins Can be either horizontal, vertical, or diagonal Board mutation after placement is not allowed

Natural Language Given a pre-set 6x7 board, overall effectiveness of each algorithm will be calculated to produce maximal winning combinations whilst minimizing time, space and number of moves against an opponent.

Formal Statement Ea= 𝑋 𝑛 𝑛 Xn=( 𝑖=0 𝑛 (.25𝑤 + .25 1 𝑡 + .25 1 𝑠 +.25𝑚) ) Ea = Calculated Effectiveness of each algorithm Xn = Calculated sum of observed terms n = Number of runs t = Running time s = Space utilization m = Number of moves w = Number of successful wins for the algorithm

Implementation Each algorithm was tested against a randomized opponent Used our win check method to see if 2+ in a row Otherwise, placed randomly through the columns Board was pre-set with a variable number of pieces Ran with a depth restriction of 4/5/6 for 12/18/24 pieces Algorithms implemented on a 2D representation of a Connect 4 Board

Algorithms Brute Force Greedy MiniMax Alpha-Beta Pruning

Brute Force Looks at all past moves If multiple are in a row, then a move will be placed Tries to find locations where more than one are in sequence If none are in sequence, then a random column is chosen

Greedy Looked around at all possible moves from its current location Checked both its moves and its opponents moves Determines which move would be best at that location Based on local values directly accessible from its location Looking for locally optimal move

MiniMax Given a depth restriction Game tree algorithm that maps potential board states to nodes “Plays itself” to determine which moves will most likely result in a win against a perfect opponent before placing a move Scores the outcome of each node Maximize player score and minimize opponent score Each depth level represents a different player Max Nodes vs. Min Nodes Given a depth restriction

Alpha-Beta Pruning Pruning Alpha represents upper limit Utilizes a game tree Gives bounds to searching, improving efficiency Released depth restriction Pruning Alpha represents upper limit Beta represents lower limit Branch is terminated once a bound is crossed

Depth: 4

Depth: 6

MiniMax vs. Alpha-Beta Children (D: 4)

MiniMax vs. Alha-Beta Children (D:6)

Efficiency (D: 4 – P:18)

Efficiency (D: 6 – P: 18)

Algorithm Analysis MiniMax 𝑂 𝑏∗𝑏∗…∗𝑏 𝑑 =O( 𝑏 𝑑 ) : time b: number of legal moves d: depth of the search tree Alpha-Beta Pruning O 𝑏 𝑑 2 O( 𝑏 𝑑 ) at worst Greedy 𝑂(𝑏+𝑚) m: number of played moves Brute Force 𝑂(𝑚)

Future Work Running algorithms against each other Algorithms run with the presumption of perfection Add the possibility for human interaction How would our algorithm fare against a human opponent? Implement these algorithms on Connect 4 variants Look into our other possible algorithms E.g./ Proof Number Search, Monte Carlo

Questions Q: How does our greedy algorithm approach the problem? A:

Questions Q: How does our greedy algorithm approach the problem? A: It checks all the possible move locations directly accessible to it and the opponent and applies each a value. Once all immediately accessible nodes have been checked, the move with the most benefit to the algorithm is selected.

Questions Q: How does MiniMax generate moves? A:

Questions Q: How does MiniMax generate moves? A: Generates a tree of all possible moves from the selected node and all nodes following it. Simulates a game with itself until the end (or the depth limit) is reached, in which it returns the scoring of the nodes in the tree to that point. Then, the maximal or minimal value is selected and played.

Questions Q: What technique does Alpha-Beta utilize to reduce its search space? A:

Questions Q: What technique does Alpha-Beta utilize to reduce its search space? A: Branch-and-Bound. Once a branch crosses either of the determined bounds, then it is pruned. Bounds are determined by the calculated maximum or minimum value of a node, depending on the current player (maximizing vs. minimizing).

Why 380? Designed and implemented our own modified algorithm Analyzed algorithms we implemented Concluding Thoughts