FS 05 /HOW MAKE IT: very shortly PICTORIAL GUIDE after GOMOKU ENGINE code
go on: < previous page this page 8/16LastMove /002 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 sequences of signs in accordance with this rules: Sequence have five squares and of it three square is free (N). One from this free squares must contains "flagx" ("x_tack") value 1000. Direction of this value must be different from sequence.




Here is all squares combinations. Engine record LastMove position into now free array "x_plus".




One sample with found sequence of five squares.




examples in C++
search LM (different lines) in horizontal direction:
//...
//plusx = pluso = 0;          
//for(loop = 0; loop < 5; loop++) {
//   write = column + loop;
//   switch(matRCboard[row][write]) {
//         case 'X': sumx += 1, xosum += 1; break;
//         case 'O': sumo += 1, xosum += 1; break;
//         case 'N': switch(x_tack[row][write]) {
//                         case 0: break;
//                         case 1: break;  //C (100) (-)
//                       case  10: plusx++;  //M (1000) (-)
//                       case 100: plusx++;  //MM (2000) (-)
//                        default: lagx += 1;  //M,C (|,\,/)
//...
//                         }  //switch(x_tack)
//...
//         }  //switch(matRCboard)
//   }  //for(loop)
//...
  if((sumx == 2) && (sumx == xosum)) {
    for(loop = 0; loop < 5; loop++) {
       write = column + loop;
       if(matRCboard[row][write] == 'N') {
         switch(x_tack[row][write]) {
//             case 0: break;
//             case 1: break;  //C (-)
//             case 2: break;  //C (|)
//             case 3: break;  //C (\)
//             case 4: break;  //C (/)
//           case 100: break;  //MM (-)
//           case 200: break;  //MM (|)
//           case 300: break;  //MM (\)
//           case 400: break;  //MM (/)
//            case 10: ...     //M (-)
              default: if((lagx == 1) && (plusx == 0)) {  //M (|,\,/)
                         if(flagx[row][write] < 1100) x_plus[row][write] = 1;  //LM
                         }
//...
               }  //switch(x_tack)
         }  //if(matRCboard)
       }  //for(loop)
    }  //if
//...
go on: < previous page next page >
iM007: alike theme FREE SECTOR, 2016 (free alliance of developers Pixoria gomoku plug-in engines) page 8/16