aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/match.c4
-rwxr-xr-xsrc/nn_train.py2
-rw-r--r--src/selfplay.c12
3 files changed, 9 insertions, 9 deletions
diff --git a/src/match.c b/src/match.c
index eff1931..94afe48 100644
--- a/src/match.c
+++ b/src/match.c
@@ -53,7 +53,7 @@ static inline float six_cand(tak_state_p state) {
}
-#define MAX_PLY 250
+#define MAX_PLY 255
static tak_state_p state;
@@ -79,7 +79,7 @@ static int play_game(const nn_function current_fn, const nn_function cand_fn,
reset_state(state, state->board_size);
char ptn[16];
- for (uint32_t ply = 0; ply < MAX_PLY; ply++) {
+ for (uint32_t ply = 0; ply + negamax_search_depth < MAX_PLY; ply++) {
if (ply < random_opening_length) {
uint32_t n_actions;
action_t *actions = actions_generate(state, &n_actions);
diff --git a/src/nn_train.py b/src/nn_train.py
index e9a2d2c..cde7a98 100755
--- a/src/nn_train.py
+++ b/src/nn_train.py
@@ -596,7 +596,7 @@ def main() -> None:
help="fraction of rows held out for validation",
)
_ = p.add_argument(
- "--matchs",
+ "--matches",
type=int,
default=200,
help="how many matches in a tournament",
diff --git a/src/selfplay.c b/src/selfplay.c
index e8ff506..5ffa6f6 100644
--- a/src/selfplay.c
+++ b/src/selfplay.c
@@ -75,7 +75,7 @@ static int play_game(const uint8_t min_ply) {
n_rows = 0;
char ptn[16];
- for (uint32_t ply = 0; ply < MAX_PLY; ply++) {
+ for (uint32_t ply = 0; ply + negamax_search_depth < MAX_PLY; ply++) {
if (ply < min_ply) {
uint32_t n_actions;
action_t *actions = actions_generate(state, &n_actions);
@@ -127,11 +127,11 @@ static int play_game(const uint8_t min_ply) {
const char *usage =
"selfplay, one game of asymmetric self-play training data.\n\n\
-Usage: selfplay <size> <depth> <min_ply>\n\n \
-Plays a single game of <size>x<size> self-play, with <min_ply> moves made randomly. Only the deterministic plies are written to stdout, one CSV row per recorded search, from ply <min_ply> onwards:\n\n \
-\tparity,white_flats,black_flats,<cell ids...>,game_id,R,terminal,leaf_R\n\n \
-nn_train.py runs many of these in parallel to generate training data.\n\n \
-Copyright (C) 2026, tslil clingman\n\n \
+Usage: selfplay <size> <depth> <min_ply>\n\n\
+Plays a single game of <size>x<size> self-play, with <min_ply> moves made randomly. Only the deterministic plies are written to stdout, one CSV row per recorded search, from ply <min_ply> onwards:\n\n\
+\tparity,white_flats,black_flats,<cell ids...>,game_id,R,terminal,leaf_R\n\n\
+nn_train.py runs many of these in parallel to generate training data.\n\n\
+Copyright (C) 2026, tslil clingman\n\n\
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.";
int main(int argc, char **argv) {