# Third-party notices for @go/nn ## KataGo (MIT License) `src/board.ts`, `src/ladder.ts`, `src/area.ts` and `src/features.ts` are TypeScript ports of parts of KataGo (https://github.com/lightvector/KataGo): the board, ladder search, Benson area calculation and neural-network input features (`cpp/game/board.cpp`, `cpp/neuralnet/nninputs.cpp`). The ONNX model file is produced with KataGo's `dumponnx` command. Copyright 2025 David J Wu ("lightvector") and/or other authors of the content in this repository. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## Neural network weights `apps/web/public/models/g170e-b10c128.onnx` is converted from KataGo's `g170e-b10c128-s1141046784-d204142634` network (KataGo release v1.3), which is released under CC0 1.0 (public domain dedication). See https://katagotraining.org/network_license/. ## How the model file is made 1. Build KataGo with `-DUSE_BACKEND=ONNX` (any recent version with `dumponnx`). 2. `katago dumponnx -model g170e-b10c128-s1141046784-d204142634.txt.gz -out masked19.onnx -nn-x-len 19 -nn-y-len 19 -skip-scale8` 3. Make the board dimensions symbolic (`scripts/make-dynamic.py`) so one file serves 9×9, 13×13 and 19×19. 4. Check it with `scripts/compare-katago.ts` (features and outputs must match KataGo).