Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Engine as a DLL

Author: Rafael Andrist

Date: 08:31:00 01/25/03

Go up one level in this thread


On January 25, 2003 at 11:10:04, Alvaro Jose Povoa Cardoso wrote:

>Hi all,
>I was wondering if it is possible to make a chess engine as a DLL.
>I mean without the Winboard protocol, just a home made GUI and an engine as a
>DLL.
>Naturally that poses an immediate problem: how to give time slices to the GUI in
>order to respond.
>
>Can someone give me some ideas on how to do this?

Use 2 threads, 1 for the GUI and 1 for the Engine. A simple model could be:

GUI calls DLL function "startSearchThread"
    and periodicaly asks for the search infos using another function

To stop the search (maybe the user has pressed a stop button) the GUI calls
another function which sets a "stop" flag. The search thread (which has to check
the stop flag periodicaly, maybe after 50000 nodes or so) recognizes the stop
flag and stops the thread.

regards
Rafael B. Andrist



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.