<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ctak/include/tak.c, branch main</title>
<subtitle>An implementation of Tak and a computer opponent in C</subtitle>
<id>https://git.l-3.space/cgit/ctak/atom?h=main</id>
<link rel='self' href='https://git.l-3.space/cgit/ctak/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.l-3.space/cgit/ctak/'/>
<updated>2026-08-28T18:37:41Z</updated>
<entry>
<title>switch to explicit game state &amp; important bug fix &amp; clang format</title>
<updated>2026-08-28T18:37:41Z</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/cgit/ctak/commit/?id=0223a9bec5535fced1a7698b55fd42155d9b0446'/>
<id>urn:sha1:0223a9bec5535fced1a7698b55fd42155d9b0446</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>Welcome geminict!</title>
<updated>2026-08-28T18:37:41Z</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/cgit/ctak/commit/?id=cf175fc346f1b208766b1f55d3673a7b208f322a'/>
<id>urn:sha1:cf175fc346f1b208766b1f55d3673a7b208f322a</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>More towel wringing: re-implemented check_road_colour</title>
<updated>2026-08-28T18:37:41Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2021-07-02T16:00:00Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/cgit/ctak/commit/?id=640d404b3cf3324aca4424fc3da4806d4562d0e4'/>
<id>urn:sha1:640d404b3cf3324aca4424fc3da4806d4562d0e4</id>
<content type='text'>
Previously check_win would call check_road_colour once for each road
colour, and check_road_colour would call a depth-first search (DFS)
for each of the two axes. This meant that we were doing (up to) *four*
depth-first searches for each call of check_win.

I have replaced both axial DFS with the world's worst TM
implementation of a connected component generation algorithm backed by
the least guaranteed disjoint set data structure. Essentially doing
anything about union find correctly is slower than just ... not doing
it. Although we lose the asymptotic complexity, in practice we're
doing this millions of times per turn, for a fixed board size and
that's what matters.

All in all, it appears that i've managed to shave about 69ns off
check_win, per call -- nice! This amounts to 50ms or so saved at depth
5 per engine move, in one of my test games.

Unfortunately nearly 99% of the time is still taken by evaluating the
convolutional neural network. It's slow.
</content>
</entry>
<entry>
<title>Fix copyright notice in files, and small preemptive optimisation</title>
<updated>2026-08-28T18:37:41Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2021-03-28T04:19:05Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/cgit/ctak/commit/?id=2dbb9fa9b69e49d49cebb1c17559f6fe67600a4d'/>
<id>urn:sha1:2dbb9fa9b69e49d49cebb1c17559f6fe67600a4d</id>
<content type='text'>
Eventually there'll be a more complicated data generation step than
the one we're presently using, so having it in-lined in the loop is
wasteful. Ideally also this would be update per ply and we could avoid
recalculating it entirely for every query -- though it's probably
``fast enough'' for now. Also, caching is WIP.
</content>
</entry>
<entry>
<title>Rename ct_k -&gt; ct, IANAL but ...</title>
<updated>2026-08-28T18:37:41Z</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/cgit/ctak/commit/?id=ce09b6d94ac3dbf426e959b14fd7731001a003d1'/>
<id>urn:sha1:ce09b6d94ac3dbf426e959b14fd7731001a003d1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>TEI interface working!</title>
<updated>2026-08-28T18:37:41Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2021-02-03T00:23:54Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/cgit/ctak/commit/?id=40c6b1dafab4de169bac8a799e7953e85061218e'/>
<id>urn:sha1:40c6b1dafab4de169bac8a799e7953e85061218e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Added license information!</title>
<updated>2026-08-28T18:37:41Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2021-01-29T02:30:30Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/cgit/ctak/commit/?id=a77062ce3dc9a99ad0662010cc7eeb00dd5036a6'/>
<id>urn:sha1:a77062ce3dc9a99ad0662010cc7eeb00dd5036a6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Still trying</title>
<updated>2026-08-28T18:37:41Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2021-01-24T17:07:18Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/cgit/ctak/commit/?id=815cde44e5060ad093347bb47fc66d41c9d3a3ed'/>
<id>urn:sha1:815cde44e5060ad093347bb47fc66d41c9d3a3ed</id>
<content type='text'>
|
</content>
</entry>
<entry>
<title>Finally (?) fixed winning avoidance</title>
<updated>2026-08-28T18:37:41Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2021-01-21T19:56:55Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/cgit/ctak/commit/?id=eab1d81df4455eb89b2663dcdd45a024f4633a2e'/>
<id>urn:sha1:eab1d81df4455eb89b2663dcdd45a024f4633a2e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Many fixes, i think this is actually correct</title>
<updated>2026-08-28T18:37:41Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2021-01-21T06:16:20Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/cgit/ctak/commit/?id=9fa3291044ff8d9f0f2b9c9a01cd210bf318ab74'/>
<id>urn:sha1:9fa3291044ff8d9f0f2b9c9a01cd210bf318ab74</id>
<content type='text'>
</content>
</entry>
</feed>
