alreadydone / lz

Go engine with no human-provided knowledge, modeled after the AlphaGo Zero paper.
GNU General Public License v3.0
28 stars 8 forks source link

dynamic komi build for zbaduk.com #101

Open bvandenbon opened 5 years ago

bvandenbon commented 5 years ago

I would love to use the dynamic komi version of leela for http://zbaduk.com . ZBaduk is a website for playing against the bot, but also has some study options.

However, I am just wondering if it is a good idea. ZBaduk runs on ubuntu servers, so I guess I would have to build it myself.

Am I correct that this will allow me to play e.g. without komi, play games with 6.5 komi, more competitive handicap games ?

I would appreciate your opinion in this matter. Do you think it's reliable enough to run 24/7 ? Or are there still some open issues that you are aware of ?

I noticed there are different branches / versions. Which branch do you recommend ?

Is it compatible with the latest networks/weights of leela zero ?

Thank you in advance

alreadydone commented 5 years ago

If you'd like to use one of my branches I'd recommend the branch https://github.com/alreadydone/lz/tree/komi+tensorbatch#dynamic-komi, together with networks like OZ13/14, GX37 or GX89, trained by @pangafu and available at https://github.com/pangafu/LeelaMasterWeight#leela-master-weight. Unfortunately, 40-block networks won't work because they don't exhibit a monotonic dependence of winrate on komi. For certain other networks, there's a chance you need to append the option --tg-auto-pn.

I think the engine is reliable in the sense it won't crash, but to make it perform more stably (less aggressively) in handicap games, you may want to adjust the parameters by appending --max-wr 0.24 --min-wr 0.12 --wr-margin 0.06 (from the default 0.12, 0.06, 0.03).

With a network trained with different komi values (like OZ, but not GX), the value head should be accurate enough to play well under 6.5 komi; simply append --target-komi 6.5 to the parameters. I haven't tested though.

My branches haven't been updated for a long time and engine development has been taken up by @pangafu as well. His trained networks and engine probably achieve the state of the art in handicap games. See: https://github.com/pangafu/LeelaMasterWeight#about-handicap-game关于让子棋 Windows binary of his engine is available in his Google Drive, but you'd need to contact him if you need to compile.

In addition, KataGo can also play handicap games, but it's currently only around the strength of LZ # 130 network (so weaker than GX37 which is around # 157):

Adding score maximization as a secondary objective accelerates learning, at least up to the point we were able to test so far. It also allows the bot to play reasonably in handicap games even without any other special methods, something known to be difficult for other “zero-trained” bots. Example game 1, Example game 2, Example game 3.