aboutsummaryrefslogtreecommitdiff
path: root/src/pptdb.c
diff options
context:
space:
mode:
authortslil clingman <tslil@posteo.de>2021-01-18 14:52:14 -0500
committertslil <tslil@posteo.de>2021-01-18 14:52:14 -0500
commit9b02e4eee66230a4afda84ea55bf865f194c35ce (patch)
tree3c3f50a941db217d972950cce324947b6b0ae129 /src/pptdb.c
parent82de8bf2a3c7bc9f6de6a34d92eae51488948e54 (diff)
Added tunable search depth and self-play
Diffstat (limited to 'src/pptdb.c')
-rw-r--r--src/pptdb.c11
1 files changed, 3 insertions, 8 deletions
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<read && pt[idx++]!=',');