SlideShare a Scribd company logo
1 of 27
Tic Tac Toe Game
Amna Msalam & Rehan Alashqar
Supervised By: Dr. Aladdin Masri & Dr. Emad Natsheh
Topics to be discussed!???
introduction
Tic Tac Toe(Description)
Why this project?
 Project Features
 Problems
 Project implementation
 Recommendations and Future work
Demo
introduction
Games provide a real source of enjoyment in daily life.
Games also are helpful in improving the physical and mental health of human. Apart from daily
life physical games, people also play computer games. These games are different than those of
physical games in a sense that they do not involve much physical activity rather mental and
emotional activities.
introduction
Our project name is Tic-Tac-Toe. This game is very popular and is fairly simple by
itself. It is actually a two player game, zero-sum game (gain equals the loss of other).
In this game, there is a board with n x n squares. In our game, it is 3 x 3 squares. The
goal of Tic-Tac-Toe is to be one of the players to get three same symbols in a row -
horizontally, vertically or diagonally - on a 3 x 3 grid.
Tic Tac Toe(Description)
Our project is a Tic Tac Toe game which consist of a robot that paly
against human player depend on the picture that a software program take it
and analysis the image using alpha beta algorithm then send command to
Arduino to make the robot take the piece from specific position and move it
to one of the nine positions depend on which player was play, when the
game finished and if the robot win music will start.
Why this project?
 As Artificial intelligence technology occupies the world, it becomes an
essential part of all the fields around us; it aims to become more interactive
and interesting.
 So we try to employee artificial intelligence to play Tic Tac Toe in more
interesting way.
Project Features
 The game can start by any one of the two player.
The main features of our project that we can play any level of tic tac toe
with the robotic arm (Simple, Medium, Hard).
The result after the game finish will see on the LCD.
 After the game finished we put sound of music in microcontroller to
control the music voice on or off depending on the result of the game.
 The game can detect if the player play or not by itself without click any
button to hint it.
Project implementation
We divided the project into three parts
 Software part.
Hardware implementation.
Software part
We build application by using visual basic program to deal with the
hardware part. This application consist of three parts these are communicate
with each other to play a Tic Tac Toe game between robot and human
player using the image processing to analyze the picture from camera and
the alpha beta algorithm to determine the suitable position for the robot.
Software part
This picture show the application to interacts with the hardware part.
Software part
First part is a TicTacToe class this class control the board in the project
the class consist off 3*3 array and function to set the current player may
be player X or player O in the specifid position in the array, the psistion in
the array speciefied by the AI algorithim in AI class for the player O, and
when any position in the array is set by any player there is two function to
detect the win or the eqality.
Second part is a TTTAI class this class will detect the best move for the
robotic arm (Player O)
Software part
The third part in the program is the frame window that shown to the user,
this frame consist of web cam with size of 360*360 pixel to open the web
cam connected to computer ,Picture Box which consist the picture taken by
the camera every 200 milliseconds.
Hardware part
First we constructed a mechanical arm capable of manipulating pieces to
play the game.
Then in this part we determine the values for each motor on each position
for the nine positions and store the values in different functions, then
depend on the command received by serial we control the arm.
Lastly and the most important was the development of code to translate
move of the tic-tac-toe program into actions of the physical system
Analysis System Design
Robot Design
We analyzed our project, searching through the internet of hardware component available, then
we find that the best design for our project like this picture put this arm require 6 servo motors, but
we reduce the number of servo motors to four to reduce the cost and the code needed to control all
motors and can perform what we need use just four servo motors.
Components
 A robotic arm with gripper
 Microcontroller
 4 servo motors
 Board of 3 x 3 squares
 Red and white pieces
 LCD
 ISD1820 module for music
 Web cam
 Power supply
Microcontroller:
Arduino UNO
Microcontroller : ATmega328P
14 digital input/output pins (of which 6 can
be used as PWM outputs).
6 analog inputs.
Servo motor
We use the MG996R with high torque (metal servo) because this type of servo endure high
torque and if we use the plastic motor may be damaged fast, although we use metal servo this
servo interrupt and stopped suddenly while we are working and the servo need time to become
available so we start repair the suspended motor and we succeed fixed it so we don’t need to
bought new one.
1 2 3
Servo motor
We use four servo motors to control the movement of the robotic arm to access the nine
positions of the 3*3 board and to access the position where the piece is found.
Servo motor with its components Internal contents for servo motor
ISD1820
This component is used to store music on it and when the robot win this
music play.
Powers sources
First we use power charger with 5 volt and 2 ampere but because this charger not get the exact
ampere needed to control the four servo motors of the robotic arm this cause the movement of the
arm with shaking so to solve this problem we use power supply to get the motors the specific
ampere it needed.
Power charger Power supply
Problems
 The components of the project is not available all the time.
 One month to get the basic components.
 Sudden damage in two motors and the motors become not available in
market may reach after two weeks or more so we will try to fix its and we
success do that.
Problems
The servo motors require 5 volt and 2 amperes to work well, we buy power
charger with 5 volt and 2 amperes, but the first two months the robotic arm
suffer from shaking, we thought this because the arm not connected
successfully, but we find that the vibration was caused by the charger
because not give the suitable ampere, so we used the power supply from
university lab to solve the problem.
Recommendations and Future work
 Before using any component make sure that is available and suitable for
your project.
 Using this robot for play more than one game with human according to
the selected game from the application like chess game ,collecting sheets
with colors and Tic Tac Toe game.
Demo
// ‫هاي‬
‫الساليد‬
‫خليتها‬ ‫للفيديو‬
‫فاضية‬
Thank you for your
attention :)

More Related Content

Similar to tic_tac_toe.pptx

Android Game Minisyonize
Android Game MinisyonizeAndroid Game Minisyonize
Android Game Minisyonize
savvy
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
Sohil Gupta
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
Luke Summers
 
Multiplayer Networking Game
Multiplayer Networking GameMultiplayer Networking Game
Multiplayer Networking Game
Tanmay Krishna
 
RoboArm_Poster
RoboArm_PosterRoboArm_Poster
RoboArm_Poster
Thai Le
 
Michael Hughes - Y1 GD ngine_terminology
Michael Hughes - Y1 GD ngine_terminologyMichael Hughes - Y1 GD ngine_terminology
Michael Hughes - Y1 GD ngine_terminology
Mike Hughes
 
daryl bates engine terminology finished
daryl bates engine terminology finisheddaryl bates engine terminology finished
daryl bates engine terminology finished
DarylBatesGames
 
Y1 gd engine_terminology (1) (4)
Y1 gd engine_terminology (1) (4) Y1 gd engine_terminology (1) (4)
Y1 gd engine_terminology (1) (4)
TomCrook
 

Similar to tic_tac_toe.pptx (20)

Android Game Minisyonize
Android Game MinisyonizeAndroid Game Minisyonize
Android Game Minisyonize
 
intern.pdf
intern.pdfintern.pdf
intern.pdf
 
Biological organism simulation using procedural growth "Organimo 1.0"
Biological organism simulation using procedural growth "Organimo 1.0"Biological organism simulation using procedural growth "Organimo 1.0"
Biological organism simulation using procedural growth "Organimo 1.0"
 
Technology & Games For Stroke Rehabilitation
Technology & Games For Stroke RehabilitationTechnology & Games For Stroke Rehabilitation
Technology & Games For Stroke Rehabilitation
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
 
Mini Max Algorithm Proposal Document
Mini Max Algorithm Proposal DocumentMini Max Algorithm Proposal Document
Mini Max Algorithm Proposal Document
 
Introduction to Game Development
Introduction to Game DevelopmentIntroduction to Game Development
Introduction to Game Development
 
Forest assassin 2 d platformer game
Forest assassin 2 d platformer gameForest assassin 2 d platformer game
Forest assassin 2 d platformer game
 
Y1 gd engine_terminology
Y1 gd engine_terminologyY1 gd engine_terminology
Y1 gd engine_terminology
 
IRJET- IoT based Gesture Control Gaming
IRJET- IoT based Gesture Control GamingIRJET- IoT based Gesture Control Gaming
IRJET- IoT based Gesture Control Gaming
 
Multiplayer Networking Game
Multiplayer Networking GameMultiplayer Networking Game
Multiplayer Networking Game
 
Ddn
DdnDdn
Ddn
 
RoboArm_Poster
RoboArm_PosterRoboArm_Poster
RoboArm_Poster
 
G017534144
G017534144G017534144
G017534144
 
Michael Hughes - Y1 GD ngine_terminology
Michael Hughes - Y1 GD ngine_terminologyMichael Hughes - Y1 GD ngine_terminology
Michael Hughes - Y1 GD ngine_terminology
 
daryl bates engine terminology finished
daryl bates engine terminology finisheddaryl bates engine terminology finished
daryl bates engine terminology finished
 
Connecto
ConnectoConnecto
Connecto
 
Y1 gd engine_terminology (1) (4)
Y1 gd engine_terminology (1) (4) Y1 gd engine_terminology (1) (4)
Y1 gd engine_terminology (1) (4)
 
Game Engine terminology
Game Engine terminologyGame Engine terminology
Game Engine terminology
 
Developing a Humanoid Robot Platform
Developing a Humanoid Robot PlatformDeveloping a Humanoid Robot Platform
Developing a Humanoid Robot Platform
 

Recently uploaded

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Recently uploaded (20)

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 

tic_tac_toe.pptx

  • 1. Tic Tac Toe Game Amna Msalam & Rehan Alashqar Supervised By: Dr. Aladdin Masri & Dr. Emad Natsheh
  • 2. Topics to be discussed!??? introduction Tic Tac Toe(Description) Why this project?  Project Features  Problems  Project implementation  Recommendations and Future work Demo
  • 3. introduction Games provide a real source of enjoyment in daily life. Games also are helpful in improving the physical and mental health of human. Apart from daily life physical games, people also play computer games. These games are different than those of physical games in a sense that they do not involve much physical activity rather mental and emotional activities.
  • 4. introduction Our project name is Tic-Tac-Toe. This game is very popular and is fairly simple by itself. It is actually a two player game, zero-sum game (gain equals the loss of other). In this game, there is a board with n x n squares. In our game, it is 3 x 3 squares. The goal of Tic-Tac-Toe is to be one of the players to get three same symbols in a row - horizontally, vertically or diagonally - on a 3 x 3 grid.
  • 5. Tic Tac Toe(Description) Our project is a Tic Tac Toe game which consist of a robot that paly against human player depend on the picture that a software program take it and analysis the image using alpha beta algorithm then send command to Arduino to make the robot take the piece from specific position and move it to one of the nine positions depend on which player was play, when the game finished and if the robot win music will start.
  • 6. Why this project?  As Artificial intelligence technology occupies the world, it becomes an essential part of all the fields around us; it aims to become more interactive and interesting.  So we try to employee artificial intelligence to play Tic Tac Toe in more interesting way.
  • 7. Project Features  The game can start by any one of the two player. The main features of our project that we can play any level of tic tac toe with the robotic arm (Simple, Medium, Hard). The result after the game finish will see on the LCD.  After the game finished we put sound of music in microcontroller to control the music voice on or off depending on the result of the game.  The game can detect if the player play or not by itself without click any button to hint it.
  • 8. Project implementation We divided the project into three parts  Software part. Hardware implementation.
  • 9. Software part We build application by using visual basic program to deal with the hardware part. This application consist of three parts these are communicate with each other to play a Tic Tac Toe game between robot and human player using the image processing to analyze the picture from camera and the alpha beta algorithm to determine the suitable position for the robot.
  • 10. Software part This picture show the application to interacts with the hardware part.
  • 11. Software part First part is a TicTacToe class this class control the board in the project the class consist off 3*3 array and function to set the current player may be player X or player O in the specifid position in the array, the psistion in the array speciefied by the AI algorithim in AI class for the player O, and when any position in the array is set by any player there is two function to detect the win or the eqality. Second part is a TTTAI class this class will detect the best move for the robotic arm (Player O)
  • 12. Software part The third part in the program is the frame window that shown to the user, this frame consist of web cam with size of 360*360 pixel to open the web cam connected to computer ,Picture Box which consist the picture taken by the camera every 200 milliseconds.
  • 13. Hardware part First we constructed a mechanical arm capable of manipulating pieces to play the game. Then in this part we determine the values for each motor on each position for the nine positions and store the values in different functions, then depend on the command received by serial we control the arm. Lastly and the most important was the development of code to translate move of the tic-tac-toe program into actions of the physical system
  • 15. Robot Design We analyzed our project, searching through the internet of hardware component available, then we find that the best design for our project like this picture put this arm require 6 servo motors, but we reduce the number of servo motors to four to reduce the cost and the code needed to control all motors and can perform what we need use just four servo motors.
  • 16. Components  A robotic arm with gripper  Microcontroller  4 servo motors  Board of 3 x 3 squares  Red and white pieces  LCD  ISD1820 module for music  Web cam  Power supply
  • 17. Microcontroller: Arduino UNO Microcontroller : ATmega328P 14 digital input/output pins (of which 6 can be used as PWM outputs). 6 analog inputs.
  • 18. Servo motor We use the MG996R with high torque (metal servo) because this type of servo endure high torque and if we use the plastic motor may be damaged fast, although we use metal servo this servo interrupt and stopped suddenly while we are working and the servo need time to become available so we start repair the suspended motor and we succeed fixed it so we don’t need to bought new one. 1 2 3
  • 19. Servo motor We use four servo motors to control the movement of the robotic arm to access the nine positions of the 3*3 board and to access the position where the piece is found. Servo motor with its components Internal contents for servo motor
  • 20. ISD1820 This component is used to store music on it and when the robot win this music play.
  • 21. Powers sources First we use power charger with 5 volt and 2 ampere but because this charger not get the exact ampere needed to control the four servo motors of the robotic arm this cause the movement of the arm with shaking so to solve this problem we use power supply to get the motors the specific ampere it needed. Power charger Power supply
  • 22. Problems  The components of the project is not available all the time.  One month to get the basic components.  Sudden damage in two motors and the motors become not available in market may reach after two weeks or more so we will try to fix its and we success do that.
  • 23. Problems The servo motors require 5 volt and 2 amperes to work well, we buy power charger with 5 volt and 2 amperes, but the first two months the robotic arm suffer from shaking, we thought this because the arm not connected successfully, but we find that the vibration was caused by the charger because not give the suitable ampere, so we used the power supply from university lab to solve the problem.
  • 24. Recommendations and Future work  Before using any component make sure that is available and suitable for your project.  Using this robot for play more than one game with human according to the selected game from the application like chess game ,collecting sheets with colors and Tic Tac Toe game.
  • 25. Demo
  • 27. Thank you for your attention :)

Editor's Notes

  1. اصبح الذكاء الاصطناعي موجود في كل مكان وحتى تكون الالعاب اكثر ذكاءا اصبحت تحتوي بشكل كبير على الذكاء الاصطناعي وهنا اليوم نقوم باستخدام الدكاء الاصطناعي لعمل روبوت يلعب الاكس او مع شخص عادي .