DATA STRUCTURES AND ALGORITHMS.  The project that we worked on is a well known game called “Tic Tac Toe”.  We implemented this game using a binary tree.

Slides:



Advertisements
Similar presentations
Tic tac toe v1.2 Made by Rogonow XX PC: X YOU: O The PC-player with mark X goes first. After the PC, you place the mark O at the position of a green oval.
Advertisements

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.
AE1APS Algorithmic Problem Solving John Drake.  Invariants – Chapter 2  River Crossing – Chapter 3  Logic Puzzles – Chapter 5  Matchstick Games -
Study Group Randomized Algorithms 21 st June 03. Topics Covered Game Tree Evaluation –its expected run time is better than the worst- case complexity.
Artificial Intelligence Adversarial search Fall 2008 professor: Luigi Ceccaroni.
Tic Tac Toe Game Design Using OOP
Tic Tac Toe Game playing strategies
CHAPTER 10 FUN AND GAMES Group 1: Xiangling Liu.
TIC-TAC-TOE FELIX CHEN CLUSTER 5: Computers in Biophysics and Robotics.
PLANNING THE TIC TAC TOE GAME BY NEEL DAVE. TIC TAC TOE INSTRUCTIONS Tic Tac Toe Instructions The basic concept of Tic Tac Toe 1.This is a game for two.
Tic Tac Toe Architecture CSE 5290 – Artificial Intelligence 06/13/2011 Christopher Hepler.
Tutorial 6 of CSCI2110 Bipartite Matching Tutor: Zhou Hong ( 周宏 )
J AVA A SSIGNMENT 1. O VERVIEW Tic Tac Toe How it should work Using the supplied methods What you need to do How we will test your code.
Presented by : Ashin Ara Bithi Roll : 09 Iffat Ara Roll : 22 12th Batch Department of Computer Science & Engineering University of Dhaka.
Integer Tic Tac Toe Let’s Begin Rules: 1.Erase all x’s and o’s from the previous game before you begin. 2.Decide which player will be x’s and which will.
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.
CS 171: Introduction to Computer Science II
CSC 412: AI Adversarial Search
Review Binary Tree Binary Tree Representation Array Representation Link List Representation Operations on Binary Trees Traversing Binary Trees Pre-Order.
Investigation #1 (cont.)
Lecture 10 Trees –Definiton of trees –Uses of trees –Operations on a tree.
Multiway Trees. Trees with possibly more than two branches at each node are know as Multiway trees. 1. Orchards, Trees, and Binary Trees 2. Lexicographic.
Computer Programming for Engineers. Outline Tic-Tac-Toe (O-X Game) Drawing 3x3 grid Receiving the inputs Checking for a winner Taking turns between.
Chapter 13 B Advanced Implementations of Tables – Balanced BSTs.
Technology 1. 2 Bill Gates Bill’s General Information 3.
Games. Adversaries Consider the process of reasoning when an adversary is trying to defeat our efforts In game playing situations one searches down the.
Investigation #1 (cont.) Products and Multiples. 1.3 The Product Game.
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.
Rules “rules, play, culture”. COSC 4126 rules Rules of Tic-Tac-Toe 1.Play occurs on a 3 by 3 grid of 9 squares. 2.Two players take turns marking empty.
How to draw a Geometric Tessellation by Ms. Day
Copyright © Ed2Net Learning Inc.1 Graphing in four Quadrants.
Natural Language to Machine Readable Format By: Damian Tamayo Presentation 2 – Nov. 13, 2009 CIS 895 – MSE Project.
Introduction to Game Theory Kamal Aboul-Hosn Cornell University Computers Playing Games.
Tic tac toe specifications Maaike Gerritsen Ingmar van der Steen Bas Geertsema Brian Vermeer.
M180: Data Structures & Algorithms in Java Trees & Binary Trees Arab Open University 1.
+ TIC-TAC-TOE GAME CAPSTONE PROJECT SEN Team Members Sno.NameITU ID 1Keerthi Alimity Venkata Ganugapati Sujitha Sanku Bavi Bharathan87550.
Trees Dr. Yasir Ali. A graph is called a tree if, and only if, it is circuit-free and connected. A graph is called a forest if, and only if, it is circuit-free.
1 More Trees Trees, Red-Black Trees, B Trees.
Bingo! One step equations Find the missing value in each case, and cross it off on your bingo card if you can (with a highlighter). To win: shout “bingo!”
Introduction to State Space Search
Tic tac toe XX PC: X YOU: O The PC-player with mark X goes first. After the PC, you place the mark O at the position of a green circle. If you succeed.
Copyright © 2012 Pearson Education, Inc. Chapter 20: Binary Trees.
1Computer Sciences. 2 HEAP SORT TUTORIAL 4 Objective O(n lg n) worst case like merge sort. Sorts in place like insertion sort. A heap can be stored as.
The Standard Genetic Algorithm Start with a “population” of “individuals” Rank these individuals according to their “fitness” Select pairs of individuals.
Checkers A Matlab Project by Spenser Davison, Edward Dyakiw, Justin Pezzi, and Scott Wu.
Adversarial Search. Regular Tic Tac Toe Play a few games. –What is the expected outcome –What kinds of moves “guarantee” that?
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.
” Omok ” Korean Traditional Board Game ” Omok ” By Ilsun Kim.
Fractions, Decimals, and Percents Today’s Learning Goals We will review the link between fractions, decimals, and percents by playing the Four in a Row.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 20: Binary Trees.
Tic – Tac – Toe ! Choose a square by clicking on “box #” Choose a square by clicking on “box #” If the person choosing the square gets the problem correct,
7.2 Labeled trees.
A fun reading Comprehension Game
Next Level Tic-Tac-Toe
O X X O O X X O X O X O O X O X O X Tic Tac Toe Graphical
Adversarial Search.
Chapter 20: Binary Trees.
Spelling Tic Tac Toe Homework
Chapter 21: Binary Trees.
Chapter 6 : Game Search 게임 탐색 (Adversarial Search)
Pirate Place Value Coloring Game
Lecture 36 Section 12.2 Mon, Apr 23, 2007
Cross section It is supposed a hill has been cut vertically, then we can see the side view, or cross section of the hill A section is a slice vertically.
Beginning C Lecture 5 Lecturer: Dr. Zhao Qinpei
Minimax strategies, alpha beta pruning
Six dominoes have been placed in this grid and there is only one way of filing the grid with more dominoes. Try it:
2019 SAIMC Puzzle Challenge General Regulations
Object-Oriented (OO) Design
PL_Szkoła_Podstawowa_Nr 51_w_Białymstoku
Unit II Game Playing.
Presentation transcript:

DATA STRUCTURES AND ALGORITHMS

 The project that we worked on is a well known game called “Tic Tac Toe”.  We implemented this game using a binary tree which is a very flexible data structure along with some other data structures namely link lists & multi dimensional arrays.

 Tic-tac-toe, also spelled tick tack toe, or noughts and crosses is a pencil paper game for two players, X and O, who take turns marking the spaces in a 3×3 grid.  The player who succeeds in placing three respective marks in a horizontal, vertical, or diagonal row wins the game.

 Choose which player will be represented by X and which by O.  Let player X go first to put an X in any of the nine sections of the grid.  The players take turns putting their symbol on the table.  The first player to have 3 of their symbols in a row, whether it is horizontally, vertically, or diagonally, is the winner.

 A binary tree is a tree data structure in which each node has at most two child nodes, usually distinguished as "left" and "right".  Nodes with children are parent nodes, and child nodes may contain references to their parents.  Any node in the data structure can be reached by starting at root node and repeatedly following references to either the left or right child.

 JButton  JLabel  File streaming

 Following classes were used in our program:  tttapp  Node  AI

 java.util.*  java.io.*  java.awt.*  javax.swing.*  java.awt.event.*  Firstedge(text file)  Firstcorner(text file)

 AI()  setstate()  match()  load()  searchstate()  nextmove()  display()  compwin()  compwins()  userwins()  chktie()  getc()  actionperformed()  init()

 Only two strategies i.e. first-corner and first- edge are taken into consideration while developing the program’s logic.  The computer always goes first.