Remove all concurrency code
Muddled the code too much, and only gave a marginal performance improvement in the grand scheme of things. Other ways to parallelize MCTS will be nicer to implement and could yield better results.
This commit is contained in:
@@ -9,13 +9,6 @@ public sealed class RootScores
|
||||
public float MaxScore;
|
||||
public int Visits;
|
||||
|
||||
public void VisitConcurrent(float score)
|
||||
{
|
||||
Intrinsics.CASAdd(ref ScoreSum, score);
|
||||
Intrinsics.CASMax(ref MaxScore, score);
|
||||
Interlocked.Increment(ref Visits);
|
||||
}
|
||||
|
||||
public void Visit(float score)
|
||||
{
|
||||
ScoreSum += score;
|
||||
|
||||
Reference in New Issue
Block a user