From 3d1e8f16ac53aad322f2c681f5f3c25918c58602 Mon Sep 17 00:00:00 2001 From: tslil Date: Tue, 12 Jan 2021 16:48:41 -0500 Subject: Generate the correct format directly --- src/pptdb.c | 33 +++++++-------------------------- src/train5.py | 2 +- 2 files changed, 8 insertions(+), 27 deletions(-) (limited to 'src') diff --git a/src/pptdb.c b/src/pptdb.c index 35aa325..7d8026d 100644 --- a/src/pptdb.c +++ b/src/pptdb.c @@ -6,7 +6,7 @@ float max_flats; uint64_t heights[16]; -int result, generate; +int outcome_black, generate; FILE *training_fh = NULL; const int max_depth = 8; @@ -54,9 +54,7 @@ parse_line(const char *pt, const ssize_t read) { for (idx=0;idx1) heights[COUNT_AT(k)]+=1; } } - - /* - * char buf[20]; - * generate_move(board_size, THE_COORDS(s_col, s_row), dir, steps, drops, buf); - * puts(buf); - */ } - - /* - * if (current_colour == C_BLACK && ply > 15) puts("Here"); - */ - // Generate training data, not too early in the game if (generate && current_colour == C_BLACK && ply > total_plies - 5) { write_input(); - fprintf(training_fh,"%d,%d\n", result, 1-result); + fprintf(training_fh,"%d\n", outcome_black); } // Parse next action while (idx