zxqfl / mcts

Generic, parallel Monte Carlo tree search library
MIT License
65 stars 19 forks source link

Is there a way to diagnose number of playouts? #5

Open xtagon opened 4 years ago

xtagon commented 4 years ago

Hi,

When using playout_parallel_for, is there a way to diagnose the final number of playouts that were done between when it was started and when the timeout was reached?

My use case is to set a constant timeout, and use the final number of playouts as a performance measurement. There is a way to diagnose the number of nodes (and this is included in .diagnose()) but I didn't see anything for playouts.

Thanks!

xtagon commented 4 years ago

I just confirmed that if I call debug_moves() then the printed visits for each move can be totaled to get the number of playouts. The problem is I don't see a way to access that value without printing it to the console.