diff options
| author | tslil clingman <tslil@posteo.de> | 2021-02-01 21:46:24 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | 11956b2e940f5e1839efab187d898092e819a766 (patch) | |
| tree | d485a6944d3fedbd62690a96bdcb19e0918104af /src/pptdb.c | |
| parent | 328c8d1e3094a942d6a2edd933c9cc4ab09daab1 (diff) | |
Tried some naive iterative deepening. Work on TEI interface next
If TEI is implemented, then i could make use of Morten's
racetrack (https://github.com/MortenLohne/racetrack) and develop a
quantitative measure of the bot's performance. This is the current
priority.
Diffstat (limited to 'src/pptdb.c')
| -rw-r--r-- | src/pptdb.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/pptdb.c b/src/pptdb.c index 557b894..e3fd687 100644 --- a/src/pptdb.c +++ b/src/pptdb.c @@ -32,7 +32,7 @@ int generate, outcome_black; const int max_depth = 6; static void -write_input(const int dx, const int dy) { +write_input(const int dx, const int dy, const uint8_t swap) { // Two numbers for flats remaining fprintf(training_fh,"%.8f,%.8f,", (float)(white_count & 127)/max_flats, @@ -48,7 +48,8 @@ write_input(const int dx, const int dy) { col = (dx>0)?-1:board_size; for (int j = 0; j < board_size; j++) { col += dx; - const uint8_t k = THE_COORDS(col, row); + const uint8_t k = + (swap) ? THE_COORDS(row, col) : THE_COORDS(col, row); val = 0; if (COUNT_AT(k)>depth) { if (depth == 0) { @@ -136,10 +137,10 @@ parse_line(const char *pt, const ssize_t read) { // Generate training data, not too early in the game, all // orientations if (generate && ply + 4 >= total_plies) { - write_input(-1,-1); - write_input(-1,+1); - write_input(+1,-1); - write_input(+1,+1); + write_input(-1, -1, 0); write_input(-1, -1, 1); + write_input(-1, +1, 0); write_input(-1, +1, 1); + write_input(+1, -1, 0); write_input(+1, -1, 1); + write_input(+1, +1, 0); write_input(+1, +1, 1); } // Parse next action while (idx<read && pt[idx++]!=','); |
