KataGo icon indicating copy to clipboard operation
KataGo copied to clipboard

"ownership true" and memory

Open objt-ba opened this issue 6 years ago • 3 comments

I usually let KataGo analyze with the following command:

kata-analyze <ponder-time>

But sometimes, users also want an ownership map. Then I usually stop calculations. And I run the following command;

kata-analyze <ponder-time> ownership true

Apparently, when I do that, the calculations start from scratch. It is a bit annoying of course when the number of playouts was already really high. - Is there a way to get around losing the memory ?

Right now, I am considering 2 workarounds:

  1. To spawn a second KataGo instance to make this calculation, just to keep the memory as is.
  2. Alternatively, I could just always run katago with ownership true. It would then just be a matter of showing/hiding it for the user. But I fear this will impact performance heavily, and it is a waste if users don't use the ownership map at all.

Any ideas ?

objt-ba avatar Feb 15 '20 20:02 objt-ba

Have you tried benchmarking the cost of always ownership true?

lightvector avatar Feb 16 '20 13:02 lightvector

Just noting that when I run KataGo on my desktop with Lizzie, the "KataEstimate" button toggles the ownership map on and off without interfering with analysis. I guess that means Lizzie is running KataGo with ownership true all the time? I haven't been aware of anyone complaining about performance.

hanysz avatar Feb 16 '20 22:02 hanysz

getAverageTreeOwnership is certainly a heavy calculation though it may be parallelized with others. Reusing childWeightBuf in getAverageTreeOwnershipHelper by object pool pattern will improve performance a little.

y-ich avatar Jul 14 '21 10:07 y-ich