|
From: | Ingo Macherius |
Subject: | RE: [Bug-gnubg] search documentation about external inteface |
Date: | Thu, 14 Feb 2008 02:24:04 +0100 |
bash-3.2$ telnet localhost 11111
Trying 127.0.0.1...
Connected to RAKETE.
Escape character is '^]'.
--- snip ----
3) Commands
There are 3 commands you can send from telnet now
3.1) EMPTY command
If you send an empty line to the socket, it resets the gnubg settings used for evaluation
The defaults are (see 3.3 how to change)
ec.nPlies = 0;
ec.rNoise = 0;
ec.fDeterministic = 1;
ec.fCubeful = 0;
ec.nReduced = 0;
ec.fUsePrune = 0;
ec.szFIBSBoard = NULL;
3.2) FIBS board Strings
You can send FIBS board:* Strings which will be evaluated according to the settings read from your .gnurc. The reply is the decision GNU makes. Last time i looked the output for drop/take decisions was broken, may be fixed since 2004 maybe ...
Synopsis: board:[[:alpha:]_]+:[[:alpha:]_]+(:{-?[0-9]+})+
Fibs board syntax is defined here: http://www.fibs.com/fibs_interface.html#board_state
Example:
--- snip ----
board:You: Other :1:0:0:0:-1:-1:0:0:0:5:0:3:0:0:0:-4:5:0:0:0:-4:0:-5:0:0:0:0:2:0:1:2:1:0:0:1:1:1:0:1:-1:0:25:0:0:0:0:2:6:0:0
13/11 24/23
--- snip ----
3.3) EVALUATION FIBSBOARD
Reads a fibs board and returns winning/losing probabilities and equity. Allows to set some evaluation parameters for each command.
Synopsis:
EVALUATION FIBSBOARD (AFIBSBOARD) [PLIES n] [CUBE ON|OFF] [CUBEFUL] [PRUNE] [CUBELESS] [NOISE x*10000] [REDUCED n]
--- snip ----
EVALUATION FIBSBOARD board:You: Other :1:0:0:0:-1:-1:0:0:0:5:0:3:0:0:0:-4:5:0:0:0:-4:0:-5:0:0:0:0:2:0:1:2:1:0:0:1:1:1:0:1:-1:0:25:0:0:0:0:2:6:0:0 PLIES 2 CUBEFUL
0.491580 0.127632 0.003513 0.136681 0.005096 0.491580
--- snip ----
The numerical return values from left to right mean:
if ( nMatchTo ) { // wird FALSE bei moneygame
if ( ec.fCubeful )
r = arOutput[ OUTPUT_CUBEFUL_EQUITY ];
else
r = eq2mwc( arOutput[ OUTPUT_EQUITY ], &ci );
}
else
r = ec.fCubeful ? arOutput[ 6 ] : arOutput[ 5 ];
szResponse = g_strdup_printf( "%f %f %f %f %f %f\n",
arOutput[ 0 ],
arOutput[ 1 ],
arOutput[ 2 ],
arOutput[ 3 ],
arOutput[ 4 ],
r );
Do you know if somebody had made some documentation about the protocol of the external interface?
Do I must make reverse engineering to understand this system?
I begin with gnubg, everything could help me.
Thank you.
[Prev in Thread] | Current Thread | [Next in Thread] |