lightvector / KataGo

GTP engine and self-play learning in Go
https://katagotraining.org/
Other
3.5k stars 564 forks source link

How to force KataGo to win by max points when giving 9H to 15 Kyu? Max aggressiveness... #417

Open bochen2027 opened 3 years ago

bochen2027 commented 3 years ago

Seems like KataGo is the strongest free and open source out there at the moment, esp. for high handicap against AI.

Now beyond Sabaki and Lizzie gui there is KaTrain and q5Go interfaces...

Say the average Go player is 15 kyu or thereabouts... could KataGo on a single RTX3080/RTX3090 overwhelmingly beat a 15 kyu player by giving him or her NINE handicap stones headstart?

Put another way, assuming the answer to the above question is Yes it can, how can I set up KataGo with whatever GUI (be it Lizzue, KaTrain, etc) so that it is anticipating a 15 kyu player (maybe even weaker but not stronger, certaintly not a pro and nor even a dan etc) and go for max points/kills so that kataGo tries its best not only to win against the human 15 kyu player even at 9 handicaps but also to basically (to the extent possible) to win by the widest margins possible as well....

lightvector commented 3 years ago

As other people mentioned in response to your reddit post, use playoutDoublingAdvantage=3 in the config, or through the direct support in KaTrain. (https://www.reddit.com/r/baduk/comments/lfe73g/how_to_force_katago_to_win_by_max_points_when/),

You may also increase dynamicScoreUtility from 0.3 up to 0.5 or 0.6.

Keep in mind that there is probably no bot right now that is as good at giving extremely high handicap than top human players, even for bots that are superhuman they are expected to be much worse than top human players at this. So, high handicap games are not exactly the ideal place to demonstrate why a bot is better than a pro... because they probably aren't. :)

The reason is because even when configured to maximum aggression, top bots still are going to be playing with a fairly "honest" style, the way an honest pro teacher would play in a teaching game. They may play a bit more aggressively and make some overplays, but only ones they consider "difficult" to refute - i.e they are not going to make anything that they consider an overplay that would be worse even by a few points that they consider likely to be turned against them, even if doing so would require a high-dan level of skill. Additionally, aside from overplays, they don't have a good model of the weaknesses of human players and what would challenge them.

Human pros, while not consciously making such overplays either (if they are playing honestly), often have quite good knowledge of how weaker players play, due to being also a human (and having passed through those ranks) and due to teaching and lectures and reviewing games for other players, which should put them ahead of bots in this regard. And of course, a high dan amateur with no qualms about playing major tricks and overplays may do the best of all.

bochen2027 commented 3 years ago

Am I doing somethings wrong? I go to github for katrain and download it and then even have it download/update to the latest strongest 40b net inside of katrain for the katago networks... however unlike when I was using Sabaki+LeelaZero and/or Lizzie+LeelaZero I noticed this KaTrain doesn't seem to be taxing my GPU much at all... I'm on Windows 10 latest so OpenCL shoudln't be a problem, I even have rtx 3080 card. Year or two ago when I had gtx 1080ti and then rtx2080Ti whenever I ran leelazero it would max out my GPU regardless of on sabaki or lizzie gui... and I recall at first run it would do a long "tuning" process that could take a bit...

For KaTrain I'm not getting that dos "tuning" part, nor is it maxing out my GPU. And win I play against it with 9H, it doesn't seem all that strong, I mean it just feels like playing weak moves and I'm actually like a 20kyu to 18 kyu range, and CrazyStone was killing me, Leela 11 (not the zero) was killing me, so suddenly I feel like KataGo in KaTrain playing softly and weak moves so couple that with no tuning and low GPU usage I can't help but think something is very wrong here?

Is there a good youtube videos on how to set up logging with Katrain to see how many n/s or write to text the console stuff in gtp etc to see I'm getting and what is going on?

lightvector commented 3 years ago

It sounds like you should be asking these questions on the katrain github: https://github.com/sanderland/katrain

alreadydone commented 3 years ago

Just saw this Wired article introducing the AI system Maia (based on Leela (Chess) Zero) that learns how human moves (paper from Aug and Jul 2020). Crucial in handicap games is the ability to quickly adapt to the opponent's style and exploit weaknesses, which pros are currently better than machines. I wonder if pretraining with a classification task (e.g. given a position and the move made, predict who made the move among a diverse set of players) could learn useful representation that can extract main characteristics of a player from just a few early moves and use them to predict future moves. Maybe facial recognition systems that after being trained on a diverse set of faces, can extract features of a face from just one photo, would also be inspirational.