obsah: three page 9/12

inputs and outputs
first moves
basic analysis
RCboard rules
first 2 layers
flag rules (1D)
flag combination (2D)
LM moves
three structure
delay rules
last analysis


go to page:
pixoria main

Now the engine looks for 'three' structures: NNXXXNN ( NNOOONN ). It searches using marks in the delay arrays because they also contain structure orientation. If such character combination happens to be on the game board, then the player who owns the three characters in the middle of the sequence is close to winning. The player whose move it is and who does not own the three chaacters, should therefore act: for instance block opponent's three characters by their own. But from which side? Because the structure is symmetrical, the side could be picked randomly.
But the symmetry can be broken in some way by structures from other lines close by.

When the engine is player two ( O ) and finds a 'three' ( NNXXXNN ) of player one, it tests the opponent's sequence on both edges ( N ). It will look at the flagx array to see which side has a value higher than 1100. For example, if the value on the left is higher than 1100 (M+CI) and on the right it is lower (M), the engine will decrease the value on the right ( N ) in array xRCboard (48) by one. That means it will select the left N as a better move.

example: image 010:

The engine is player two ( O ) and it is its turn. The numbers are its move values. In the left image, there are two best moves with a value of 48. If the engine (player 'O') selected the move on the right, player 'X' would, by a move to the square valued at 47, force the engine to to move to 48 on the left, and with the next move (to 38) would already have a sequence of four of own symbols and a certain victory.
This is why the engine will decrease the value of the best move on the right by 1, to 47 (xRCboard update).

The engine records the found 'three' count in variables threex and threeo.
It will also record the number of values from 1000 to 1100 (M) found in flag arrays into variables
n_xm and n_om.
Next, the engine stores the coordinates of the inner free squares of the 'three' structure (
N ) into outer free squares at the edge of the 'three' structure ( N ) into arrays xmoves and omoves.

Finally, the marks from delay arrays are removed:
delayx[row][column] = delayx[row][column] - 4;

go top independent Machines develop lab (2013) page 9/12