Hi Hiroshi,
I try to layout my approach:
- expandLeaf: expands a leaf node, after being visited 10 times (a
parameter, but increasing it usually did not harm playing strength
significantly)
it contains a
if (!expandmutex.try_lock())
return false;
which was in the code anyway to avoid, that the same node was expanded
by two different threads.
The second thread just works with the not expanded node, if the first
thread is busy expanding it and goes on with the playout. In this case
we had some delayed expansion anyway, as this thread is doing the
playout with the node, which should have been expanded before.
The only thing I changed: expandmutex was a mutex local to the node
before, now it is a global mutex. Now no node is being expanded, if one
expansion is in progress by another thread, but the playouts go on with
the not expanded nodes as usual.
I did not measure how often a node is visited on average now before
being expanded, but with our relatively slow playouts and the not too
big CNN I do not think it goes a lot above 15 or so. Tests indicated
that even 30 for the parameter was not a problem for the playing
strength before. I think including the CNN does not reduce the
playouts/move significantly. I did no exact measurements, just was happy
to see my usual numbers:) Even the 1.6ms used by the CNN will be on
resources (graphic card) different from the cpu, therefore other threads
(8 threads on 4 cores) might take the time to use the cpu resources.
Am 12.01.2015 um 13:24 schrieb Hiroshi Yamashita:
Todays bot tournament nicego19n (oakfoam) played with a CNN for move
Great! oakfoam had played with CNN already.
Second game vs Aya was difficult semeai with ko.
http://files.gokgs.com/games/2015/1/11/NiceGo19N-AyaMC.sgf
one position taking about 1.6ms on the GTX-970.
If C++ one thread do same thing, how slow is it? 10 times slower?
Hiroshi Yamashita
_______________________________________________
Computer-go mailing list
[email protected]
http://computer-go.org/mailman/listinfo/computer-go
_______________________________________________
Computer-go mailing list
[email protected]
http://computer-go.org/mailman/listinfo/computer-go