FS 03 /HOW MAKE IT: very shortly PICTORIAL GUIDE after GOMOKU ENGINE code
go on: < previous page this page 29/30flag to RCboard next page >


game board
summary

sumx and sumo
sumx to xmap
xmap between x add
xmap between x less
xmap more samples
zeroX and zeroO
xmap editing
x_plus and middx
x_plus and zeroX
x_away and o_away
xRCboard and liftx
xRCboard add & less
xmap to lagx
lagx 5000 & x_away
lagx 100 & x_away
lagx 10 and lagx 1
lagx to x_tack
xRCboard allways
flagx allways

delayx
dilayx
pred_x
pred_x to xmap
choose from flagx
more delay
more delay samples
three
crossmix
more delay use
flag to RCboard

summary

This sample: first layer of values in arrays "xRCboard" and oRCboard" (all directions). How make this values here?
About edits "RCboard" arrays: see page 12 and page 18
First layer of "RCboard" values is independent: values unswayed, if engine are first (X) or second (O) player.





Resultant values in arrays "flagx" and "flago" after all previous editing (all directions). Inside box with red borders isn't "flagx" value (100), but value (194) from array "xmap". That array contains "predict" values.
More about "predict" see page 21 and page 22
Certain edits of "flag" values is depend on "who". Values is changed, if engine are first or second player. See on previous pages: "more delay use" and "crossmix".





Any values inside "RCboard" arrays is now transform. Transformation depend on contents in arrays "flag" and "who" is engine. Here is engine first player (X). Resultant values in arrays "xRCboard" and oRCboard after update. On this case have engine (first player) two best (defensive) moves: value 84 in array "oRCboard".




And here is engine second player (O). Resultant values in arrays "xRCboard" and oRCboard after update. On this case have engine (second player) two best (offensive) moves: value 94 in array "oRCboard".




More about "who" im007 HTML document
How engine (subprogram) choose best move (dMove) for sending to pixoria (main program):
At the end of the algorithm ... im007 HTML document

With one difference: maximum "RCboard" value for this engine (FS03) is 100.
examples in C++
Filter for transformation values in array "xRCboard" and "oRCboard":
//table for transformation, if engine are first player(X):
//int this_are_x[34] = {0, 0, 48, 48, 0, 53, 0, 0, 0, ... };
//////int o_flat[34] = {0, 0, 0, 0, 0, 49, 49, 0, 52, ... };
//table for transformation, if engine are second player (O):
//int this_are_o[34] = {0, 0, 49, 49, 0, 51, 52, 0, 53, ... };
//////int x_flat[34] = {0, 0, 0, 0, 0, 48, 49, 0, 51, ... };
//switch (who) { // case 1: for(on = 0; on < 34; on++) {x_flat[(on)] = this_are_x[(on)];};break; // case 0: for(on = 0; on < 34; on++) {o_flat[(on)] = this_are_o[(on)];};break; //}
//int minor[2] = {6, 2}; //values of repellent //minimin = 2*(minor[(1)]); // = 2*2 = 4 //maximax = minimin + 2*(minor[(0)]); // = 4 + 2*6 = 16
//for((row = 0; row < rcmax; row++) { // for(column = 0; column < rcmax; column++) { // if(flagx[row][column] == 0) lagx = x_flat[(0)]; // if(flagx[row][column] > 0) lagx = x_flat[(1)]; // if(flagx[row][column] > 1) lagx = x_flat[(2)]; // íf...
//those numbers here create game straregy of engine FS03 //-------------------------------------------------------------------------------------- // | if flagx | who = 1 (X) | who = 0 (O) // F R E E S E C T O R | or flago |---------------------|----------------------- // | value is | lagx / lago | lago / lagx //-----------------------------|----------|----------/----------|----------/------------ //00 | == 0 | 0 / 0 | 0 / 0 //01 | > 0 | 0 / 0 | 0 / 0 //02 | > 1 | 48 / 0 | 49 / 0 //03 | > 2 | 48 / 0 | 49 / 0 //04 X | == 10 | 0 / 0 | 0 / 0 //05 | > 10 | 53 / 49 | 51 / 48 //06 X + X | >= 20 | 0 / 49 | 52 / 49 //07 C | == 100 | 0 / 0 | 0 / 0 //08 | > 100 | 0 / 52 | 53 / 51 //09 C + X | >= 110 | 0 / 52 | 0 / 54 //-------------------------------------------------------------------------------------- //10 predict (C) (if xmap, omap) == 193 | 60 / 0 | 0 / 0 //11 predict (C) (if xmap, omap) == 194 | 62 / 0 | 56 / 57 //-------------------------------------------------------------------------------------- //14 dilay (C) | == 197 | 66 / 64 | 65 / 63 //15 dilay (C) and dilay (C) | == 198 | 67 / 65 | 66 / 64 //16 delay (C)(unused) - == 199 - 0 - 0 - 0 - 0 //17 C + C | >= 200 | 69 / 66 | 68 / 65 //18 M | >= 1000 | 0 / 0 | 0 / 0 //19 (oxxx.-/xooo.-) | >= 1005 | 51 / 0 | 0 / 0 //20 > 1000 (except 105) | > 1000 | 0 / 0 | 0 / 52 //21 M + X | >= 1010 | 0 / 0 | 0 / 52 //-------------------------------------------------------------------------------------- //12 predict (M) (if xmap, omap) == 195 | 61 / 0 | 0 / 51 //13 predict (M) (if xmap, omap) == 196 | 63 / 0 | 58 / 59 //-------------------------------------------------------------------------------------- //22 dilay (M) | == 1097 | 70 / 68 | 70 / 69 //23 delay (M) | == 1098 | 90 / 80 | 90 / 80 //24 delay (M) and delay (M) | == 1099 | 91 / 81 | 91 / 81 //25 M + C | >= 1100 | 92 / 82 | 92 / 82 //26 M + M | >= 2000 | 93 / 83 | 93 / 83 //27 three (D) | == 5000 | 94 / 84 | 94 / 84 //28 | > 5000 | 95 / 85 | 95 / 85 //29 D + C | >= 5100 | 96 / 86 | 96 / 86 //30 D + M | >= 6000 | 97 / 87 | 97 / 87 //31 more delay (C) | == 9998 | 0 / 92 | 0 / 92 //32 more delay (M)/ crossmix | == 9999 | 98 / 93 | 98 / 93 //33 D + D | >= 10000 | 99 / 88 | 99 / 88 //--------------------------------------------------------------------------------------
if((lagx > 0) && (xRCboard[row][column] < (200 - maximax))) { xRCboard[row][column] = lagx; } if(xRCboard[row][column] > 100) xRCboard[row][column] = 100; if(xRCboard[row][column] < 0) xRCboard[row][column] = 0;
if((lago > 0) && (oRCboard[row][column] < (200 - maximax))) { oRCboard[row][column] = lago; } if(oRCboard[row][column] > 100) oRCboard[row][column] = 100; ifoRCboard[row][column] < 0) oRCboard[row][column] = 0;
// } //for(column) //} //(row)
go on: < previous page next page >
FREE SECTOR, 2014 (free alliance of developers Pixoria gomoku plug-in engines) page 29/30