<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ctak/src/ctlm.c, branch hybrid_rootstrap</title>
<subtitle>An implementation of Tak and a computer opponent in C</subtitle>
<id>https://git.l-3.space/ctak/atom/src/ctlm.c?h=hybrid_rootstrap</id>
<link rel='self' href='https://git.l-3.space/ctak/atom/src/ctlm.c?h=hybrid_rootstrap'/>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/'/>
<updated>2026-09-12T14:47:15Z</updated>
<entry>
<title>flood fill for roads, fix dragon, memoise leaf eval, enable diagonal in nn_train.py</title>
<updated>2026-09-12T14:47:15Z</updated>
<author>
<name>tslil</name>
<email>tslil@posteo.de</email>
</author>
<published>2026-09-11T17:36:10Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/commit/?id=a361728f39812e25599323c52510c0eb3131bd90'/>
<id>urn:sha1:a361728f39812e25599323c52510c0eb3131bd90</id>
<content type='text'>
</content>
</entry>
<entry>
<title>default engines to depth 4, add a rolling window to nn_train.py</title>
<updated>2026-09-02T18:43:12Z</updated>
<author>
<name>tslil</name>
<email>tslil@posteo.de</email>
</author>
<published>2026-09-02T11:21:20Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/commit/?id=f11793dc0fddfcaad04b89827634cbb40fa98e59'/>
<id>urn:sha1:f11793dc0fddfcaad04b89827634cbb40fa98e59</id>
<content type='text'>
I've noticed high variability in training efficacy, part of that i think is due to the fact that the dataset per iteration is not really that large. Sure, it has many rows, but it's fundamentally given by the same engine playing itself with some entropy injection. To remedy this i've expanded the input data for any given iteration to contain --replay-iters many previous datasets as input too. Alongside that decreased the epsilon decay rate for slower "cooling", and included much more of the early game in the training set (min ply 8 -&gt; 4).
</content>
</entry>
<entry>
<title>TD(lambda), and a big rework</title>
<updated>2026-09-02T11:13:01Z</updated>
<author>
<name>tslil</name>
<email>tslil@posteo.de</email>
</author>
<published>2026-08-30T18:46:07Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/commit/?id=241156da6f35cb888253e6b8814e7b61a76b4fc7'/>
<id>urn:sha1:241156da6f35cb888253e6b8814e7b61a76b4fc7</id>
<content type='text'>
NOTE: 6x6 weights are as-yet untrained

On the performance side:
* switch from linked-list chaining hash table to direct mapping
* cache check_win by hash
* persist transposition tables across plies (this was a big deal and difficult to puzzle out)
* add align directives to the network floats
* prepare_nn_input gained a small LUT to avoid branching (i suppose you might call this 1D embedding)
* apply mtune=native for the native builds

On the correctness side:
* Zobrist has now includes the ply parity
* the network now predicts something in [-1, 1] using tanh (approximated by polynomials)
* the training object is now MSE because we're learning a value estimate
* use .clangd instead of compile_commands.json

On the training side:
* completely forgo human-derived data set
* implement td(lambda), self-play, tournaments
</content>
</entry>
<entry>
<title>might as well enable size 6</title>
<updated>2023-01-21T21:00:57Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2023-01-21T18:30:45Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/commit/?id=72c5056c5aa614d9a86f8b760955cfcf96c44be4'/>
<id>urn:sha1:72c5056c5aa614d9a86f8b760955cfcf96c44be4</id>
<content type='text'>
Same network architecture, same training principle. Predictably this is
too slow.

Also statically allocate state in driver programmes.
</content>
</entry>
<entry>
<title>switch to explicit game state &amp; important bug fix &amp; clang format</title>
<updated>2023-01-16T11:25:47Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2023-01-15T20:31:00Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/commit/?id=ef785da721a47e6d13aa854c795d2a9e269285b0'/>
<id>urn:sha1:ef785da721a47e6d13aa854c795d2a9e269285b0</id>
<content type='text'>
Previously the code base assumed that there was a single, global game
state which was the implicit target of all actions taken. Looking
ahead at architectural improvements, this has now been (almost
entirely) made explicit and functions take tak_state_p where
necessary (and also where unnecessary).

Two important fixes to actions.c were made:

- Previously when generating the possible stack moves, stack height
overflows (&gt; 15) were not taken into account and this resulted in the
tree search corrupting the board state. Now action search does not
list all legal actions, rather the subset of these encodeable by the
implementation.

- The check for crushing on a stack move was incorrect (too strict),
and this resulted in many legitimate moves being igonored.

Finally, in other changes, weights have also been improved by training
all games instead of some subset for chosen players, and clang-format
was run on the codebase.
</content>
</entry>
<entry>
<title>new neural network arch (faster + better) &amp; minor changes + fixes</title>
<updated>2023-01-15T15:03:37Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2023-01-15T15:03:37Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/commit/?id=81213c273fd874aba95c45bd692e14079ebce434'/>
<id>urn:sha1:81213c273fd874aba95c45bd692e14079ebce434</id>
<content type='text'>
Gone is the convolutional neural network, for it turns out not only is
it more difficult to train, but all of the extra information about
board layers didn't make much of a difference at this size.

So cnn1986 has been replaced by nn1986, a standard, two-layer, dense
nn configured as a binary classifier and (mis)used in that capacity.
Note: total number of parameters is unchanged.

HARK: this new nn exposes a bug somewhere in ctak. Run ctlm with
self-play to see the completely borked board state at the end.
</content>
</entry>
<entry>
<title>Welcome geminict!</title>
<updated>2021-10-05T22:23:32Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2021-10-05T22:22:23Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/commit/?id=c9fa20b590de94a9ddb408e277065a117b16570b'/>
<id>urn:sha1:c9fa20b590de94a9ddb408e277065a117b16570b</id>
<content type='text'>
This is a special interface to negamax_cnn1986 which is designed to
generate output for use in a CGI tak interface to be used over gemini.

Also in this commit is a reformating of the various source files to
use the traditional tab width of 8 spaces.
</content>
</entry>
<entry>
<title>Rename ct_k -&gt; ct, IANAL but ...</title>
<updated>2021-02-05T21:49:14Z</updated>
<author>
<name>tslil</name>
<email>tslil@posteo.de</email>
</author>
<published>2021-02-05T21:49:14Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/commit/?id=5c8e082276a24b9f266396874d3e72c05990a3df'/>
<id>urn:sha1:5c8e082276a24b9f266396874d3e72c05990a3df</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Correct line clearing behaviour, EXIT_FAILURE &lt;~ -1</title>
<updated>2021-02-05T21:27:40Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2021-02-05T21:24:39Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/commit/?id=2122a979fefd27112720a47ecf585933fd9bcde4'/>
<id>urn:sha1:2122a979fefd27112720a47ecf585933fd9bcde4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Renamed binaries</title>
<updated>2021-02-05T19:02:36Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2021-02-05T19:02:36Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/commit/?id=ed070ebc252f6d6d392b51b3a836bd08965b3946'/>
<id>urn:sha1:ed070ebc252f6d6d392b51b3a836bd08965b3946</id>
<content type='text'>
</content>
</entry>
</feed>
