From 67dd4ba3a9adc6a9db8eb543480e9e82310eeccb Mon Sep 17 00:00:00 2001 From: tslil Date: Tue, 12 Jan 2021 01:15:49 -0500 Subject: Train on data that is close to the end of the game only --- src/pptdb.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'src/pptdb.c') diff --git a/src/pptdb.c b/src/pptdb.c index 773962f..35aa325 100644 --- a/src/pptdb.c +++ b/src/pptdb.c @@ -47,8 +47,15 @@ write_input(void) { // Warning: performs _no_ checks on input whatsoever static enum E_RESULT parse_line(const char *pt, const ssize_t read) { - ssize_t idx = 0; + ssize_t idx; enum E_RESULT r; + int total_plies = 0; + + for (idx=0;idx 15) puts("Here"); + /* + * 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 > 15) { + if (generate && current_colour == C_BLACK && ply > total_plies - 5) { write_input(); fprintf(training_fh,"%d,%d\n", result, 1-result); } -- cgit v1.3.1