![]() |
FS 05 /HOW MAKE IT: very shortly PICTORIAL GUIDE after GOMOKU ENGINE code | ![]() |
|||
go on: | < previous page
![]() ![]() ![]() |
next page > | |||
![]() game board summary flagx add ten flagx values M+ in line /001 M+ in line /002 M+ in line /003 M+ in line /004 LastMove /001 LastMove /002 predict low now predict high now 2d delay, dilay more delay now dilay +, delay + three: better end strategy FS05 summary |
Engine search sequence of squares with this nine signs combination. It is squares with X and squares, which contains in array "x_tack" values higher than 0 from others directions than actual. To free squares inside sequence engine rexcord (to array "x_plus") this values. ![]() If to each from this nine sequences add one X sign, their main is new. Obtain structure with (four sorts) compulsory move for oponent. Values of there moves in "flagx" array: 2000(MM), 1100(MC), 1098(delay) and 200(CC). ![]() Array "x_tack" with sum "low predict" values from all directions. This array engine use for detect "dilay" sequences to "high predict". Example: Engine search "high predict" sequences in second diagonal direction. To free (N) squares of sequences engine record "high predict" values to array "pred_x". But this (N) squares in array "flagx" must not contains values higher as 99. ![]() Example: Engine search "high predict" sequences in horizontal direction and record values to array "pred_x". Sum of "high predict" values from four different directions record to array "x_plus". ![]() Squares where is sum values from more different directions. This square is one joint for more "high predict" sequences from different directions. Engine for this sqares record new values to array "xmap" ![]() The same squares use engine for "2d dilay, delay". But values recorded to others squares inside best sequence. Values of this squares in array "flagx" must be higher tan 99. More about "2d dilay, dlelay": see next page. ![]() |
||||
examples in C++
Final hierarchy of "predict" values: //... //sumonx(x_tack[][]): count -, x, xx (2-400) //... //MM(1234/1000 = 1): //if(flagx[][] < 100) liftx = (x_plus[][] % 10000)/1000; //MC(1234/100 = 12 % 10 = 2): //if(flagx[][] < 100) tiffx = ((x_plus[][] % 10000)/100) % 10; //delay(1234/10 = 123 % 10 = 3): //if(flagx[][] < 100) delayx = ((x_plus[][] % 10000)/10) % 10; //CC(1234 % 10 = 4): //if(flagx[][] < 100) bacx = (x_plus[][] % 10000) % 10; // //( 1)MM + MM (+): //if(liftx > 1) xtemporal[][] = 135; //( 2)MM + MC (+): //if((liftx == 1) && (tiffx > 0)) xtemporal[][] = 134; //( 4)MM + delay (+): //if((liftx == 1) && (tiffx == 0) && (delayx > 0)) xtemporal[][] = 132; //( 7)MM + CC (+): //if((liftx == 1) && (tiffx == 0) && (delayx == 0) && (bacx > 0)) xtemporal[][] = 129; //(10)MM + dilay (+): //if((liftx == 1) && (tiffx == 0) && (delayx == 0) && (bacx == 0)) xtemporal[][] = 126; //( 3)MC + MC (+): //if((liftx == 0) && (tiffx > 1)) xtemporal[][] = 133; //( 5)MC + delay (+): //if((liftx == 0) && (tiffx == 1) && (delayx > 0)) xtemporal[][] = 131; //( 8)MC + CC (+): //if((liftx == 0) && (tiffx == 1) && (delayx == 0) && (bacx > 0)) xtemporal[][] = 128; //(11)MC + dilay (+): //if((liftx == 0) && (tiffx == 1) && (delayx == 0) && (bacx == 0)) xtemporal[][] = 125; //( 6)delay + delay (+): //if((liftx == 0) && (tiffx == 0) && (delayx > 1)) xtemporal[][] = 130; //( 9)delay + CC (+): //if((liftx == 0) && (tiffx == 0) && (delayx == 1) && (bacx > 0)) xtemporal[][] = 127; //(12)delay + dilay (+): //if((liftx == 0) && (tiffx == 0) && (delayx == 1) && (bacx == 0)) xtemporal[][] = 124; //(13)CC + CC (+): //if((liftx == 0) && (tiffx == 0) && (delayx == 0) && (bacx > 1)) xtemporal[][] = 123; //(14)CC + dilay (+): //if((liftx == 0) && (tiffx == 0) && (delayx == 0) && (bacx == 1)) xtemporal[][] = 122; //(15)dilay + dilay (+): //if(((liftx + tiffx + delayx + bacx) == 0) && (sumonx > 0)) xtemporal[][] = 121; //... //... //xmap[][] = omap[][] = 0; //if(xtemporal[][] > 100) xmap[][] = xtemporal[][]; //... |
|||||
go on: | < previous page | next page > | |||
FS03: alike theme | FREE SECTOR, 2016 (free alliance of developers Pixoria gomoku plug-in engines) | page 10/16 | |||