HOW IT WORKS - BRIEF GUIDE TO THIS ENGINE
obsah: last situation analysis: page 11/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

summary

go to page:
pixoria main


Total number of found delay positions is stored by the engine in counters:
delastx, delasto (strong varieties - diif)
dlastx, dlasto (weak varieties - dif)

Before looking for delay structures, the engine saved the count of structures found, into counters:
'three' sequence count:
threex, threeo
M count (in flag arrays):
n_xm, n_om
count of CI + CI (in flag arrays):
n_xcici , n_ocici
count of M + CI and M + CII (in flag arrays):
n_xmci, n_omci
count of M + M (in flag arrays):
n_xmm, n_omm
and the amount of squares that have the value of 48 in RCboard arrays:
if(xRCboard[row][column] == 48)last_mx++;
if(oRCboard[row][column] == 48)last_mo++;

This information is used along with content of arrays xRCboard, oRCboard, flagx, flago, lastMx, lastMo, xmoves, omoves, xDilay, oDilay for final analysis of the situation and for marking a new best move, if applicable.

After the engine is done looking for delay structures, it finds current values of best moves for both players (maxRCx and maxRCo).
If neither of them doesn't have the maximum value (50), the engine compares tham and according to the result determines the value of highest move
topRC. So when the engine now marks some position in RCboard arrays as topRC, it will be the best move.

When the best moves of both players are lower than 49 and the engine has some strong delay moves at its disposal (counter delast > 0): it searches its own array (Dilay) for a value higher than 1. Because such position is shared by multiple delay structures from different lines. If it really finds one, it would now be the engine's best move. So it updates the value at the same position in the corresponding RCboard array. For example:
xRCboard[row][column] = topRC;

Next the engine tries in this step to react the best way (keep initiative) in these situations:

Opponent's best move (maxRC < 50) is higher than best move of the engine and also the opponent has a 'three' structure and at least one delay move as well (see dilemma 1):
- if the 'three' structure and the delay move of the opponent are next to each other, the engine will mark the square between them as the best move.

Opponent's best move (maxRC < 50) is higher than best move of the engine and also the opponent has a 'three' structure and at least 3 squares with a value of 48 (see dilemma 4):
- the engine looks for a square in its own arrays, matching: flag > 999 (M) and lastM > 1
- the engine looks for a square in each player's arrays, matching: flagx > 999 and flago > 999
- the engine looks for a square in its own arrays, matching: flag > 999 (M) and lastM > 0
- the engine looks for a square in its own array: flag > 999 and at the same position in opponent's array: flag % 10 > 0 (CI, CII)
- the engine looks for a square in its own array: flag > 999
The first solution has the highest priority. If the engine really does find a square that meets its conditions, it marks the square as its best move (topRC) and other (worse) solutions are not used. The last solution is the worst and will only delay an inevitable defeat.

Opponent's best move (maxRC < 50) is higher then best move of the engine and the opponent has at least 2 squares with a value of 48, but doesn't have a 'three' structure (see dilemma 2):
- the engine looks for a square in own arrays, matching: flag > 999 (M) and lastM > 1
- the engine looks for a square in each player's arrays, matching: flagx > 999 and flago > 999
- the engine looks for a square in its own arrays, matching: flag > 999 (M) and lastM > 0
- the engine looks for a square in its own array: flag > 999 and at the same position in opponent's array: flag % 10 > 0 (CI, CII)
- the engine looks for a square in its own array: flag > 999
The first solution has the highest priority. If the engine really does find a square that meets its conditions, it marks the square as its best move (topRC) and other (worse) solutions are not used.

Opponent's best move (maxRC < 49) is higher then best move of the engine and the opponent has at least 1 square with a value of 48 and some other square at a different position, comtaining the MCI or MCII combination (see dilemma 3):
- the engine looks for a square in its own arrays, matching: flag > 999 (M) and lastM > 1
- the engine looks for a square in each player's arrays, matching: flagx > 999 and flago > 999
- the engine looks for a square in its own arrays, matching: flag > 999 (M) and lastM > 0
- the engine looks for a square in its own array: flag > 999 and at the same position in opponent's array: flag % 10 > 0 (CI, CII)
- the engine looks for a square in its own array: flag > 999
The first solution has the highest priority. If the engine really does find a square that meets its conditions, it marks the square as its best move (topRC) and other (worse) solutions are not used.

Opponent's best move (maxRC < 48) is higher then best move of the engine and the opponent has at least one delay move:
- the engine looks for a square in opponent's Dilay array with a value higher than 1, and if found, will mark that square as the best move (topRC).

image 014:

The engine is the second ( O ) player, it's its turn and its maxRCo < max RCx (maxRCx < 50):
dilemma 1/ three structure of the opponent is next to their delay move: engine marks square value 48 on the left as the best move (49)
dilemma 2/ the opponent has two moves with value 48 (according to RCboard rules), but no 'three' structure.
dilemma 3/ the opponent has 1 move with value 48 (according to RCboard rules) and another square with value 1101 in array flagx (M+CI according to flag rules) that is 47 in xRCboard array.
dilemma 4/ the opponent has one three structure and also another square with a value of 48.
In cases 2, 3 and 4, the engine tries to use forced moves (if available) to switch to change the situation or delay defeat.

Finally, the engine tracks M counters (n_xm, n_om):
If the best move of the engine is higher or same as the opponent's best move and the value is not too large:
- when the opponent's M count crosses a set threshold, the engine will block an M of opponent.


How will the engine pick one specific move in the end?




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