> Another point:
>
> Who is it that writes an A+ chess engine and a D- Winboard
> interface for it?
>
> The code quality of the engine is supreme. The Winboard
> interface looks like it was written by a novice.
The interface and engine itself written in the same style. I remeber my own history of engine desing. I was really lazy to implement interface with full functionality. Also it was written in really bad style. Here is the fragment of SmarThink 0.17a interface implementation. It was a strong engine for that times.
Code: Select all
if(buf[0]=='?')
{
if(now_pondering) {MoveEntered=0; PonderFailed=TRUE;}
stopped=TRUE;
return;
}
else if(buf[0]=='.')
{
#ifdef REC
printf("stat01: %d %d %d/%d %d %d %s\n",(int)((clock()-cl)/10),nodes,RootDepth+1,rec,NumberOfRootMoves-RootMoveNum,NumberOfRootMoves+1,move2psm(STR,moves[RootPly]));
#else
printf("stat01: %d %d %d %d %d %s\n",(int)((clock()-cl)/10),nodes,RootDepth+1,NumberOfRootMoves-RootMoveNum,NumberOfRootMoves+1,move2psm(STR,moves[RootPly]));
#endif
fflush(stdout);
return;
}
else if(buf[0]=='u'&&buf[1]=='n'&&buf[2]=='d'&&buf[3]=='o')
{
need_of_undo_after_search=TRUE;
stopped=TRUE;
return;
}
else if(buf[0]=='e'&&buf[1]=='x'&&buf[2]=='i'&&buf[3]=='t')
{
need_of_exit_after_search=TRUE;
stopped=TRUE;
return;
}
else if(buf[0]=='n'&&buf[1]=='e'&&buf[2]=='w')
{
if(now_pondering) {MoveEntered=0; PonderFailed=TRUE;}
stopped=TRUE;
need_of_new_after_search=TRUE;
return;
}
else if(buf[0]=='r'&&buf[1]=='e'&&buf[2]=='s'&&buf[3]=='u'&&buf[4]=='l'&&buf[5]=='t')
{
if(now_pondering) {MoveEntered=0; PonderFailed=TRUE;}
stopped=TRUE;
return;
}
else if(buf[0]=='p'&&buf[1]=='o'&&buf[2]=='s'&&buf[3]=='t') {post=TRUE; stopped=TRUE; if(now_pondering) {MoveEntered=0; PonderFailed=TRUE;} return;}
else if(buf[0]=='n'&&buf[1]=='o'&&buf[2]=='p'&&buf[3]=='o'&&buf[4]=='s'&&buf[5]=='t') {post=FALSE; stopped=TRUE; if(now_pondering) {MoveEntered=0; PonderFailed=TRUE;} return;}
else if(buf[0]=='q')
{
/* FILE *f=fopen("in.log","a");
fprintf(f,"Exiting...\n");
fclose(f); */
if(Transp!=NULL) free(Transp);
if(PwnH!=NULL) free(PwnH);
if(book_loaded) CloseBook();
if(use_learning_data||use_learning) CloseLearningTable();
exit(0);
}
Strelka's interface is enought to make huge engine testing. Other things are not really interesting for engine programmer. I hope Osipov will produce better interface in next few days. Also I think it is a really good idea to compile Strelka code with the help of Bryan Hoffmann. He compiled a lot of engines including Rybka. He can finally end this story cause he has Rybka sources and can easily compare Strelka and Rybka. I'll ask Osipov and Hoffmann for it.