Connect Four Michelle Chen Felix Chung Annabel Hung Raymond Wong.

Slides:



Advertisements
Similar presentations
A Case Study  Some Advice on How to Go about Solving Problems in Prolog  A Program to Play Connect-4 Game.
Advertisements

Martin Boyd Christopher Hirunthanakorn
AI for Connect-4 (or other 2-player games) Minds and Machines.
Us vs. It. Tanks vs. Robot ● Cooperative “Boss Fight” ● Tank players must destroy the Robot before it reaches the city limits. ● Robot is controlled by.
TIC-TAC-TOE FELIX CHEN CLUSTER 5: Computers in Biophysics and Robotics.
Microsoft® Small Basic Advanced Games Estimated time to complete this lesson: 1 hour.
Tutorial 6 of CSCI2110 Bipartite Matching Tutor: Zhou Hong ( 周宏 )
Class Project Due at end of finals week Essentially anything you want, so long as it’s AI related and I approve Any programming language you want In pairs.
Minimax and Alpha-Beta Reduction Borrows from Spring 2006 CS 440 Lecture Slides.
Place captured red pieces here Place captured yellow pieces here To use as Kings Rules New Game Exit Left mouse click on piece – drag to desired location.
1 CSE1301 Computer Programming: Lecture 23 Algorithm Design (Part 1)
Us vs. It. Tanks vs. Robot ● Cooperative “Boss Fight” ● Tank players must destroy the Robot before it reaches the city limits. ● Robot is controlled by.
Representing a Game Board In a game, we represent the action taking place using an array – In a very simple game, we use individual variables to represent.
November 10, 2009Introduction to Cognitive Science Lecture 17: Game-Playing Algorithms 1 Decision Trees Many classes of problems can be formalized as search.
Hao Luo, Zhifei Song. Introduction Lock and Roll: very popular game on iphone, more than 12,000,000 had been played ever since last may. Layout of the.
RULES Each player begins the game with twelve normal pieces (either white or black). The pieces are automatically set in their proper positions. The object.
© 2007 Ray S. Babcock Tracks Game is played on a (nxn) set of squares. There are three possible moves (labeled A,B,C). Players alternate making a move.
THE RENJU GAME BY ABHISHEK JAIN, PRANSHU GUPTA & RHYTHM DAS PCLUB SUMMER PROJECT PRESENTATION JUNE, L7 IIT KANPUR MENTOR – SANIL JAIN.
Backtracking.
SE320: Introduction to Computer Games Week 8: Game Programming Gazihan Alankus.
Ch1 AI: History and Applications Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2011.
Minimax.
IMAGE Daniel Harmon Michael Ryan Stu SPLITTERS Rabess Keener Dack Kao Haas.
Three Musketeers. Rules for Three Musketeers Players take turns moving one of their pieces. No diagonal moves. Musketeers move by capturing a nearby enemy.
Backtracking. N-Queens The object is to place queens on a chess board in such a way as no queen can capture another one in a single move –Recall that.
Othello Artificial Intelligence With Machine Learning
Probability (Grade 12) Daljit Dhaliwal. Sticks and Stones game.
 Summary  How to Play Go  Project Details  Demo  Results  Conclusions.
1 Solving problems by searching This Lecture Chapters 3.1 to 3.4 Next Lecture Chapter 3.5 to 3.7 (Please read lecture topic material before and after each.
Section 3.1: Proof Strategy Now that we have a fair amount of experience with proofs, we will start to prove more difficult theorems. Our experience so.
Project 1 Tic Tac Toe Assigned Mon, Sep 8, 2003 Due Mon, Sep 15, 2003.
Virtual Moneyball: A Baseball League Simulator By Ryan Kroening.
BackTracking CS335. N-Queens The object is to place queens on a chess board in such as way as no queen can capture another one in a single move –Recall.
2009/11/14GPW20091 Analysis of the Behavior of People Solving Sudoku Puzzles Reijer Grimbergen School of Computer Science, Tokyo University of Technology.
1 Phase II - Checkers Operator: Eric Bengfort Temporal Status: End of Week Five Location: Phase Two Presentation Systems Check: Checkers Checksum Passed.
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.
Introduction to Morris Games Originally Compiled by Michelle Sharp With contributions by Walter Voit, Kedar Naidu, & James Latham 7 February 2007.
Code Design Using Functions CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Senior Project Poster Day 2007, CIS Dept. University of Pennsylvania Reversi Meng Tran Faculty Advisor: Dr. Barry Silverman Strategies: l Corners t Corners.
Cilk Pousse James Process CS534. Overview Introduction to Pousse Searching Evaluation Function Move Ordering Conclusion.
Tetris Agent Optimization Using Harmony Search Algorithm
Analyzing Puzzles and Games. What is the minimum number of moves required to complete this puzzle?
Troops and Flags ITCS /10/07. Graduate Team #1 Daniel – Model (Team Leader) Jonathan –Rule Checker Priyesh – View, Sprites, Foley artist Rob –
Multiples and Factors. Multiples A multiple is a number that is in the times tables. A multiple is a number that is in the times tables. Multiples of.
Introduction to State Space Search
CompSci Backtracking, Search, Heuristics l Many problems require an approach similar to solving a maze ä Certain mazes can be solved using the.
Othello Artificial Intelligence With Machine Learning Computer Systems TJHSST Nick Sidawy.
The Standard Genetic Algorithm Start with a “population” of “individuals” Rank these individuals according to their “fitness” Select pairs of individuals.
CPS Backtracking, Search, Heuristics l Many problems require an approach similar to solving a maze ä Certain mazes can be solved using the “right-hand”
Checkers A Matlab Project by Spenser Davison, Edward Dyakiw, Justin Pezzi, and Scott Wu.
2-dimensional Arrays A 2-dimensional array has rows and columns It is actually an “array of arrays” A Tic-Tac-Toe board is an example of a 3 by 3 2-d array.
February 25, 2016Introduction to Artificial Intelligence Lecture 10: Two-Player Games II 1 The Alpha-Beta Procedure Can we estimate the efficiency benefit.
An AI Game Project. Background Fivel is a unique hybrid of a NxM game and a sliding puzzle. The goals in making this project were: Create an original.
Teaching Computers to Think:
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.
Boxes. boxes- learning targets o I will be able to display buttons (boxes) o I will be able to organize boxes o I will be able to create an animation.
Announcements Homework 1 Full assignment posted..
BackTracking CS255.
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Human Computer Interaction
Othello Artificial Intelligence With Machine Learning
C nnect 4 Group 9-18 See Zhuo Rui Jorelle 3S3 (Leader)
Kevin Mason Michael Suggs
The Alpha-Beta Procedure
Minimax strategies, alpha beta pruning
Minimax strategies, alpha beta pruning
Backtracking, Search, Heuristics
2019 SAIMC Puzzle Challenge General Regulations
Unit II Game Playing.
Presentation transcript:

Connect Four Michelle Chen Felix Chung Annabel Hung Raymond Wong

Overview Why Connect Four?  Interesting  Game has a mathematical solution Solved by Victor Allis – defined 9 strategic rules

Background Popular children's board game Two person game Each person assigned one of two colors Most common configuration: 7x6 grid Objective - create a line consisting of four pieces of the player's assigned color –line may be horizontal, vertical, or diagonal

Past Implementations GNU's Four-In-A-Row Mustrum  Contains a lot of extra features: load and save games, timed play, multiple languages  Velena  Uses a search tree of about 60,000 positions   Source code available for download

Past Implementations Both Velena and Mustrum claim ”perfect play”  Computer strategy guarantees best outcome for it no matter the human move

Goal General – create an agent to play against the human player that uses the rules Won't strive for perfect play, but at least challenging enough for a human player

Approach Create a simple user interface Implement user interface and base functionality first Leave remaining weeks in the quarter on exploring implementations for the computer agent

Features and Requirements Graphical User Interface

Features and Requirements Requirements are pretty much a mapping of the Connect Four game rules  Computer and human alternates taking the first move at the start of each game  Players alternate playing one piece  First player to create a horizontal, vertical, or diagonal line of his/her pieces wins a game  If all spaces are filled and no one has created the line, then the game ends in a draw

Design/Architecture Player interface  Allows multiple implementations of a computer player A Controller or Main class  Enforces Connect Four game rules Asks each player to make a turn Determines if a game has ended Initializes, sets ups, and draws the components for the board  Implements the mouse listener; listens for mouse clicks on the screen to determine where to play a piece for the human

Design/Architecture Board and Checker classes  Contains draw methods that the main class calls Human Player class  Allows the main class to determine when to listen for mouse clicks and to let the computer make a move Computer Player class  Main subject of focus; implements a subset of the 9 strategic rules that Victor Allis' defined

Implementation Computer Strategy  First looks for groups of three where it can win on the current turn  Then looks for groups of three where the human can win after its turn; computer plays in that position to prevent a human win  If there are no immediate threats to prevent, then it looks for places where it should not play because it will let the human win  Afterwards it applies the rules one at a time

Implementation 5 of the 9 rules implemented, with modification  Claimeven, Aftereven, Baseinverse, Lowinverse, Vertical Rules are applied one at a time  We essentially gave them priorities  Computer applies one rule at time to find a suitable move; if the rule fails to find a move, it tries the next rule  If none of the rules find a playable move, the computer selects a random column

Implementation How did we select those 5 rules to implement?  Claimeven, Lowinverse, Vertical, and Baseinverse are the basic strategies  Aftereven is used in conjuction with Claimeven Claimeven only gives a set of empty spots, Aftereven tells the player when to play in those Claimeven spots  Lowinverse also returns a set of empty spots Create an Afterlowinverse rule to use in conjuction with Lowinverse

Difficulties/Challenges Determining the controller of Zugzwang  Only controller of Zugzwang can use to rules to win  Dependent on the current threats of each player  Decision: did not include variable, computer assumed to have control at all times

Difficulties/Challenges Combining rules  Determining the best set of rules to apply on successive moves to win  Highly complex – main issue was time  Decision: Apply the rules one at a time, basically giving the rules a priority

Demo Human vs Computer: Any volunteers?

Conclusion Became an exploratory approach to implementing the strategies Computer is adequate  Human and computer both able to win (contrary to GNU's Four-In-A-Row) Questions or comments?