Implemented strategy evaluation for moves and improved scoring for BayesMcts
This commit is contained in:
4
main.py
4
main.py
@@ -83,8 +83,8 @@ def test_evaluation():
|
||||
a = engine.BayesMctsEngine
|
||||
b = engine.ClassicMctsEngine
|
||||
limit = engine.Limit(time=0.5)
|
||||
evaluator = simulation.Evaluation(a, StockFishStrategy(), b, RandomStrategy(random.Random()), limit)
|
||||
results = evaluator.run(2)
|
||||
evaluator = simulation.Evaluation(a, StockFishStrategy(), b, StockFishStrategy(), limit)
|
||||
results = evaluator.run(24)
|
||||
a_results = len(list(filter(lambda x: x.winner == simulation.Winner.Engine_A, results))) / len(results) * 100
|
||||
b_results = len(list(filter(lambda x: x.winner == simulation.Winner.Engine_B, results))) / len(results) * 100
|
||||
draws = len(list(filter(lambda x: x.winner == simulation.Winner.Draw, results))) / len(results) * 100
|
||||
|
||||
Reference in New Issue
Block a user