Steps to connect with a bot

Hi, I’m developing bot for an university project, what steps are needed for connecting and playing with players ( or other bots ) on OGS servers? I found https://github.com/online-go/gtp2ogs but that doesn’t provide much information.
Thanks for any help.

1 Like

If you have a go bot that can communicate using the Go Text Protocol (GTP), you use a tool like gtp2ogs so it can communicate to OGS.

The basics are:

Make an account for the bot on OGS.
Ask a moderator to flag the account as a bot account.
Set the admin in the bot’s profile page.
Log in as your normal admin account and visit bot profile to get an API key generated.

Then run your bot using a command line roughly like:

node gtp2ogs.js --username YourBotNameHere --apikey yourkeyhere --debug – yourbotprogram.exe >> log 2>&1

More advanced command line options are available to gtp2ogs depending on your needs and the bot. Any more command line strings after the name of the bot is passed to the bot itself.

5 Likes

Note when logging in using gtp2ogs, your bot will appear in the “play vs bot” drop down list and anyone can send it challenges. I don’t think there’s a way at the moment to have gtp2ogs set so bot can play games you manually set up, while not appearing in that list.

If you want to reject by default, find "on_challenge(notification) { " and change the reject=false on the next line to reject=true. That’l reject all challenges by default. You’d need to log into your bot account and send out a challenge to someone else.

It’s best to use the official devel branch over the master branch, imo. Latest js is at:

https://raw.githubusercontent.com/online-go/gtp2ogs/devel/gtp2ogs.js

5 Likes

All right, could this accout be flagged as bot? - I havent found any direct means of messaging to admins.

Summoning @crocrobot, he’ll be able to help you.

Or pop into chat room and ask someone with a purple hammer (moderator) symbol/color. :slight_smile:

@3dgo_bot_01 Hi! Moderator here. I sent you a private message on the site. :slight_smile:

3 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.