From 9c56a2c16bce2a7011994bb9f4a62c3ad2fef2df Mon Sep 17 00:00:00 2001 From: tslil clingman Date: Mon, 18 Jan 2021 14:52:14 -0500 Subject: Added tunable search depth and self-play --- src/pptdb.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/pptdb.c') diff --git a/src/pptdb.c b/src/pptdb.c index 5c5c718..0c8673d 100644 --- a/src/pptdb.c +++ b/src/pptdb.c @@ -115,14 +115,9 @@ parse_line(const char *pt, const ssize_t read) { } // Generate training data, not too early in the game if (generate && ply + 4 >= total_plies) { - /* - * int dx = (rand()&1)?-1:+1; - * int dy = (rand()&1)?-1:+1; - */ - write_input(1,1); - write_input(1,-1); - write_input(-1,1); - write_input(-1,-1); + int dx = (rand()&1)?-1:+1; + int dy = (rand()&1)?-1:+1; + write_input(dx,dy); } // Parse next action while (idx