BUGOUT icon indicating copy to clipboard operation
BUGOUT copied to clipboard

Tinybrain AI is not making any moves

Open basemw opened this issue 2 years ago • 8 comments

Hello,

I have successfully configured BUGOUT with KataGo and TinyBrain,

The Problem is that the game is not progressing at all, tinybrain (KataGo) is not making any moves.

Here's two screens of the issue:

111 222

basemw avatar Aug 01 '21 22:08 basemw

At a glance, this seems well configured. The fact that you have tinybrain connected to botlink is unexpectedly good (this step is especially fiddly in dev since the approach in production is to connect to the reverse proxy docker image, with an SSL cert)

So I'm not sure what to suggest without sitting down and investing some additional time in this ticket. I will take a look, but can't offer any reasonable guarantee about the time line for doing so

Terkwood avatar Aug 02 '21 13:08 Terkwood

Did you set matching values for AUTHORIZATION in the .env files for both botlink and tinybrain?

Terkwood avatar Aug 02 '21 13:08 Terkwood

yes here is my root .env file

AUTHORIZATION=basem:wadi

and tinybrain/.env

RUST_LOG=info RUST_BACKTRACE=full BOTLINK_URL=ws://0.0.0.0:33012 MODEL_FILE=g170e-b20c256x2-s2430231552-d525879064.bin.gz AUTHORIZATION=basem:wadi TINYBRAIN_HOME=/home/basem/BUGOUT/tinybrain TINYBRAIN_BIN=/home/basem/.cargo/bin

But as you mentioned above, I have not set up an SSL Certificate, but I guess since its a local connection we may not need it?

basemw avatar Aug 02 '21 13:08 basemw

Well the env files look fine.

My dirty little secret is that I don't test Tinybrain/KataGo locally at all. I've only tested it against an instance of botlink deployed in AWS, with an SSL cert provisioned by caddy/certbot, using a DNS A record configured with my domain.

So that's a big problem for local development... Until someone solves it I guess.

Terkwood avatar Aug 02 '21 13:08 Terkwood

A quick question, why didn't you make the AI part of the browser it self to be played offline?

Also is there any documentation on this? 2021/08/02 13:42:48 [WARNING] Sending telemetry (attempt 3): Post https://telemetry.caddyserver.com/v1/update/9040ca22-1410-4c39-b358-a9b8300d55ba: dial tcp: lookup telemetry.caddyserver.com on 127.0.0.11:53: no such host - backing off and retrying

basemw avatar Aug 02 '21 13:08 basemw

The goal with BUGOUT (thus far) is to expose an instance of KataGo that is easily playable over the web, for a very small scale of users. We also offer a simple multiplayer system that I've used with my friends a few times. Much of this project was just a way for me to pass time creatively.

If you're looking to play KataGo on your local workstation, KaTrain serves that need much better : https://github.com/sanderland/katrain

The telemetry messages are expected spam from the Caddy reverse proxy component

Terkwood avatar Aug 02 '21 13:08 Terkwood

I have previously worked on a similar project, We had the multiplayer part working the same as this one, but for the AI part the browser used to be connected directly to the AI engine,

Since it does not need to be connected to the main server at all, we had two options:

  1. Make the engine as a js library with no need for further internet connection after downloading the js files
  2. Make the engine as a separate server, which it can be connected directly from the browser

I hope this is helpful for you, Thank you again for the support and your kind responses

basemw avatar Aug 02 '21 14:08 basemw

Definitely food for thought! As far as I know KataGo doesn't support running inside the browser yet. Right now the production KataGo instance runs from inside my home internet, hence the current design -- it initiates the connection to the cloud Docker server, so that I don't have to expose my home internet to the lovely world of weird bots and creepers 😁

Terkwood avatar Aug 02 '21 14:08 Terkwood