Zialus / IA-Tic-Tac-Toe-Swift

Min-Max(w/ and w/o Alpha-beta pruning) implementations for a CS Artificial Inteligence Class

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tic-Tac-Toe-Swift

A swift implementation of Tic-Tac-Toe.

Swift Platform

Quality Gate Status Travis

The decision making process for the computer moves is taken care by a straightforward MiniMax (with and without Alpha-Beta Pruning) implementation.

You can also choose to let the computer pick a position at random, otherwise it will never loose 😃 .

Instructions

How to compile the Tic-Tac-Toe program

To compile just use the provided Makefile by running the command:

make

on the terminal

How to run

./TicTacToe

For additional debug functionality you can run the program with one of the following parameters:

  • debug
  • fulldebug

For example:

./TicTacToe debug

How to "play"

The program will ask the player to pick his preferred symbol and will also let the player choose who plays first.

When the game gets going the player will be asked to input the row and column to place his symbol.

The coordinates are represented in the following format :

+++++++++++++++++++
| 0,0 | 0,1 | 0,2 |
+++++++++++++++++++
| 1,0 | 1,1 | 1,2 |
+++++++++++++++++++
| 2,0 | 2,1 | 2,2 |
+++++++++++++++++++

About

Min-Max(w/ and w/o Alpha-beta pruning) implementations for a CS Artificial Inteligence Class


Languages

Language:Swift 97.1%Language:Makefile 2.9%