Moderator: Andres Valverde
Wolfgang Gralke wrote:Hello everybody,
I'm writing an engine with UCI- and Winboard-Interface. In this moments I'm trying to establish comunication with Arena 1.1, ChessAssistent 7.0 and Fritz8.
The Winboard-part is going fine, but with the UCI-protocol I have problems.
I receive correctly the "uci"-command and answer with id's and a "uciok", but from there on the problems are beginning...
Arena sends a "position startpos e2e4" and a "go btime 30000".
The others start to play some moves (my engine has no brain, so the moves are made by some ghost) and send a "position startpos e2e4 e7e6 d2d4 d7d5" and a "go movetime 8000".
Now I have tried to answer with a "bestmove h7h6", but the board doesn?t react. As well I have tried to force a "stop"-command (pressing the spacebar) and answer after this with the bestmove, but still without reaction. After a "quit" my engine stops ejecution corectly.
Any idea what I'm doing wrong?
Many thanks in advance,
Wolfgang
void sendcommand (bstring bcommand){
switch (UCI_MODE)
{case 1:
if(bstrncmp(bcommand, cstr2bstr("go"), 2)==0)
UCI_Go(bcommand);
if(bstrncmp(bcommand, cstr2bstr("isready"), 7)==0)
UCI_IsReady(bcommand);
if(bstrncmp(bcommand, cstr2bstr("stop"), 4)==0)
UCI_Stop(bcommand);
if(bstrncmp(bcommand, cstr2bstr("position"), 8)==0)
UCI_Position(bcommand);
if(bstrncmp(bcommand, cstr2bstr("quit"), 4)==0)
UCI_Quit(bcommand);
if(bstrncmp(bcommand, cstr2bstr("ucinewgame"), 10)==0)
UCI_Newgame(bcommand);
if(bstrncmp(bcommand, cstr2bstr("debug"), 5)==0)
UCI_Debug(bcommand);
if(bstrncmp(bcommand, cstr2bstr("setoption"), 9)==0)
UCI_SetOption(bcommand);
if(bstrncmp(bcommand, cstr2bstr("ponderhit"), 9)==0)
UCI_PonderHit(bcommand);
break;
case 2:
if(bstrncmp(bcommand, cstr2bstr("go"), 2)==0)
{
WB_Go(bcommand);
break;
}
if(bstrncmp(bcommand, cstr2bstr("ping"), 4)==0){
bsetstr(bcommand, 1, cstr2bstr("o"), ' ');
printf("%s\n",bcommand->data);
break;
}
if(bstrncmp(bcommand, cstr2bstr("usermove"), 8)==0)
{
WB_Usermove(bcommand);
break;
}
if(bstrncmp(bcommand, cstr2bstr("protover"), 8)==0){
WB_Protover(bcommand);
break;
}
if(bstrncmp(bcommand, cstr2bstr("level"), 5)==0){
WB_Level(bcommand);
break;
}
if(bstrncmp(bcommand, cstr2bstr("new"), 3)==0){
WB_New(bcommand);
break;
}
if(bstrncmp(bcommand, cstr2bstr("force"), 5)==0){
WB_Force(bcommand);
break;
}
if(bstrncmp(bcommand, cstr2bstr("post"), 4)==0){
WB_Post(bcommand);
break;
}
if(bstrncmp(bcommand, cstr2bstr("nopost"), 6)==0){
WB_NoPost(bcommand);
break;
}
if(bstrncmp(bcommand, cstr2bstr("easy"), 4)==0){
WB_Easy(bcommand);
break;
}
if(bstrncmp(bcommand, cstr2bstr("hard"), 4)==0){
WB_Hard(bcommand);
break;
}
if(bstrncmp(bcommand, cstr2bstr("time"), 4)==0){
WB_Time(bcommand);
break;
}
if(bstrncmp(bcommand, cstr2bstr("otim"), 4)==0){
WB_Otim(bcommand);
break;
}
if(bstrncmp(bcommand, cstr2bstr("?"), 1)==0){
WB_Interrogante(bcommand);
break;
}
else WB_Move(bcommand);
break;
default:
WB_Quit(bcommand);
}
}
Return to Programming and Technical Discussions
Users browsing this forum: No registered users and 25 guests