Presentation is loading. Please wait.

Presentation is loading. Please wait.

Indian Institute of Technology Hyderabad SOS - The Game A Project by Paritosh J Chandran Prakhar Bharadwaj Ganesh Mahidhar Nagarjun Srinivasan.

Similar presentations


Presentation on theme: "Indian Institute of Technology Hyderabad SOS - The Game A Project by Paritosh J Chandran Prakhar Bharadwaj Ganesh Mahidhar Nagarjun Srinivasan."— Presentation transcript:

1 Indian Institute of Technology Hyderabad SOS - The Game A Project by Paritosh J Chandran Prakhar Bharadwaj Ganesh Mahidhar Nagarjun Srinivasan

2 Rules of SOS  Two people, here, the computer and you play against each other  Both the players play the same card, i.e. An “S” or an “O” alternatively, in terms of both the card and the play  The one who forms SOS in a horizontal or vertical line  In our version of the game diagonal victory are not allowed

3 About the Program  The program began in hopes of achieving AI  As of now the program just follows certain rules defined in the source code  Which basically entails that the program has a set of defined rules, checks and moves(such as double tricks, wins etc.)  The rules and checks are pre-defined by the rules of the game

4  The moves to entice a sure win each time has been developed the project team  Logic for each move has been tried and tested  In the future what we hope to achieve is a program that can learn from its mistakes and play. Like a human basically against players

5 Working of the Program  The program first begins by checking if a player has won  Then, it looks if it can finish a win by playing a good move, if not, it checks if the player it’s playing against can win in his next move and the program prevents such a move from happening  If the above 2 situations don’t arise, then, the program proceeds to make a set of pre-defined double tricks(defined by the project team)  If no such possibility is present, the computer plays a neutral/random move such that it does not hinder its chances of winning or being held in a double trick by the player

6 Variables Used  Ch – Two dimensional character array  I, j – Loop variables  Tot – Total number of moves made so far  Turnmade – Keeps track of which move has been made and who has made it  Win – flag variable  G, h – input values from user

7 Functions Used  Print() – Prints the present status of the board  Main() – Primary function of the program. This programme contains the code on how the game should move on. What plays the computer should make and ultimately win. The main() function is the most important part of the program

8 Screen-Shot 1

9 Screen-Shot 2

10 Screen-Shot 3

11 Screen-Shot 4


Download ppt "Indian Institute of Technology Hyderabad SOS - The Game A Project by Paritosh J Chandran Prakhar Bharadwaj Ganesh Mahidhar Nagarjun Srinivasan."

Similar presentations


Ads by Google