Author: Odd Gunnar Malin
Date: 13:00:15 12/25/03
Go up one level in this thread
On December 25, 2003 at 02:55:46, Suntinger Jürgen wrote:
>Hi!
>
>I began to use the UCI - Protokoll but with Fritz there are some Problems. All
>works fine with Information but the speed of the connection from my Engine and
>the Fritz GUI (Fritz 7 with the latest update) is not very fast. When I send
>Information about the aktual search (it's in an new created thread), e.g. it
>takes two seconds to send the information of a score with a short pv and the
>nodes.
>
>With Arena my Engine works fine at all.
>
>What could be the problems?
>
>I read all the strings with gets(char *) and write it with puts(char *).
>Is it only because of Fritz, but other UCI Engine also work fine with it.
>
>Thanks.
Maybe Chessbase should add something on their site for this. A short answer is
that to work correct in Fritz you need the searchthread to be at a lower (or
eaual) priority than the Window that displays the PV. Fritz don't manage to do
this by itself if your engine are threaded.
But anyhow this is what I do (it's an Winboard engine but anyhow).
void cmdGo(...)
{
...
setThreadPriorityToCurrent(eng->hThread);
...
}
void cmdAnalyze(...)
{
...
setThreadPriorityToCurrent(eng->hThread);
...
}
bool setThreadPriorityToCurrent(HANDLE hThread)
{
DWORD currentPriority=GetThreadPriority(GetCurrentThread());
DWORD threadPriority=GetThreadPriority(hThread);
if (currentPriority!=threadPriority)
{
SetThreadPriority(hThread,currentPriority);
return true;
}
return false;
}
Probably it is enough to do this this in the handling of 'isready' for
uci-engines in Fritz.
Odd Gunnar
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.