School of Engineering
Report
Individual Coursework:
Tic-tac-toe
Name: Lyazzat Zhanshayeva
ID: 201104072
Lecturer: Jaan H Pu
Personal tutor: Sarim Al-Zubaidy
Date of submission: 6/03/2013
Astana, 2013
Introduction
Tic-tac-toe is a game where two players try to win by putting circles or crosses in a line in the row, column or diagonal of a square board. The objective of the individual coursework is to create such game in a 4x4 board on the MATLAB software with already existing one ‘O’ and one ‘X’ on it. Moreover, some specific details must be considered: the next is computer’s turn where machine chooses the sign for the whole game and put it; then turn goes to player and vise-versa in order to win the game or finish with the draw without cheating. Thus, the main aim of this report is to introduce the theory of the game and MATLAB functions, concisely describe the game strategy and methodology, and finally discuss the obtained results.
Theory
MATLAB. One kind of the computing languages is MATLAB created by MathWorks, which allows manipulation of matrix, plotting of functions, implementation of algorithms, creation of interfaces, and interfacing with platforms written in other languages. This type of scientific computing application has significant advantages among other software simulations which can be seen by faster response for different technical problems and relatively easier to use (Moore, 2012). In addition, MATLAB is optimized for matrix calculations and regularly updated. Thus MATLAB extensively spread and used by control engineers for analysis and design of projects.
Tic-tac-toe. Simple games that do not require complicated animation and graphics can be created in the MATLAB environment with help of basic commands such as ‘if’, ‘else’, ‘elseif’ and etc. Tic-tac-toe could be an excellent example of programming the game. It is a quick logical game for two players, who seek in alternative turns to fill
References: Moore, H., 2012. MATLAB for Engineers, 3rd ed., Edinburgh: Pearson Education. Summary of the efforts