<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ctak/include/tak.c, branch lazy_queue</title>
<subtitle>An implementation of Tak and a computer opponent in C</subtitle>
<id>https://git.l-3.space/ctak/atom?h=lazy_queue</id>
<link rel='self' href='https://git.l-3.space/ctak/atom?h=lazy_queue'/>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/'/>
<updated>2026-08-28T18:37:41Z</updated>
<entry>
<title>More towel wringing: re-implemented check_road_colour</title>
<updated>2026-08-28T18:37:41Z</updated>
<author>
<name>tslil</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/ctak/commit/?id=07c5dded49d5943f54cca0c75a7a93a30ee2f323'/>
<id>urn:sha1:07c5dded49d5943f54cca0c75a7a93a30ee2f323</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/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/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/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/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/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/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/ctak/commit/?id=9fa3291044ff8d9f0f2b9c9a01cd210bf318ab74'/>
<id>urn:sha1:9fa3291044ff8d9f0f2b9c9a01cd210bf318ab74</id>
<content type='text'>
</content>
</entry>
<entry>
<title>In-lined as much as a i dare</title>
<updated>2026-08-28T18:37:41Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2021-01-20T18:23:58Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/commit/?id=c81898d6a760e2057f0933c9da6160702a4d0f61'/>
<id>urn:sha1:c81898d6a760e2057f0933c9da6160702a4d0f61</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Inlined placements, should be faster</title>
<updated>2026-08-28T18:37:41Z</updated>
<author>
<name>tslil clingman</name>
<email>tslil@posteo.de</email>
</author>
<published>2021-01-18T04:16:09Z</published>
<link rel='alternate' type='text/html' href='https://git.l-3.space/ctak/commit/?id=b1d677fa134741527669b93a77810cf01dd34de5'/>
<id>urn:sha1:b1d677fa134741527669b93a77810cf01dd34de5</id>
<content type='text'>
</content>
</entry>
</feed>
