|HOW IT WORKS - BRIEF GUIDE TO THIS ENGINE|
|obsah:||first two levels of move evaluation, examples:||page 5/12|
inputs and outputs
first 2 layers
flag rules (1D)
flag combination (2D)
go to page:
If we let the engine perform only the basic step of the analysis and provided no further evaluation rules, the values would look like this in the end (example):
On the left, we can see how the engine evaluates empty squares from point of view of player one (X), on the right as player two. Now is the move of player ( O ). The numbers inside free squares are values saved in the corresponding work arrays.
The engine found three best moves (30) it has to pick one (at random).
This is the only evaluation method used by the first engine from independent Machines: im000 (for download at www.pixoria.eu with source).
Here's how the values will change by adding the rules described on previous page (RCboard rules):
The changes (in blue) are most apparent in increased differences between square values.
Now there are only two best moves (45).
Engine ( O ) should now move and it should pickk one of them randomly. For player two ( O ) the upper of the two best moves (45) is better.
But the rules of both levels cannot be used. They are player-indifferent. That means the evaluation is not affected by who begins the game etc. Only higher-level rules consider this.
How changes with next layer? Click here to view image.
At the end of the algorithm, the engine picks the best move this way: It alternates searching the arrays xRCboard and oRCboard from maximum value (50) to zero. The first value found is the best move's value. The engine always starts searching its "own" array for each value and only if it doesn't find it in its own array, it searches the opponent's array. It always searches the entire array because there can be multiple squares with the same (current) value. If it finds more of them in an array, it will pick one square at random.
For instance (previous image): the engine is ( O ), and searches the number 50 first in array oRCboard (nothing there), and then in array xRCboard (not there either), so it looks for values 49, 48, 47, 46 ... searches value 45 in array oRCboard (not there either), then ... In array xRCboard it will find two squares with value 45. It will pseudo-randomly pick one of them and send its position on the game board board to pixoria:
The engine did not finish its analysis of the situation on game board.
|go top||independent Machines develop lab (2013)||page 5/12|