diff options
| author | tslil clingman <tslil@posteo.de> | 2023-01-15 16:03:37 +0100 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | ee216c008a188a9436fedb85c70ee5d1719733b1 (patch) | |
| tree | f1d8fa5efd71851dd4f8d3e2b26b1f95a6086cb9 /src/cttei.c | |
| parent | 7cf3a656d0c923dd92025c09747461f2f2d1bed0 (diff) | |
new neural network arch (faster + better) & minor changes + fixes
Gone is the convolutional neural network, for it turns out not only is
it more difficult to train, but all of the extra information about
board layers didn't make much of a difference at this size.
So cnn1986 has been replaced by nn1986, a standard, two-layer, dense
nn configured as a binary classifier and (mis)used in that capacity.
Note: total number of parameters is unchanged.
HARK: this new nn exposes a bug somewhere in ctak. Run ctlm with
self-play to see the completely borked board state at the end.
Diffstat (limited to 'src/cttei.c')
| -rw-r--r-- | src/cttei.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/cttei.c b/src/cttei.c index aae1045..534faef 100644 --- a/src/cttei.c +++ b/src/cttei.c @@ -28,8 +28,8 @@ // Set up output function for negamax inline void negamax_display_progress(const uint8_t cur_depth, - const uint8_t init_depth, - const uint32_t length) { + const uint8_t init_depth, + const uint32_t length) { (void)(cur_depth); (void)(init_depth); (void)(length); @@ -81,7 +81,7 @@ handle_tei(char *line) { enum ACT_RESULT r = do_ptn(negamax_ptn); if (r != ACT_OK && r != GAME_END) return TEI_FAILURE; printf("info score cp %f pv %s\nbestmove %s\n", - minimax, negamax_ptn, negamax_ptn); + minimax, negamax_ptn, negamax_ptn); } else if (!strncmp(line, "position", 8)) { return parse_position_string(line + 9); } else if (!strncmp(line, "teinewgame", 10)) { @@ -126,7 +126,7 @@ int main(int argc, char **argv) { line = NULL; // Identify ourselves, and send the options - puts("id name cttei"); + puts("id name cttei_dense"); puts("id author tslil clingman"); puts("option name Depth type spin default 4 min 2 max 6"); puts("teiok"); @@ -141,15 +141,15 @@ int main(int argc, char **argv) { if ((read = getline(&line, &alloc_size, stdin)) > 0) { line[read-1] = 0; switch (handle_tei(line)) { - case TEI_FAILURE: return EXIT_FAILURE; - case TEI_QUIT: playing = 0; // fall-through - case TEI_OK: { - if (line) { - free(line); - line = NULL; - } - break; - } + case TEI_FAILURE: return EXIT_FAILURE; + case TEI_QUIT: playing = 0; // fall-through + case TEI_OK: { + if (line) { + free(line); + line = NULL; + } + break; + } } } else { break; |
