aboutsummaryrefslogtreecommitdiff
path: root/src/geminict.c
diff options
context:
space:
mode:
authortslil <tslil@posteo.de>2026-09-02 12:21:20 +0100
committertslil <tslil@posteo.de>2026-09-02 19:43:12 +0100
commitf11793dc0fddfcaad04b89827634cbb40fa98e59 (patch)
tree2eaa320f549c13e7ff92412c8746c4ec1fa2b253 /src/geminict.c
parent241156da6f35cb888253e6b8814e7b61a76b4fc7 (diff)
default engines to depth 4, add a rolling window to nn_train.py
I've noticed high variability in training efficacy, part of that i think is due to the fact that the dataset per iteration is not really that large. Sure, it has many rows, but it's fundamentally given by the same engine playing itself with some entropy injection. To remedy this i've expanded the input data for any given iteration to contain --replay-iters many previous datasets as input too. Alongside that decreased the epsilon decay rate for slower "cooling", and included much more of the early game in the training set (min ply 8 -> 4).
Diffstat (limited to 'src/geminict.c')
-rw-r--r--src/geminict.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/geminict.c b/src/geminict.c
index 2e94e7d..48d4380 100644
--- a/src/geminict.c
+++ b/src/geminict.c
@@ -302,18 +302,22 @@ static enum TURN_RESULT negamax_turn(void) {
}
int main(int argc, char **argv) {
- if (argc != 2) {
- puts("Usage: PTN1.[PTN2.][PTN3.] etc");
+ if (argc != 3) {
+ puts("Usage: <depth> PTN1.[PTN2.][PTN3.] etc");
return EXIT_FAILURE;
};
- negamax_search_depth = 5;
+ negamax_search_depth = atoi(argv[1]);
+ if (negamax_search_depth == 0 || negamax_search_depth > 6) {
+ puts("Depth must be an integer in [1, 6]");
+ return EXIT_FAILURE;
+ };
new_game(5);
negamax_init(5);
enum TURN_RESULT tr;
- char *line = argv[1];
+ char *line = argv[2];
// Some maximum length we're willing to parse
uint32_t len = strnlen(line, 65535);
if (!line || len < 2 || len == 65535) {
@@ -365,7 +369,7 @@ int main(int argc, char **argv) {
tr = negamax_turn();
if (tr == T_ERR) {
- puts("This shouldn't happen, ct1986 encountered an error.");
+ puts("This shouldn't happen, geminict encountered an error.");
print_everything();
return EXIT_FAILURE;
} else if (tr == T_WIN)