aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortslil clingman <tslil@posteo.de>2021-01-25 17:22:48 -0500
committertslil <tslil@posteo.de>2026-08-28 19:37:41 +0100
commit8418ddf3187ec0f526ef5d8dbb0689fc786fac92 (patch)
treeaeb5b1ad5b0df50b0ce5c484d732ffd6534223e0 /src
parent034b4035f584f83669f7c4332d8befc3237e160c (diff)
Still some bugs, standing stone becomes flat at depth4 self-play??
Diffstat (limited to 'src')
-rw-r--r--src/ctaklm.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/ctaklm.c b/src/ctaklm.c
index efd998a..5dd4164 100644
--- a/src/ctaklm.c
+++ b/src/ctaklm.c
@@ -298,13 +298,13 @@ static float sum_depth, num_check, progress;
// Set up output function for negamax
inline void
-negamax_display_progress(const uint8_t depth) {
+negamax_display_progress(const uint8_t depth, const uint32_t length) {
sum_depth += depth;
num_check += 1;
if (depth == negamax_search_depth) {
progress++;
printf("\x1B[1GComputing: %.0f%%",
- (progress*100)/(board_size*board_size));
+ (progress*100)/length);
fflush(stdout);
}
}
@@ -421,6 +421,19 @@ main(int argc, char **argv) {
negamax_init(5);
tt_init();
+
+ /*
+ * celldat[0x16]=0x30;
+ * colours[0x16]=4;
+ * print_board();
+ *
+ * action_list_t a = {.next = NULL, .type = A_MOVE, .loc = 0x16, .data0 = 0x1, .data1 = 0x12};
+ * action_take(&a); print_board();
+ * action_undo(&a); print_board();
+ * return 0;
+ */
+
+
// Test harness
if (argc > 1) {
negamax_search_depth = 5;