1) COMMON : MESSAGE OGS MODERATORS
2) COMMON : GENERATE THE APIKEY
- 3A1) Download and install nodejs and npm
- 3A2) Install gtp2ogs.js with npm
- 3A3) Recommended : Upgrade gtp2ogs.js from old branch to “devel” branch (latest)
- 3A4) Optional : Edit the gtp2ogs.js file (for example show winrate on OGS)
- 3A5) Run gtp2ogs.js (beta)
- 3A6) Run gtp2ogs.js (official)
- 3B1a) Preparations
- 3B1b) Download and install nodejs
- 3B2) Install gtp2ogs.js
- 3B3) Recommended : Upgrade gtp2ogs from old branch to devel (latest) branch
- 3B4) Optional : Edit the gtp2ogs.js file (for example show winrate on OGS)
- 3B5) Run gtp2ogs.js (beta)
- 3B6) Run gtp2ogs.js (official)
3B4) Optional : Modify the gtp2ogs.js file (for example force komi to 7.5)
(You can skip this step if you dont want it)
!!! IMPORTANT !!
NOTE :
This method is now outdated, you can now add the --komi
argument directly, but it shows an example of how to edit gtp2ogs.js for various other reasons
NOTE 2 : A more interesting example is for your bot to send the winrate on OGS at every move, in ingame chat, as you can see below
big big thanks to roy7 for the help !, these changes are a modification of /roy7/gtp2ogs/live
see that branch
for the outdated example :
There are many reasons why you may want to modify the gtp2ogs.js file
For example, my ai PhoenixGo cannot play if the komi is set to a value different from 7.5, it will say “unacceptable komi” and will refuse to play.
Another example is my ai PhoenixGo did not understand the command “showboard” so it could not play with gtp2ogs even though it worked correctly on sabaki
So for other reasons it may be good to know how to modify the gtp2ogs.js file
You can view a copy of gtp2ogs.js devel branch file here
i also recommend to download the amazing text editor Notepad++, which we will use in this tutorial
notepad++ will be useful to edit gtp2ogs.js, but also to manage logfiles of your ai much more easily (find all apikeys in document to remove them, autojump line, share game log files to other players, etc..), here
Right click, edit with notepad++, then search for the word “komi”, and modify the line as shown in the screenshots below :
this.command("komi " + state.komi);
To :
this.command("komi " + 7.5);
Then save and exit.
Important : dont do this if you ai supports different komi values !! It will make gtp2ogs lie to the ai by telling it the komi is always 7.5 even if it is not true. I had no choice to do it or my engine could not play other very widespread values like 6.5. This is not a problem for unranked games, but dont use this feature in ranked games !