cgao3 / benzene-vanilla-cmake

CMake managed Benzene vanilla for playing and solving the game of Hex, easier to install!
GNU Lesser General Public License v3.0
39 stars 20 forks source link

Weakening MoHex #7

Closed andyljones closed 3 years ago

andyljones commented 3 years ago

I'd like to use MoHex to benchmark my own agent during training, but frustratingly MoHex is too good early on: my early agents always lose, so the Elos I derive from MoHex are uninformative.

To fix this, I'd like to build a 'ladder' of MoHex agents that I can play my own against, with a full-strength default MoHex at one end, and a barely-better-than-random MoHex at the other. Then no matter how bad my agent, I'll always have a MoHex version to play it against that'll get me an informative Elo.

I've already figured out that param_mohex max_games 1 basically turns off the MCTS, but even then MoHex still performs a lot better than random. I assume this is due to some combination of the VC and IC engines, so practically I'm asking: how do I turn those off? Or even better, how do I cripple them?

Something I'm particularly interested in is crippling it on smaller boards: I'd really like it to do no-better-than-random (as opposed to the current perfect play) on a 5x5, since that'll speed up a lot of prototyping.

I've spent the morning playing with various parameters and hunting through the code to figure out what they do, but I can't find anything I can flip such that a random agent can sometimes win against it.

andyljones commented 3 years ago

Just realised there's an obvious hack: have MoHex some fraction of the time, and make a random move otherwise.

I think this'll suit my needs, but I'm still keen to know if there's some dial on MoHex I can just turn up and down.

cgao3 commented 3 years ago

yes, use param_mohex max_games 1 would force mohex do a single iteration search, so major strength comes from VC and ICE computation. As you have discovered, VC computation can also be interrupted anytime, so if you set a very small time for mohex, it wouldn't be able to find many useful VC information. The other way to configure VC is through the following commands:

param_player_ice
param_player_vc

You can just type either commands, then it will list you available configurations you can set.

andyljones commented 3 years ago

Hurrah - I'll have a play with those, and fall back to the 'just play a random move' if it doesn't work out. Thanks very much!