Tic Tac Toe Three Ways

Why tic-tac-toe?

Tic Tac Toe is a great game, it involves stratgey, luck and excitement while still being very easy to understand. With these qualities I find tic tac toe to be a great game to write as a program in order to understand the basics of the programming language involved. The only problem is picking which language should be chosen as the language.

Languages

As I am trying to increase my data science skills there are two obvious choices: R and Python. A third less obvious choice is Julia, a relatively new language that advertises itself as being written like Python but run like C. Unable to choose I am going to write tic tac toe in all three languages. This way if you know one of the languages but not the other you can compare two scripts (like the Rosetta Stone) to learn the new language, or at least learn a bit of notation.

Multiple Version

To further ease the learning of these languages I will be writing multiple versions of each program. As each version progresses it will grow in coding and strategy complexity. However, to ease in translating each version will maintain the same pseudocode or template and differ in syntax. All of the pseudocode can be found on this page and the specific code is broken down further on the language specific pages (listed directly below). Hopefully everything is clear, now let’s get to the code:

Languages:

Versions: