📜 ⬆️ ⬇️

Strategic Tic-Tac-Toe (Starategic Tic-Tac-Toe)

Playing one game in tic-tac-toe for more than two hours is easy.


Hypermapped gamefield

The article will discuss how to introduce elements of "strategy and tactics" into the tic-tac-toe familiar to everyone. Will be described and analyzed the rules of the game, talked about playing fields.



What is offered?


The game S tarategic T ic- T ac- T oe ( STTT ) or Strategic tic-tac-toe is, like its progenitor, a game for two participants for which only a pencil and paper are needed. It is a superset of the Ultimate Tic-Tac-Toe game as well as the Ultimate Tic-Tac-Toe is a superset of the usual Orc Tic-Tac-Toe . The task of the game is to help players acquire the skills of strategic thinking.
Project home page




Content


  1. Terms and Definitions
  2. Rules of the game
  3. Playing fields
  4. Game analysis
  5. Conclusions and afterword



Terms and Definitions


Carefully, many similar definitions and their number can push you away, but without this basis you cannot understand what will be discussed further.



At this point, all the definitions we need are set and we can begin to discuss the game itself.


Rules of the game


By asking and analyzing this class of games (a superset of the Tic-tac-toe game), we, to simplify understanding and comparison, divide the game rules into three parts: the turn rules, the win rules and the restrictions. Consider the game Operational tic-tac-toe according to this approach.


Operational tic-tac-toe


Rules of the course:



Winning Rules:



Limitations:



Now that the rules of the familiar game are set according to the proposed approach, it will be easier for the reader to navigate the rules of Tactical and Strategic tic-tac-toe.
The sets of rules of the Strategic noughts and crosses are based on the rules of the Tactical noughts and crosses, therefore, we present them in the proposed form.


Tactical tic-tac-toe


Rules of the course:



Picture
image

As you can see, the first player went to the third Operational cell of the fifth Operational field, so the second player must go to the third Tactical cell of this Tactical field.


Winning Rules:



Limitations:


  1. A tactical cell can have two states of filling : There are places, Filled.
  2. If the player's turn is to occur in the Tactical cell with the filling state Filled, then the player can make a move to any empty Operational cell of the Tactical field.
    • Optional restriction: If a player's move is to occur in a Tactical cell with a game state not a Game (i.e., Defeated X, Defeated O, or Draw), then the player can make a move to any empty Tactical Field.
  3. Optional Restriction: You cannot send the next player to the Tactical box in which he made the previous turn.
  4. No one can win with a line of 3 tactical cells with a game state. Draw, if such a situation occurs, the game either ends in a draw or continues until one of the players wins.
  5. A player cannot make a move to a cage in which his character or another player’s character already exists.
  6. You can not continue to make moves after the appointment of a draw or winner.

For the multitude of students the players with whom I had to fight, this set of rules was maligned to be understood by ear, but during the first trial game, most of them were sorted out, so at this stage I invite the reader to play Tactical tic-tac-toe for which you will need a pencil / pen, a notebook sheet (or usual if well draw straight lines) and an interested friend.


It is time to talk about the strategic tic-tac-toe themselves. First of all, when creating a new game, the goal was to expand the current playing field by increasing the number of “levels” of the game; as a result, it became necessary to create new rules of the move, as the old ones, as we will see below, were complete and could not provide new paths for the task player moves. At the table of discussions of the future rules of this game, three main directions were born after the rules that were transformed into sets: Tactical, Functional and Hyper-functional. We describe these sets of rules.


Strategic tic-tac-toe


General rules


All three sets of rules retain winning rules and restrictions at the Tactical level and declare the same rules for the Strategic level. Thus, the winning rules and restrictions for the Strategic level look exactly the same as the rules of Tactical daggers up to cell names. The reader is invited to write the rules of the Strategic level for checking the understanding of current terms and regulations.


Tactical rule set


The rules of Tactical tic-tacs set the mapping from the set of Cells to the set of Tactical cells to determine where the current player should go depending on the turn of the previous player or other owls on the Tactical level rules. The tactical rule set preserves the mapping from the set of cells of the previous Operational Field to the set of Tactical cells of the current Tactical Field, while declaring that the display from the set of Tactical cells of the previous Tactical Field to the set of Strategic Cells of the Strategic Field is the same as the display from the set of Cells of the previous Operational Field Tactical cells of the current Tactical field, or in other words, the rules of travel at the Strategic level are the same as in Ta kticheskom level. A vivid illustration of this provision can be found under the spoiler.


Illustration

image In the picture, the player went to the first Operational cell of the fourth Operational field of the fifth Tactical field, which means that the next player must walk any of the Operational cells of the first Tactical cell (green) of the fourth Tactical field (red), which in turn will determine the move of the next player.


Functional rule set


The second idea was to compare lines 9x1 (or columns 1x9, as will be shown below, this is not so significant and the choice in favor of the lines was made only from the aesthetics of the resulting playing field) of the cells of the Strategic cell number to which the next move should be made. This idea was realized by placing the numbers of Strategic cells for the next turn, on the left in the same line as the cell of the current turn. To understand what is at stake, go to the section with playing fields. Features of the choice of the following strategic cells will be disclosed in the analysis of the game. The mapping rules from the set of cells of the current operational field to the set of tactical cells of the next tactical field remain unchanged.


Hyper-functional rule set


The third idea was to determine the number of the Strategic cell of the next turn for each Cell of the current turn. This set of rules determines just such a mapping, while the mapping rules from the set of cells of the current operational field to the set of tactical cells of the next tactical field remain unchanged. Features of the choice of the following strategic cells will be disclosed in the analysis of the game.


Playing fields


The second integral component of the game is its playing field. In this section, the game fields proposed by the author will be described and the prerequisites for the final design obtained will be included and described. All the game and auxiliary fields described in the section, as well as their variations, ready for printing on an A4 sheet, are available for download at the link .
The first challenge in the development of playing fields was the fact that they had to be placed on one side of a sheet of Folio format (better known as a tetrad sheet) so that there was room for auxiliary fields on the sheet. Imagine the characteristics of the fields in the form of a pivot table.


Field nameSize in CagesIs it possible
draw by hand
Will fit on
half
tetrad sheet
Playing fields
Basic29x29YesYes
Numbered31x31YesYes
Functional35x31YesYes
Hyper functional35x31NotYes
Complete-YesNot
Auxiliary fields
Field of help11x15YesYes
Move Record Field6xNYesYes
Continuous field
move records
-YesYes

Further, under the appropriate spoilers are images of the fields and notes on their design and purpose.


Base field

image The base field is where the game begins. Having only him you can already play any option of Strategic tic-tac-toe, consists of nine fields for playing tactical tic-tac-toe.


Numbered box

image A numbered field is a Basic field, whose tactical cells are numbered to facilitate tracking of players' activities during the game. The number next to the Tactical cell reflects both the number of the Strategic cell (tens) and the number of the Tactical cell (unit).


Functional field

image A functional field is a numbered field on which a game is possible (it is easier to follow its progress) with a functional set of rules. For this field, the position of the numbers defining the next Strategic cell is defined to the left of the corresponding lines, which allows you to keep the field size so that it can fit on half of the tetrad sheet.


Hyper-functional field

image Hyper-functional field - a game with the Hyper-functional rule set is possible on this field, it cannot be drawn by hand since it contains color gradations for specifying the numbers denoting the next Strategic cell.


Field of help

image This field was created in order for players not to be confused when resuming the game and not remembering who owns which cell (Strategic or Tactical). In the course of the game, players can celebrate their success, thereby preserving the progress of the party.


Move Record Field

image This field was designed to help players remember the progress of the game, the sequence of the course, check the correctness of the playing field. In the proposed version of this field, you must record the numbers of the Strategic (S) Tactical (T) and Operational (O) cells in which the player makes a move during his turn. This variant of the field is mainly intended for the game with the Functional and Hyperfunctional rule set, for the Tactical set the Continuous field for recording moves has been specially developed. There are several versions for this field, all of them are available for download.


Continuous move recording field

image A continuous move recording field is a specially designed move recording field for playing with the Tactical rule set. The need for its appearance was justified by the direct gaming experience of the author. In this field, additional entries and repetition of numbers for the Tactical rule set have been minimized. Below in the article is an example of a game that took place using this field. There are several versions for this field, all of them are available for download.


Full field

image Full field is a set of playing and auxiliary fields, presented on one sheet. There are several versions for this field, all of them are available for download.


Game analysis


This section will discuss how the choice of numbers, meaning the following Strategic Box for the Functional and Hyperfunctional Rule Set, was justified. The method of analyzing the game is as follows:


  1. Construct the transition graph of the playing field - the very mapping is given on convenient for analysis sets, the graph is given by the adjacency matrix.
  2. Exclude from the matrix and memorize the diagonal elements.
  3. Apply the Floyd-Worshell algorithm to the resulting matrix to find the shortest path from all vertices to all vertices.
  4. Remember all the elements, except the diagonal ones, in the diagonal ones, which were previously stored.
  5. Once again, apply the Floyd-Worshell algorithm to the resulting matrix to find the shortest path from vertices to themselves.
  6. Add the diagonal elements obtained in the second pass to the memorized non-diagonal elements.
  7. Build a heatmap of the resulting matrix.
  8. Calculate the average distance between the vertices.

All code implementing the analysis steps can be found by reference . The code is written in Lua 5.1 and runs on both the interpreter and the JIT compiler (the latter is more preferable due to the computational complexity of the proposed method). The final stages of the analysis - the construction of heatmap and the calculation of the average distance was carried out in Excel.


Let's analyze the results. As a reference, take the result for the Tactical rule set. And so for a given set of rules, it is convenient to take a mapping from a set of Tactical cells into it, the average distance between Tactical cells was 1. (8) moves. Not a lot, it means that for a successful game it is worth keeping the last two moves in memory and thinking at least two moves ahead. Heatmap can be seen under the spoiler. For all heatmap, the scale goes from red to green through yellow to increase.


Heatmap Tactical rule set
image

Next we apply the analysis method to the Functional rule set. In order to determine exactly how the numbers in this set of rules existed some prerequisites, their discussion is beyond the scope of this article, let us just say that during the development a rather effective method of creating sets of numbers was proposed, after analyzing which we were able to come to conclusions about the effectiveness of sets selected from received.


For a given set of rules, it was convenient to take a mapping from the set of triplets of Tactical cells into it (the triplets combined Tactical cells 1-3, 4-6, 7-9 for each Strategic cell). Let's look at the results: two sets of numbers were named optimal under the code names map34 and map67 ; for these sets, the average distance between triplets was 2. (6) turns. Their peculiarity is that the distance from each triplet to itself is exactly 3 turns.


Heatmap sets

map34


image

map67


image

For visual comparison, heatmap of other sets are presented:
map14


image

map42


image

Last we analyze the Hyper-functional rule set. A detailed examination of the playing fields, created under this set of rules, the reader could see the pattern in the arrangement of the numbers responsible for the next Strategic cell. Using this pattern, we created nine sets of numbers describing the transition for the Hyper-functional rule set, from which the optimal code-named hmap2 was found. 2.206 3 .


Heatmap' hmap1 hmap2

hmap1


image

hmap2


image


— -, .



:




, . .


')

Source: https://habr.com/ru/post/403903/


All Articles