Kaya - A modern, elegant Go game application

I first decided to fork Sabaki to add a few features. However, since the project had not been active for the last few years, I finally decided to build a new Go app from scratch.

Here comes Kaya: Kaya - Modern Go Game Application

The primary motivation was to add support for gamepad controllers to be able to play with my kids, but from feature to feature, I ended up with a pretty much complete application.

Kaya is fully open source: GitHub - kaya-go/kaya: A modern, elegant Go (Baduk/Weiqi) game application and is available as a web version and also as a desktop app for Linux, Windows, and macOS.

Kaya also proposes an AI Analysis feature leveraging converted Katago weights to be able to run Katago directly in the browser: GitHub - kaya-go/katago-onnx: Convert KataGo models to ONNX . It’s not as strong as Katago itself since I haven’t implemented MCTS, but it’s largely sufficient for an average player.

Please feel free to use this thread for general discussions and feedback. However, if you encounter any bugs or technical issues, I would appreciate it if you could report them directly on the GitHub repository to help me track them more efficiently. Contributions are, of course, very welcome

18 Likes

Simply amazing, my favorite feature is at the bottom left called “pattern matching” it explains the nature of the last move, such as “Two-Point Jump”, “Low Enclosure”, “Attachment”, “Hane”, with links to https://senseis.xmp.net/.

I wonder if it’s against the license to copy code just for that feature to implement in my own Go client? But of course my first option will be to contribute via pull request. Only if it gets to the point where I’m unable to add the features I need to the Kaya/Sabaki client without rewriting a lot of code, then I’ll ask again about copying.

Where are the models that “upload” into? I don’t like files left behind in my system that I cannot control, and even after I hit “delete” those files persist in my hard drive.

2 Likes

Very very nice!

Some feedback, I think the colors for the moves are wrong. I’m not getting a green or blue move for the opening.

2 Likes

Scoring is a little off hehe

2 Likes

Edit mode

How do you know the files still persist in your hard drive? After I clicked the delete button, Google Chrome Developer Tools shows “14.6 kB used out of 613,840 MB storage quota”. To be fair, I didn’t check what it said before I clicked the delete button.

1 Like

I have a tool monitoring the disk usage

I tried the windows desktop version, and they are located in %USERPROFILE%\AppData\Local\com.kaya.desktop
for the extracted programs

the models are stored in
%USERPROFILE%\AppData\Roaming\com.kaya.desktop\models
And they persist to exist.

For actual disk usage, for the Chrome browser, it is generally stored in
%USERPROFILE%\AppData\Local\Google\Chrome\User Data
The cache is just a very small portion of it (if you never clean it, you likely find it extremely bloated)

2 Likes

Thanks for the heads up.

I checked %USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\Service Worker\CacheStorage and found a 257 MB folder with today as the Date Modified. I then went to my Chrome settings (chrome://settings/content/all) and deleted all data associated with the kaya domain, even though Chrome only said the domain was using up 26.6 KB · 2 cookies. Afterwards, the 257 MB folder was gone.

I also deleted all data for baduk.club because it was taking up 2.9 GB of my disk space and I barely visited that site, and also deleted Google Docs. but I’m fairly certain neither of them were the 257 MB folder.

1 Like

It is licensed under AGPL 3.0, which I believe permits you to use parts of that code in your own project, but I think that license may compel you to also apply that license to your code, if you release your project.

2 Likes

The models are coming straight from HuggingFace at kaya-go/kaya at main

You can also inspect the source code to verify the URLs at kaya/packages/ui/src/hooks/game/useAIAnalysis.ts at 615929de3c632b1ac5df0370927a58a052eb6163 · kaya-go/kaya · GitHub

And the weights of the Katago models have been converted to ONNX format before being uploaded on Hugging Face using the scripts available at katago-onnx/src/katago_onnx/export.py at 135b77a522b3f5a9a7dfef3d8e303d126496ed91 · kaya-go/katago-onnx · GitHub

And for absolute and full transparency, the uploads have been made directly from GitHub. It means you can even inspect the logs that created and uploaded those files at Release 0.1.0 · kaya-go/katago-onnx@135b77a · GitHub

The models are stored directly into the local state of the browser, and if the files are not being deleted when they are in Kaya, then it’s a bug that should be reported at GitHub · Where software is built

The probability displayed is the policy probability of the AI engine, which is not usually something that Katago shows. Additionally, the AI employs a single-pass inference instead of exploring multiple solutions. The consequence of this is a less accurate AI analysis and a different kind of “score” being displayed, so it’s likely not something you are used to.

The app proposes a small legend trying to explain that.

If you have ideas to improve those explanations, let me know.

Anyone is also free to implement a more complete AI analysis engine.

Thank you for reporting those bugs. Would you mind opening ticket on GitHub · Where software is built instead?

This is a better place to report bug than the forum. Thank you :folded_hands:

The board pattern-matching in particular appears to be via a port of GitHub - SabakiHQ/boardmatcher: Finds patterns & shapes in Go board arrangements and names moves., which is MIT licensed and can be used more freely

3 Likes

Yes indeed. Kaya was originally a fork of Sabaki, so many of Kaya’s libraries are deeply inspired by Sabaki’s, though most have been entirely rewritten from scratch.

Regarding the license: I chose AGPL-3.0 to balance freedom with community protection. Anyone can use Kaya or its components in open source or commercial projects, but any modifications must be shared back with the community under the same terms. You’re free to use it, modify it, and even sell it, but you cannot close-source your modifications or create proprietary derivatives. This ensures that improvements benefit everyone, not just individual companies.

Put simply: use freely, modify freely, but keep it open.

I’m particularly proud of the local AI analysis feature, which took quite a bit of work to get running properly, even if it’s still incomplete at the moment (no MCTS yet). Another aspect I focused on is making Kaya work everywhere: web, desktop, mobile, TV, tablets, etc. The goal was to have a truly cross-platform Go application.

In the future, I can see a community of developers around Kaya extending it in many great directions, like OGS support, tsumego/puzzle modes, live tournament tracking, or even casual game tracking from video streams or photos, etc. There’s a lot of potential.

That said, I recognize that licensing decisions should evolve with the project. Once Kaya develops a strong community that can sustain itself, I’m open to revisiting the license, whether that means moving to a more permissive option if it better serves the ecosystem, or maintaining copyleft protections if that’s what the community values. The license serves the project, not the other way around, and any future changes would be made transparently with community input.

2 Likes

this looks wonderful. thank you.

1 Like

Just as a logistical note about this, relicensing an OSS project with third-party contributors is typically very complicated, as you need the express approval of every single person who has contributed IP to the codebase.

The common solution big corporations use is to require contributors to sign a CLA (contributor licensing agreement), having them assign their IP to you so that you have the legal right to relicense it.

I’m not saying you should necessarily introduce a CLA, but I just wanted to put in the back of your brain that “revisiting the license after the fact” is potentially more complicated than just updating the LICENSE file if the project builds up a big contribution community .

6 Likes

Thanks for the idea!