Engine name is <empty>

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Engine name is <empty>

Postby LouisZulli » 25 Aug 2011, 11:13

From the command line I enter

Code: Select all
xboard -fcp GreKo-8.2 -fd ~/Documents/Chess/greko-8.2/src -fUCI


The titlebar of my xboard window contains "xboard: <empty>" rather than the engine's name. Can't figure out why!

Everything else seems fine, and I can play against the engine.
LouisZulli
 
Posts: 7
Joined: 12 Jan 2010, 17:54

Re: Engine name is <empty>

Postby H.G.Muller » 26 Aug 2011, 08:16

"<empty>" is something Polyglot is programmed to say when it tries to print an empty string. Normally Polyglot receives an id name XXX command from the UCI engine, and passes this as "feature myname="XXX" to XBoard. Probably Greko does not print such a command at all. (You can run it from a terminal, type uci to it, and see what it responds.) In that case it would be better that Polyglot refrained from sending a feature myname command (so XBoard would derive a default name from the executable name) than send feature myname="<empty>".

If you can post what Greko prints, I can see if this is fixable in Polyglot.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Engine name is <empty>

Postby LouisZulli » 26 Aug 2011, 14:20

When executed from the command line, in response to my entering "uci"
Code: Select all
White(1): uci
id name GreKo 8.2
id author Vladimir Medvedev
option name Hash type spin default 1 min 1 max 1024
option name MultiPV type spin default 1 min 1 max 64
option name UCI_LimitStrength type check default false
option name UCI_Elo type spin default 2100 min 1200 max 2400
option name LimitKNPS type spin default 9999 min 1 max 9999
uciok


Here's the source code from commands.cpp:
Code: Select all
////////////////////////////////////////////////////////////////////////////////

void OnUCI()
{
  g_protocol = UCI;

  out("id name ");
  out(VERSION);
  out("\n");
  out("id author Vladimir Medvedev\n");
  out("option name Hash type spin default 1 min 1 max 1024\n");
  out("option name MultiPV type spin default 1 min 1 max 64\n");
  out("option name UCI_LimitStrength type check default false\n");
  out("option name UCI_Elo type spin default 2100 min 1200 max 2400\n");
  out("option name LimitKNPS type spin default 9999 min 1 max 9999\n");
  out("uciok\n");
}
////////////////////////////////////////////////////////////////////////////////


Code: Select all
Here's utils.h, and the definition of the out function:
//  GREKO Chess Engine
//  (c) 2002-2011 Vladimir Medvedev <vrm@bk.ru>
//  http://greko.110mb.com

//  utils.h: some utilities
//  modified: 1-Aug-2011

#ifndef UTILS_H
#define UTILS_H

#include "types.h"

extern FILE* g_log;

void  InitInput();
int   InputAvailable();
void  out(const char* s);
char* ReadInput(char* buf, int sz);
void  RandSeed32(U32 seed);
U32   Rand32();
U64   Rand64();
void  Highlight(int on);
void  SleepMilliseconds(int ms);

inline void out(const char* s)
{
  printf(s);
  if (g_log)
  {
    fprintf(g_log, s);
    fflush(g_log);
  }
}
////////////////////////////////////////////////////////////////////////////////

template <typename T>
inline void out(const char* format, T arg)
{
  printf(format, arg);
  if (g_log)
  {
    fprintf(g_log, format, arg);
    fflush(g_log);
  }
}
////////////////////////////////////////////////////////////////////////////////

template <typename T1, typename T2>
inline void out(const char* format, T1 arg1, T2 arg2)
{
  printf(format, arg1, arg2);
  if (g_log)
  {
    fprintf(g_log, format, arg1, arg2);
    fflush(g_log);
  }
}
////////////////////////////////////////////////////////////////////////////////

#endif


Here are related(?) compiler warnings:

Code: Select all
In file included from utils.cpp:8:
utils.h: In function ‘void out(const char*)’:
utils.h:27: warning: format not a string literal and no format arguments
utils.h:30: warning: format not a string literal and no format arguments
LouisZulli
 
Posts: 7
Joined: 12 Jan 2010, 17:54

Re: Engine name is <empty>

Postby H.G.Muller » 26 Aug 2011, 20:57

This is weird; normally the line "id name GreKo8.2" should lead Polyglot to send feature myname="GreKo 8.2". What happens when you run from the command line:

polyglot -noini -ec EXECUTABLE -ed DIRECTORY

with EXECUTABLE and DIRECTORY the names applicable to GreKo, and then type:

xboard
protover 2

?
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Engine name is <empty>

Postby Tony Mokonen » 26 Aug 2011, 21:58

Why run GreKo 8.2 through Polyglot? GreKo supports both xboard/winboard and UCI.
Last edited by Tony Mokonen on 26 Aug 2011, 22:00, edited 1 time in total.
User avatar
Tony Mokonen
 
Posts: 77
Joined: 25 Jul 2005, 19:30
Location: Vancouver, BC, Canada

Re: Engine name is <empty>

Postby LouisZulli » 26 Aug 2011, 21:59

Here's what I get:

Code: Select all
PolyGlot 1.4.67b by Fabien Letouzey.
xboard
protover 2
feature done=0
feature analyze=1
feature colors=0
feature draw=1
feature ics=1
feature myname="<empty>"
feature name=1
feature pause=0
feature ping=1
feature playother=1
feature sigint=1
feature reuse=1
feature san=0
feature setboard=1
feature sigint=0
feature sigterm=0
feature time=1
feature usermove=1
feature nps=1
feature memory=1
feature smp=0
feature egt=""
feature variants="normal"
feature option="MultiPV -spin 1 1 64"
feature option="UCI_LimitStrength -check 0"
feature option="UCI_Elo -spin 2100 1200 2400"
feature option="LimitKNPS -spin 9999 1 9999"
feature option="Polyglot SettingsFile -file /Users/louis/.polyglot/<empty>.ini"
feature option="Polyglot Log -check 0"
feature option="Polyglot LogFile -file polyglot.log"
feature option="Polyglot Resign -check 0"
feature option="Polyglot ResignMoves -spin 3 0 10000"
feature option="Polyglot ResignScore -spin 600 0 10000"
feature option="Polyglot Book -check 0"
feature option="Polyglot BookFile -file book.bin"
feature option="Polyglot BookRandom -check 1"
feature option="Polyglot BookDepth -spin 256 0 256"
feature option="Polyglot STFudge -spin 20 0 1000"
feature option="Polyglot SyncStop -check 0"
feature option="Polyglot Save -save"
feature done=1
LouisZulli
 
Posts: 7
Joined: 12 Jan 2010, 17:54

Re: Engine name is <empty>

Postby LouisZulli » 26 Aug 2011, 23:01

Tony Mokonen wrote:Why run GreKo 8.2 through Polyglot? GreKo supports both xboard/winboard and UCI.


I didn't realize that GreKo supported xboard protocol. I chose it because I knew it supported UCI and because I knew I could compile it quickly and easily for my Mac. My goal was not to install GreKo, but to test my installation of xboard+polyglot.

I think I'll find a strictly UCI engine and repeat my test!
LouisZulli
 
Posts: 7
Joined: 12 Jan 2010, 17:54


Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 32 guests