FS 05 /HOW MAKE IT: very shortly PICTORIAL GUIDE after GOMOKU ENGINE code
go on: < previous page this page 3/16M+ in line /001 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

Update "flagx" ("flago") array: If in playng area is any of this six sequences (with X and N signs, or O and N signs), engine enhance "flagx" ("flago") value in one special square position on 2000 (2K).
More about "flagx" and "lagx" arrays: see previous page or see pages FS03 (13)





The same six sequences and next five sequences: Engine add to temporaral arrays this values.




Sample picture: If engine is second (O) player and top value in "xtemporal" array is bigger than 11, engine add to array "flagx" on the same position 1000. So now here is value 3000 (3K). His best move in this situation is defensive.




examples in C++
search and write "M+ in line" in horizontal direction:
//for (row = 0; row < rcmax; row++) {  for (column = 0; column < rcmax; column++) {
//...
//   if(xxx|.--xxx) {  //here is:(.) row, column
//     xtemporal[row][column + 1] += 11, flagx[row][column + 1] += 1000;
//     }
//   if(x|.x-x-x) {  //here is:(.) row, column
//     xtemporal[row][column] += 10;
//     xtemporal[row][column + 2] += 11, flagx[row][column + 2] += 1000;
//     xtemporal[row][column + 4] += 10;
//     }
//   if(xx|.x--xx) {  //here is:(.) row, column
//     xtemporal[row][column] += 10;
//     xtemporal[row][column + 2] += 11, flagx[row][column + 2] += 1000;
//     xtemporal[row][column + 3] += 10;
//     }
//   if(xx|.-x-xx) {  //here is:(.) row, column
//     xtemporal[row][column] += 10;
//     xtemporal[row][column + 1] += 11, flagx[row][column + 1] += 1000;
//     xtemporal[row][column + 3] += 10;
//     }
//   if(x|.xx--x) {  //here is:(.) row, column
//     xtemporal[row][column] += 10;
//     xtemporal[row][column + 3] += 11, flagx[row][column + 3] += 1000;
//     xtemporal[row][column + 4] += 10;
//     }
//   if(x|.-xx-x) {  //here is:(.) row, column
//     xtemporal[row][column] += 10;
//     xtemporal[row][column + 1] += 11, flagx[row][column + 1] += 1000;
//     xtemporal[row][column + 4] += 10;
//     }
//   if(x|.xx-x) {  //here is:(.) row, column
//     xtemporal[row][column] += 1;
//     xtemporal[row][column + 3] += 1;
//     }
//   if(.xx-x-) {  //here is:(.) row, column
//     xtemporal[row][column] += 1;
//     xtemporal[row][column + 3] += 1;
//     xtemporal[row][column + 5] += 1;
//     }
//   if(.x-xx-) {  //here is:(.) row, column
//     xtemporal[row][column] += 1;
//     xtemporal[row][column + 2] += 1;
//     xtemporal[row][column + 5] += 1;
//     }
//   if(.-xxx-) {  //here is:(.) row, column
//     xtemporal[row][column] += 1;
//     }
//   if(.xxx--) {  //here is:(.) row, column
//     xtemporal[row][column] += 1;
//     }
//...
     if(dilCx < xtemporal[row][column]) dilCx = xtemporal[row][column];  //maximal value
//...
//   }  //for(column)
//   }  //for(row)
//for (row = 0; row < rcmax; row++) {  for (column = 0; column < rcmax; column++) {
     if((who == 0) && (dilCx > 11) && (xtemporal[row][column] == dilCx)) {
       flagx[row][column] += 1000;
//...
//   xtemporal[row][column] = otemporal[row][column] = 0;  //erase temporal arrays
//   }  //for(column)
//   }  //for(row)
go on: < previous page next page >
iM007: alike theme FREE SECTOR, 2016 (free alliance of developers Pixoria gomoku plug-in engines) page 3/16