gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] Threads


From: Andrew Derrick Balsa
Subject: Re: [gnugo-devel] Threads
Date: Fri, 8 Nov 2002 03:05:00 +0000
User-agent: KMail/1.4.3

Hi,

On Thursday 07 November 2002 16:39, Heikki Levanto wrote:
> On Thu, Nov 07, 2002 at 09:56:05PM +0000, Andrew Derrick Balsa wrote:
> > However, GNU Go is much more complicated and much larger than Randyplus.
> > Adding threads would be a non-trivial task. It may be worth it, though.
>
> I think this sounds backwards. Using threads is a solution. Unless someone
> clearly explains me the problem we are trying to solve with threads, I see
> no reason to add them "just in case" they "may be worth it".

Actually I was just answering the question by Trevor about a way to think in 
the opponent's time.

My initial impetus for implementing threads in Randyplus was completely 
different: I wanted to implement a proposed asynchronous "abort" GTP command, 
which can be used to abort an exceedingly long genmove command. I coded it. 
It works. It added less than 1KB to the executable and just a few lines of 
code to the source. No bugs so far. :-) 

Just adding threads to GNU Go won't improve the quality of its play, I agree. 

>
> Threads are known be tricky to get right, and to introduce bugs that are
> hard to reproduce and fix. Of course we could do that, but I feel that the
> time would be more profitably used for other improvements in the engine.
> Of course, if someone comes with a useful-sounding patch, who am I to
> complain...

Adding a parallel execution path increases the complexity of any program, and 
requires more discipline in programming, but it does not add any bug per se. 
And the pthreads framework found in glibc can be considered relatively safe.

As I wrote, adding threads to GNU Go would not be a trivial task. Whether it's 
worth the effort depends on the proposed implementation and what use is made 
of it.

Regards,
-- 
Andrew D. Balsa
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]