danzel / PatchworkSim

Simulation of the board game Patchwork for AI exploration
2 stars 0 forks source link

WeightedTreeSearch look ahead. #23

Closed danzel closed 6 years ago

danzel commented 6 years ago

Currently it assumes we will purchase the next piece in the list, which is almost always wrong. Need to guess it could be any of the next 6 probably.

Could combine with the MCTS move maker to bias towards the best pieces.

danzel commented 6 years ago

Have done a version where the MCTS passes its likely next pieces to WeightedTreeSearch, so WTS can use them when deciding where to place its next piece. Ref: 83131b9b39f128d442690126f8a141845a6bb1e0 and 7a1f82161d4e44c488dcd4d5c4e4655febeb07a2.

Better but still not as good as Exhaustive 1_6

danzel commented 6 years ago

Comparison between 1_6 and Weighted with MCTS preplacing 1_6 is A, Preplacing is B. https://gist.github.com/danzel/52c05d0d5d12ea0b98280df171bca2b8 Ran using 5fbe71fded2f0da57cb4fa66ca9391b6e74062a0

danzel commented 6 years ago

We lose less now with the bug fixed. Current full losses compared to 1_6 look to be when we think we can place something later but we can't. MCTS will need to take in to account moves to solve that.

Should be able to improve it by giving WeightedTreeSearch a better utility #24, or by using MCTSPreplace with an alternative preplacer #27