Welcome, Guest. Please Login or Register.
Nov 24th, 2024, 8:27am

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « AEI Protocol Question »


   Arimaa Forum
   Arimaa
   Bot Development
(Moderator: supersamu)
   AEI Protocol Question
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: AEI Protocol Question  (Read 2553 times)
jdb
Forum Guru
*****



Arimaa player #214

   


Gender: male
Posts: 682
AEI Protocol Question
« on: Jan 22nd, 2015, 10:30am »
Quote Quote Modify Modify

I have a question about the AEI protocol.
 
Say the following sequence of commands occurs, which I cut and pasted from aei-protocol.txt,
 
    CTL: setoption name hash value 500
    CTL: isready
    ENG: log Set transposition table size to 500MB (9362285 entries)
    ENG: readyok
    CTL: setoption name rated value 1
    CTL: newgame
    CTL: isready
    ENG: log Starting new game.
    ENG: readyok
 
If there are a list of say 50 or so setup parameters in the gameroom.cfg file, they all get sent to the engine at once. Some of them take a significant amount of time to act on.  
 
When should the bot act on the setoption commands?
 
Is it guaranteed that an isready is sent after a list of setoption commands?
 
Or is it better to wait for a newgame command?
 
IP Logged
browni3141
Forum Guru
*****



Arimaa player #7014

   


Gender: male
Posts: 385
Re: AEI Protocol Question
« Reply #1 on: Jan 22nd, 2015, 7:30pm »
Quote Quote Modify Modify

"Engines should start up and respond to the initial "aei" message as soon as
possible and delay any lengthy initialisation until after the opening phase is
complete."
Also, "An engine should try and process messages as soon as possible even while thinking."
These are the only related things I know of. My interpretation of this is that you should be able to do basic initialization any time you want after the opening phase (although immediately seems best for reasons mentioned below), and should act on setoption commands immediately. Why wait for a specific command? It seems risky to wait for an "isready" command, since the protocol doesn't seem to guarantee one. The same is true for the "newgame" command. The controller could interrupt a search, send some setoption commands and run the same search or a "makemove" and a "go" etc.
It is probably safe to wait for a "go" command and initialize then, but it seems to me to be contrary of what is expected of you. Also, you'd end up having to keep track of whether or not and which configuration options have been changed since the last "go," unless you want to run initialization over again after every "go."
« Last Edit: Jan 22nd, 2015, 7:32pm by browni3141 » IP Logged

Janzert
Forum Guru
*****



Arimaa player #247

   


Gender: male
Posts: 1016
Re: AEI Protocol Question
« Reply #2 on: Jan 23rd, 2015, 10:13am »
Quote Quote Modify Modify

In general the engine should act on the setoption directly after receiving it. Some engines may not be able to change some options except at say the point of a new game, or when a search is not in progress. In those cases it's fine to delay the change to that time.
 
An isready query is not guaranteed at any point, the controller will generally send it when it wants to know that the engine has "caught up". For example if you look at the other comunication example, it shows an isready-readyok sequence just before the setoption command.
 
Janzert
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.