I think the gtp2ogs is quite buggy. I never got it working under Ubuntu linux 14.04 although the compiling appears to be good. Here is error I got from this command:
gtp2ogs --botid mydigitid --apikey myapikey – gnugo --mode gtp
Error msg:
/usr/local/lib/node_modules/gtp2ogs/gtp2ogs.js:215
this.proc.stdin.write({"gtp_commands": [);
^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
By the way, I am developing the python API code and I know my botid, apikey etc are good because
I was able to use python code to get token, then use the token to get my bot profile/settings and game details.
There is some confusion on botid option of gtp2ogs. There is long string of id called “client_id” generated from
developer URL page, there is also a six digit number “id” that can be found in side API profile/setting page.
I think the botid refer to the six digit number ID. But either way, gtp2ogs code is not working for me
under Ubuntu 14.04. linux.
Playing a bot is an excellent way to become acclimated to the online mechanics of play. When one feels comfortable, then yes, it’s time to move on and play humans. However, it seems like a bot might also be worthwhile to test out some new ideas, or to practice faster speeds of play without risking one’s ego.
BTW, Downloading a bot is more risky from a cybersecurity point of view.
I see one of the maintainers is doing some work on gtp2ogs today, that’s exciting to see. I’d encourage you to post issues/bugs into the Issues area on the GitHub to be sure they are seen.
FYI, I had gtp2ogs working at some point using the branch that @roy7 mentioned, on Ubuntu 16.04. Can’t say I can recognize the error that @honglu69 saw. One issue that has been mentioned before is that the script sets up bots as having to regenerate the board position every time a new move request comes in. If your bot depends on the move history, all that information is toast, which is not ideal. I’ve mentioned this to anoek before, the scripts are provided as a bonus for us and like you guys say, he’s busy enough with other higher priority issues. Maybe after the bugs are worked out of v5 he’ll have more time for the bot hosting features.
I’m using the --devel branch of the official github, everything works as expected except it doesn’t recognize my bot name (RoyalLeela) even though the account is already marked as a bot by the moderators. I did have to override the default host to be ggs.online-go.com instead of online-go.com though.
Interesting, I tried using the name of someone else’s bot and it also says unknown bot account. Maybe I’m not supposed to use the text name of the account…
I used the tk77 branch, that seemed to work for me. FWIW I was also trying to host leela and was having issues with the turn-based move generation. I was going to figure out a way to have persistent processes running for each game with a cap on the #, but this requires automatically canceling correspondence games, because I can’t guarantee a bot process will be running for months. Tokumoto’s branch is useful since it adds the code for declining challenges with certain unwanted parameters like game type.
@photonic do you use the actual account name as the bot id? I tried using the name of an existing bot and got the same error (Bot account is unknown to the system).
I just tossed in a name of an existing bot and got the same reply:
ERROR: Bot account is unknown to the system: Kugutsu
But that might just be a side effect of using an invalid apikey so it can’t authenticate me as Kugutsu. It makes me feel like I’m doing something wrong on my end though. I tried the ID # for my bot but that didn’t work either. I’m using the api key off the profile page as instructed. Hmmmmmm.
@honglu69 I think when you were in the github you right clicked the file and ‘save link as’, but that gives you all the html of a web page viewer. I made same mistake one time. You need to click it normally, go to the resulting page, and right click “Raw” then Save As to download the file to your computer…
Talked to @anoek and decided to move my testing over to beta server instead. Using the --beta flag and the --devel branch of the normal github version of gtp2obs, it connected right up which I could never get to work on the live server regardless of gtp2obs version.
So I’ll leave the mystery of why it wouldn’t connect alone and just move forward on beta server.
looks like the port which accepts connections was moved to 443 a while ago, which was reflected in the fork and also in the new devel branch. I had changed that in my code it looks like. so that fixes the issue.
Only the connection issue, I was overriding the port myself. It’d connect, but tell me the bot account was unknown. I made the bot on the beta server (same name) and then it connects.
Tonight’s goal is to do more debugging, after connection the bot appears as an opponent you can choose but when you send a game offer, gtp2ogs doesn’t do anything, just keeps waiting.
I’m not sure if @anoek is even using my changes in his bots he runs, they might be more stable just from OGS v5 alone. But I did fix some timeout issues in the timeout branch/pull request. There’s also the persist branch/pull request which is for bots like Leela that I don’t want to restart every move, and my devel branch/pull request (should have named that ‘clock’) that has all of the clock related code to tell bots about the time settings and clock left. Previously bots never knew about time but I wanted Leela to play well.
On my personal fork I use my live branch which is official devel branch plus my 3 pull requests plus any code I’m currently messing with. I use live to store my own personal copy I’m running live right now on the web site. But any changes I feel are appropriate for a wider audience I do try to split off into pull requests into the master repo.
I’m planning to add some command line controls for what you’ll accept or reject soon, currently I just hard coded in a few things I needed quickly for my own use.