| | |
| | | #endif |
| | | |
| | | int inverted = 0; |
| | | int noi = 0; |
| | | |
| | | void train_go(char *cfgfile, char *weightfile) |
| | | { |
| | |
| | | printf("\n\n"); |
| | | printf(" "); |
| | | for(i = 0; i < 19; ++i){ |
| | | printf("%c ", 'A' + i + 1*(i > 7)); |
| | | printf("%c ", 'A' + i + 1*(i > 7 && noi)); |
| | | } |
| | | printf("\n"); |
| | | for(j = 0; j < 19; ++j){ |
| | |
| | | int index = indexes[i]; |
| | | row = index / 19; |
| | | col = index % 19; |
| | | printf("Suggested: %c %d, %.2f%%\n", col + 'A' + 1*(col > 7), (inverted)?19 - row : row+1, move[index]*100); |
| | | printf("Suggested: %c %d, %.2f%%\n", col + 'A' + 1*(col > 7 && noi), (inverted)?19 - row : row+1, move[index]*100); |
| | | } |
| | | int index = indexes[0]; |
| | | int rec_row = index / 19; |
| | |
| | | num = sscanf(line, "%c %c %d", &g, &c, &row); |
| | | row = (inverted)?19 - row : row+1; |
| | | col = c - 'A'; |
| | | if (col > 7) col -= 1; |
| | | if (col > 7 && noi) col -= 1; |
| | | if (num == 3) board[row*19 + col] = 0; |
| | | } |
| | | } else if(num == 2){ |
| | | row = (inverted)?19 - row : row+1; |
| | | col = c - 'A'; |
| | | if (col > 7) col -= 1; |
| | | if (col > 7 && noi) col -= 1; |
| | | board[row*19 + col] = 1; |
| | | }else{ |
| | | free(line); |