tic tic tac toe and noughts and crosses redirect here for other uses see tic tac toe disambiguation and noughts and crosses disambiguation tictactoea completed game of tictactoegenrespaperandpencil gameplayers2setup timeminimalplaying time1 minuterandom chancenoneskills requiredstrategy tactics observationsynonymsnoughts and crosses xs and os tictactoe also known as noughts and crosses or xs and os is a paperandpencil game for two players x and o who take turns marking the spaces in a 33 grid the player who succeeds in placing three of their marks in a horizontal vertical or diagonal row wins the game the following example game is won by the first player x players soon discover that the best play from both parties leads to a draw hence tictactoe is most often played by young children because of the simplicity of tictactoe it is often used as a pedagogical tool for teaching the concepts of good sportsmanship and the branch of artificial intelligence that deals with the searching of game trees it is straightforward to write a computer program to play tictactoe perfectly or to enumerate the 7665 essentially different positions the state space complexity or the 26830 possible games up to rotations and reflections the game tree complexity on this space the game can be generalized to an mnkgame in which two players alternate placing stones of their own color on an mn board with the goal of getting k of their own color in a row tictactoe is the 333game history games played on threeinarow boards can be traced back to ancient egypt an early variation of tictactoe was played in the roman empire around the first century bc it was called terni lapilli three pebbles at a time and instead of having any number of pieces each player only had three thus they had to move them around to empty spaces to keep playing and picaria a game of the puebloans the different names of the game are more recent the first print reference to noughts and crosses nought being an alternative word for zero the british name appeared in 1858 in an issue of notes and queries in 1952 oxo or noughts and crosses developed by british computer scientist alexander s douglas for the edsac computer at the university of cambridge became one of the first known video games in 1975 tictactoe was also used by mit students to demonstrate the computational power of tinkertoy elements the tinkertoy computer made out of almost only tinkertoys is able to play tictactoe perfectly it is currently on display at the museum of science boston combinatorics when considering only the state of the board and after taking into account board symmetries ie rotations and reflections there are only 138 terminal board positions a combinatorics study of the game shows that when x makes the first move every time the game is won as follows 91 distinct positions are won by x 44 distinct positions are won by o 3 distinct positions are drawn often called a cats game strategy optimal strategy for player x if starting in a corner in each grid the shaded red x denotes the optimal move and the location of os next move gives the next subgrid to examine note that only two sequences of moves by o both starting with center topright leftmid lead to a draw with the remaining sequences leading to wins from x optimal strategy for player o player o can only force a win or draw by playing in the centre first a player can play a perfect game of tictactoe to win or at least draw if each time it is his turn to play he chooses the first available move from the following list as used in newell and simons 1972 tictactoe program win if the player has two in a row they can place a third to get three in a row block if the opponent has two in a row the player must play the third themselves to block the opponent fork create an opportunity where the player has two threats to win two nonblocked lines of 2 blocking an opponents fork if there is only one possible fork for the opponent the player should block it otherwise the player should block any forks in any way that simultaneously allows them to create two in a row otherwise the player should create a two in a row to force the opponent into defending as long as it doesnt result in them creating a fork for example if x has two opposite corners and o has the center o must not play a corner in order to win playing a corner in this scenario creates a fork for x to win center a player marks the center if it is the first move of the game playing on a corner gives the second player more opportunities to make a mistake and may therefore be the better choice however it makes no difference between perfect players opposite corner if the opponent is in the corner the player plays the opposite corner empty corner the player plays in a corner square empty side the player plays in a middle square on any of the 4 sides the first player who shall be designated x has 3 possible positions to mark during the first turn superficially it might seem that there are 9 possible positions corresponding to the 9 squares in the grid however by rotating the board we will find that in the first turn every corner mark is strategically equivalent to every other corner mark the same is true of every edge side middle mark for strategy purposes there are therefore only three possible first marks corner edge or center player x can win or force a draw from any of these starting marks however playing the corner gives the opponent the smallest choice of squares which must be played to avoid losing shows that if the players are not perfect an opening move in the center is best for x the second player who shall be designated o must respond to xs opening mark in such a way as to avoid the forced win player o must always respond to a corner opening with a center mark and to a center opening with a corner mark an edge opening must be answered either with a center mark a corner mark next to the x or an edge mark opposite the x any other responses will allow x to force the win once the opening is completed os task is to follow the above list of priorities in order to force the draw or else to gain a win if x makes a weak play more detailedly to guarantee a draw o should adopt the following strategies if x plays corner opening move o should take center and then an edge forcing x to block in the next move this will stop any forks from happening when both x and o are perfect players and x chooses to start by marking a corner o takes the center and x takes the corner opposite the original in that case o is free to choose any edge as its second move however if x is not a perfect player and has played a corner and then an edge o should not play the opposite edge as its second move because then x is not forced to block in the next move and can fork if x plays edge opening move o should take center or one of the corners adjacent to x and then follow the above list of priorities mainly paying attention to block forks if x plays center opening move o should take corner and then follow the above list of priorities mainly paying attention to block forks when x plays corner first and o is not a perfect player the following may happen if o responds with a center mark best move for them a perfect x player will take the corner opposite the original then o should play an edge however if o plays a corner as its second move a perfect x player will mark the remaining corner blocking os 3inarow and making their own fork if o responds with a corner mark x is guaranteed to win by simply taking any of the other two corners and then the last a fork since when x takes the third corner o can only take the position between the two xs then x can take the only remaining corner to win if o responds with an edge mark x is guaranteed to win by taking center then o can only take the corner opposite the corner which x plays first finally x can take a corner to create a fork and then x will win on the next move further details consider a board with the nine positions numbered as follows 1 2 3 4 5 6 7 8 9 when x plays 1 as their opening move then o should take 5 then x takes 9 in this situation o should not take 3 or 7 o should take 2 4 6 or 8 x1 o5 x9 o2 x8 o7 x3 o6 x4 this game will be a draw or 6 in this situation o should not take 4 or 7 o should take 2 3 8 or 9 in fact taking 9 is the best move since a nonperfect player x may take 4 then o can take 7 to win x1 o5 x6 o2 x8 then o should not take 3 or x can take 7 to win and o should not take 4 or x can take 9 to win o should take 7 or 9 x1 o5 x6 o2 x8 o7 x3 o9 x4 this game will be a draw x1 o5 x6 o2 x8 o9 x4 7 o7 4 x3 this game will be a draw x1 o5 x6 o3 x7 o4 x8 9 o9 8 x2 this game will be a draw x1 o5 x6 o8 x2 o3 x7 o4 x9 this game will be a draw x1 o5 x6 o9 then x should not take 4 or o can take 7 to win x should take 2 3 7 or 8 x1 o5 x6 o9 x2 o3 x7 o4 x8 this game will be a draw x1 o5 x6 o9 x3 o2 x8 o4 7 x7 4 this game will be a draw x1 o5 x6 o9 x7 o4 x2 3 o3 2 x8 this game will be a draw x1 o5 x6 o9 x8 o2 3 4 7 x47 47 23 23 o74 74 32 32 x3 2 7 4 this game will be a draw in both of these situations x takes 9 or 6 as second move x has a 1 3 displaystyle frac 13 property to win if x is not a perfect player x may take 2 or 3 as second move then this game will be a draw x cannot win x1 o5 x2 o3 x7 o4 x6 o8 9 x9 8 this game will be a draw x1 o5 x3 o2 x8 o4 6 x6 4 o9 7 x7 9 this game will be a draw if x plays 1 opening move and o is not a perfect player the following may happen although o takes the only good position 5 as first move but o takes a bad position as second move x1 o5 x9 o3 x7 then x can take 4 or 8 to win x1 o5 x6 o4 x3 then x can take 2 or 9 to win x1 o5 x6 o7 x3 then x can take 2 or 9 to win although o takes good positions as the first two moves but o takes a bad position as third move x1 o5 x6 o2 x8 o3 x7 then x can take 4 or 9 to win x1 o5 x6 o2 x8 o4 x9 then x can take 3 or 7 to win o takes a bad position as first move except of 5 all other positions are bad x1 o3 x7 o4 x9 then x can take 5 or 8 to win x1 o9 x3 o2 x7 then x can take 4 or 5 to win x1 o2 x5 o9 x7 then x can take 3 or 4 to win x1 o6 x5 o9 x3 then x can take 2 or 7 to win variations tictactoe variantsmany board games share the element of trying to be the first to get ninarow including three mens morris nine mens morris pente gomoku qubic connect four quarto gobblet order and chaos toss across and mojo tictactoe is an instance of an mnkgame where two players alternate taking turns on an mn board until one of them gets k in a row hararys generalized tictactoe is an even broader generalization other variations of tictactoe include 3dimensional tictactoe on a 333 board in this game the first player has an easy win by playing in the centre if 2 people are playing one can play on a board of 4x4 squares winning in several ways winning can include 4 in a straight line 4 in a diagonal line 4 in a diamond or 4 to make a square another variant qubic is played on a 444 board it was solved by oren patashnik in 1980 the first player can force a win in misre tictactoe the player wins if the opponent gets n in a row in wild tictactoe players can choose to place either x or o on each move number scrabble or pick15 eat bee less e air bits lip i soda book lot o s a b l t another isomorphic game uses a list of nine carefully chosen words for instance eat bee less air bits lip soda book and lot each player picks one word in turn and to win a player must select three words with the same letter the words may be plotted on a tictactoe grid in such a way that a threeinarow line wins numerical tic tac toe is a variation invented by the mathematician ronald graham the numbers 1 to 9 are used in this game the first player plays with the odd numbers the second player plays with the even numbers all numbers can be used only once the player who puts down 15 points in a line wins sum of 3 numbers in the 1970s there was a two player game made by triang toys games called check lines in which the board consisted of eleven holes arranged in a geometrical pattern of twelve straight lines each containing three of the holes each player had exactly five tokens and played in turn placing one token in any of the holes the winner was the first player whose tokens were arranged in two lines of three which by definition were intersecting lines if neither player had won by the tenth turn subsequent turns consisted of moving one of ones own tokens to the remaining empty hole with the constraint that this move could only be from an adjacent hole quantum tic tac toe allows players to place a quantum superposition of numbers on the board ie the players moves are superpositions of plays in the original classical game this variation was invented by allan goff of novatia labs english names the game has a number of english names ticktacktoe tictactoe ticktattoe or tittattoe united states canada noughts and crosses or naughts and crosses united kingdom republic of ireland australia new zealand south africa zimbabwe india exyozys xsieosies verbal name only northern ireland xs and os republic of ireland zimbabwe sometimes the games tictactoe where players keep adding pieces and three mens morris where pieces start to move after a certain number have been placed are confused with each other in popular culture this section needs additional citations for verification please help improve this article by adding citations to reliable sources unsourced material may be challenged and removed may 2017 learn how and when to remove this template message wordsworth alludes to tictactoe in his the prelude 1799 in the movie wargames a computer learns through a tictactoe analogy that nuclear war is unwinnable the bbcs test card f image includes a picture of a game in the updated version test card j the games x indicates the exact center of the screen george cooper wrote the words and john rogers thomas wrote the music for a song tit tac toe in 1876 the adventure game sam max save the world features an arcade version called tictacdoom but its artificial intelligence is intentionally poor rather than beating the game the player must lose it in order to progress episode 452 of this american life in the 1957 film version of twelve angry men there is a small scene were two jurors are playing the game in order to pass the time in the three stooges short disorder in the court moe and larry are seen playing tictactoe in a couple of different scenes one with curly playing jacks over it elle kings debut solo single exs ohs references another name for tictactoe with a punning allusion to her exes and how accumulating former partners who never seem to leave her alone is a pointless unwinnable exercise various game shows have been based on tictactoe and its variants on hollywood squares nine celebrities filled the cells of the tictactoe grid players put symbols on the board by correctly agreeing or disagreeing with a celebritys answer to a question variations of the show include storybook squares and hip hop squares the british version was celebrity squares australia had various versions under the names of celebrity squares personality squares all star squares in tictacdough players put symbols up on the board by answering questions in various categories which shuffle after each players turn in beat the teacher contestants answer questions to win a turn to influence a tictactoe grid on the price is right several national variants feature a pricing game called secret x in which players must guess prices of two small prizes to win xs in addition to one free x to place on a blank board they must place the xs in position to guess the location of the titular secret x hidden in the center column of the board and form a tictactoe line across or diagonally no vertical lines allowed there are no os in this variant of the game on minute to win it the game ping tac toe has one contestant playing the game with nine waterfilled glasses and white and orange pingpong balls trying to get three in a row of either color he must alternate colors after each successful landing and must be careful not to block himself halesjewett theorem notakto pick 15 sos game ultimate tictactoe the dictionary definition of tictactoe at wiktionary media related to tic tac toe at wikimedia commons tictactoe at wolframs mathworld discussion about the term cats game for a drawn game of tictactoe vtetictactoetictactoe variants 3d tictactoe gomoku notakto number scrabble order and chaos pente quantum tictactoe renju sos treblecross ultimate tictactoe wild tictactoe list related concepts mnkgame nd game kaplanskys game hararys generalized tictactoe halesjewett theorem strategystealing argument futile game paperandpencil game similar games nine mens morris score four ticstactoe gobblet quarto three mens morris nine holes achi connect four connect6 oxo toss across pentago vtetopics in game theorydefinitions cooperative game determinacy escalation of commitment extensiveform game firstplayer and secondplayer win game complexity graphical game hierarchy of beliefs information set normalform game preference sequential game simultaneous game simultaneous action selection solved game succinct game equilibriumconcepts nash equilibrium subgame perfection mertensstable equilibrium bayesian nash equilibrium perfect bayesian equilibrium trembling hand proper equilibrium epsilonequilibrium correlated equilibrium sequential equilibrium quasiperfect equilibrium evolutionarily stable strategy risk dominance core shapley value pareto efficiency gibbs equilibrium quantal response equilibrium selfconfirming equilibrium strong nash equilibrium markov perfect equilibrium strategies dominant strategies pure strategy mixed strategy strategystealing argument tit for tat grim trigger collusion backward induction forward induction markov strategy classesof games symmetric game perfect information repeated game signaling game screening game cheap talk zerosum game mechanism design bargaining problem stochastic game nplayer game large poisson game nontransitive game global game strictly determined game potential game games chess infinite chess checkers tictactoe prisoners dilemma optional prisoners dilemma travelers dilemma coordination game chicken centipede game volunteers dilemma dollar auction battle of the sexes stag hunt matching pennies ultimatum game rockpaperscissors pirate game dictator game public goods game blotto game war of attrition el farol bar problem fair division fair cakecutting cournot game deadlock diners dilemma guess 23 of the average kuhn poker nash bargaining game prisoners and hats puzzle trust game princess and monster game rendezvous problem theorems arrows impossibility theorem aumanns agreement theorem folk theorem minimax theorem nashs theorem purification theorem revelation principle zermelos theorem keyfigures albert w tucker amos tversky ariel rubinstein claude shannon daniel kahneman david k levine david m kreps donald b gillies drew fudenberg eric maskin harold w kuhn herbert simon herv moulin jean tirole jeanfranois mertens jennifer tour chayes john harsanyi john maynard smith antoine augustin cournot john nash john von neumann kenneth arrow kenneth binmore leonid hurwicz lloyd shapley melvin dresher merrill m flood olga bondareva oskar morgenstern paul milgrom peyton young reinhard selten robert axelrod robert aumann robert b wilson roger myerson samuel bowles suzanne scotchmer thomas schelling william vickrey see also allpay auction alphabeta pruning bertrand paradox bounded rationality combinatorial game theory confrontation analysis coopetition firstmove advantage in chess game mechanics glossary of game theory list of game theorists list of games in game theory nowin situation solving chess topological game tragedy of the commons tyranny of small decisions 