{"id":13566153,"url":"https://github.com/Terkwood/BUGOUT","last_synced_at":"2025-04-03T23:31:19.124Z","repository":{"id":36414543,"uuid":"191042808","full_name":"Terkwood/BUGOUT","owner":"Terkwood","description":"AI-driven, Multiplayer Go/Weiqi/Baduk for the web 🐛🤖🦀♟","archived":false,"fork":false,"pushed_at":"2023-01-20T22:59:20.000Z","size":5326,"stargazers_count":76,"open_issues_count":82,"forks_count":7,"subscribers_count":6,"default_branch":"unstable","last_synced_at":"2024-11-04T20:42:17.727Z","etag":null,"topics":["alphago","alphazero","artificial-intelligence","baduk","board-game","boardgame","distributed-monolith","distributed-systems","go-game","goban","igo","katago","microservices","multiplayer","multiplayer-game","redis","redis-streams","rust","weiqi"],"latest_commit_sha":null,"homepage":"https://go.terkwood.farm","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Terkwood.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-09T18:45:39.000Z","updated_at":"2024-10-27T23:05:15.000Z","dependencies_parsed_at":"2023-02-12T06:31:30.822Z","dependency_job_id":null,"html_url":"https://github.com/Terkwood/BUGOUT","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terkwood%2FBUGOUT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terkwood%2FBUGOUT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terkwood%2FBUGOUT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terkwood%2FBUGOUT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Terkwood","download_url":"https://codeload.github.com/Terkwood/BUGOUT/tar.gz/refs/heads/unstable","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247097741,"owners_count":20883125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alphago","alphazero","artificial-intelligence","baduk","board-game","boardgame","distributed-monolith","distributed-systems","go-game","goban","igo","katago","microservices","multiplayer","multiplayer-game","redis","redis-streams","rust","weiqi"],"created_at":"2024-08-01T13:02:03.357Z","updated_at":"2025-04-03T23:31:14.115Z","avatar_url":"https://github.com/Terkwood.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# BUGOUT\n\n🐛 Play Go against your friends, over the web! 🕸\n\n🤖 _Or play against KataGo AI_ on a power-efficient dev board! 🤖\n\nWant to play right now? Click here: [go.terkwood.farm](https://go.terkwood.farm)\n\n![BUGOUT Online Go](BUGOUT.jpeg)\n\n## Design\n\n- Allows play against AI using [KataGo](https://github.com/lightvector/KataGo), running on an [NVIDIA Jetson Nano](https://developer.nvidia.com/embedded/jetson-nano-developer-kit) and consuming a mere 5W of power.\n- Backend powered by [Redis](https://redis.io/).\n- Uses a descendant of [Sabaki](https://sabaki.yichuanshen.de/) for the [web UI](browser/).\n- A [public-facing websocket gateway](gateway/README.md) communicates with the browser.\n\n![architecture](./architecture.png)\n\n## 🛑 STOP! Potential developers, please read carefully.\n\n_BUGOUT is not suitable for playing KataGo on your workstation._\n\nThe production version of BUGOUT relies on an instance of KataGo hosted on an NVIDIA Jetson Nano, compiled with ARM architecture. KataGo is spawned by the [tinybrain](./tinybrain/README.md) process.\n\nThese services run _in my home_, and connect remotely to an AWS-hosted instance serving the rest of the system. This requires a websocket connection, and a valid SSL certificate.\n\n### If your goal is to play KataGo on your home computer...\n\n...then we suggest trying out [KaTrain](https://github.com/sanderland/katrain), which works flawlessly. It has a lovely UI, it will download and set up KataGo for you, and it will save your valuable time.\n\n#### Why isn't BUGOUT better?\n\nMainly because we designed this system with the goal of being playable over the web. For this purpose, it functions well enough.\n\nIn our context, the build of KataGo itself [probably isn't reproducible](./tinybrain/README.md). At least, getting it set up to run in the current production system was a bit of a pain point.\n\n#### Are you still interested in trying to run this system locally?\n\nIf so, _don't say we didn't warn you!_\n\n### Building the distributed monolith (everything but KataGo)\n\nBUGOUT uses docker to host multiple images, including a reverse-proxy for web traffic, and a redis instance. You need to create directory which will be used for volume mounting these instances. Inside the reverse-proxy directory, you'll need a `Caddyfile`, which this script will also create. _This script uses sudo_, so _please_, review it before running it!\n\n```sh\nsh admin/setup-local-dev.sh\n```\n\nBUGOUT relies on [docker-compose](https://docs.docker.com/compose/install/) to run _most_ of its services. It will invoke some buildkit-related options, so please use the included script to start the system.\n\n```sh\nsh compose.sh up\n```\n\nIf you're hacking BUGOUT, you will want to host the\nweb application on your local machine. You need to [install\nnpm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). Then:\n\n```sh\ncd browser\nnpm install\nnpm run build\nnpm run start\n```\n\n### Building KataGo\n\nThe tinybrain utility currently does not use docker-compose. This utility wraps [KataGo](https://github.com/lightvector/KataGo)\nAI and allows it to communicate with the rest of the backend services. We run it using a [systemd script](./tinybrain/tinybrain.service).\n\nWe have some [poorly written notes](./tinybrain/README.md) about building KataGo, but they are _specific to NVIDIA Jetson Nano + ARM_. You're on your own if you want to get everything hooked up via x86_64.\n\n[We don't currently have a path for you to connect KataGo + tinybrain to the rest of your system, locally](https://github.com/Terkwood/BUGOUT/issues/473).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTerkwood%2FBUGOUT","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTerkwood%2FBUGOUT","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTerkwood%2FBUGOUT/lists"}