From 1ca3309dad9d412870b2b793f33af7a7ccabd514 Mon Sep 17 00:00:00 2001 From: tslil Date: Thu, 3 Sep 2026 20:17:22 +0100 Subject: TD-leaf and another negamax bug TD-lambda and TD-leaf are separated by the observation that minimax with a parameterised leaf heuristic is differentiable* in the parameters. "All" that had to be done was to extract the "principal variation": which one position survived all of the pruning to become the reported value. This was a bit fiddly and uncovered a subtle bug (again) in negamax.c: we were not being complete in our overriding of the TT entry and by omitting key it was possible that later searches would find incorrect values. The more interesting question to me was: how do we introduce enough variety while not corrupting the PV chain? I settled on having selfplay have one of the players be epsilon-random but the other greedy (minimax) and simply report only the greedy portion PV chain. This appears to work well enough in practice and doesn't introduce nonsense training data for the net (we don't force its actions to be nonsensical). I also deciced, perhaps in a departure from tradition, that we had good supervised labels for PVs that happened to be winning states, so the training overrides the targets in that case. Finally rolled back some of the ambition in nn_train.py default arguments. *almost always --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 3daa539..762c366 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## Overview 1. ctak is a C library for the game of Tak -2. ctaklm is a line-mode interface to ctak and a computer opponent (for 5x5) +2. ctaklm is a line-mode interface to ctak and a computer opponent (for 5x5 and 6x6) 3. ct1986 is a similar interface, but designed for a Raspberry Pi Zero running buildroot and displaying output on a character LCD. 4. cttei is a TEI-speaking game engine for use wherever TEI is accepted. 5. geminict is a special adaptation of ctak for use in a gemini CGI web-server. -- cgit v1.3.1