FS 05 /HOW MAKE IT: very shortly PICTORIAL GUIDE after GOMOKU ENGINE code
go on: < previous page this page 13/16dilay +, delay + 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

This sample: Engine is first (X) player in defensive situation. Second (O) player has one "dilay structure". In "flago" array it is value 197. In this situation for first player best (defensive) move.
But in "flago" array is two squares with highest value 197. Engine found on the one same position in array "flagx" value higher than 99. Value 197 in corresponding position in array "flago" will be increased on 198. And this is now best move for first (X) player. More about "dilay" see pages FS03 (20)





Another sample: Engine is first (X) player and has one "delay structure". Engine has in "flagx" array two squares with highest value 1908. Engine found on the one same position in array "flago" value higher than 999. Value 1098 in corresponding position in array "flagx" will be increased on 1099. And this is now best move for first (X) player. More about "dilay" see pages FS03 (20)




examples in C++
search between "dilay" ("delay") squares:
//rcmax = 19;
//if(flagx[row][column] == 197) dilCx++  //global counter
//if(flagx[row][column] == 198) dillCx++  //global counter
//if(flagx[row][column] == 1098) delMx++  //global counter
//...
if(((threex + threeo) == 0)) {
 for (row = 0; row < rcmax; row++) {
  for (column = 0; column < rcmax; column++) {
   if((xmax > 196) && (xmax < 1097) && (omax > 99) && (omax < 1097)) {
    if((dilCx > 1) && (dillCx == 0) && (flagx[row][column] == 197)) {
     if((flago[row][column] > 99) && (dilayx < flago[row][column])) {
       dilayx = flago[row][column];  //highest value
       }
      }
     }
   if((xmax == 1098) && (omax > 99)) {
    if((delMx > 1) && (flagx[row][column] == 1098)) {
     if((flago[row][column] > 99) && (delayx < flago[row][column])) {
       delayx = flago[row][column];  //highest value
       }
      }
     }
//...
    }
   }
  }
//...
for (row = 0; row < rcmax; row++) {
 for (column = 0; column < rcmax; column++) {
  if((dilayx > 0) && (flagx[row][column] == 197)) {
   if(flago[row][column] == dilayx) flagx[row][column] = 198; 
     }
  if((delayx > 0) && (flagx[row][column] == 1098)) {
   if(flago[row][column] == delayx) flagx[row][column] = 1099; 
     }
//...
go on: < previous page next page >
FREE SECTOR, 2016 (free alliance of developers Pixoria gomoku plug-in engines) page 13/16