skotz / volcanoes

Prototype for a new board game
4 stars 1 forks source link

AI improvement idea for games played with rules AllowMagmaChamberCaptures=true #21

Closed simondorfman closed 5 years ago

simondorfman commented 5 years ago

I played a game against the strongest AI (Monte Carlo Barricade) and it kept making bad chamber captures, setting me up to take them back. Here's the game log:

7A 7A G 10D 7A G 12A 12A G 14D 12A G 10D 1C G 6C 14D G 1C 8B G 12D 6C G 12D 14A G 14A 8B G 11B 13C G 11B 11B G 13C 18A G

Screenshot: 2018-12-28 16_28_40-window

Idea for how to improve the AI: something like this: Play these opportunities (in descending order of goodness):

  1. 3 chamber, play on this because it becomes a 4 and then grows to a volcano
  2. 2 chamber, play on this, then play again after growth, so it becomes a volcano

And generally avoid doing this:

  1. Play on a 2 or 3 chamber on your second turn (because you'll set up opponent for stealing volcanoes)
  2. Play on a 1 or 2 chamber on your first turn (unless you plan on playing on the 2 chamber with your second move)
skotz commented 5 years ago

The MCTS Barricade AI is basically the MCTS algorithm, only it pulls it's candidate moves from a list of tiles on the opponent's shortest path. It's not really designed for capture rules. The idea with this one (and the MCTS beeline engines) is that by limiting the candidate moves for a position we can search deeper. The problem is that if the theoretically best move isn't in the list of candidate moves, then the algorithm will never find it.

The plain and simple MCTS engine doesn't have any coded preconceptions like this. It just runs the pure algorithm on a list of every possible move in the position and sees what happens. For this reason the plain MCTS is by far the best for testing new rules.

The MCTS algorithm is so good for games with no established theory, that any new engines will most likely just be the MCTS with a modified candidate move selection process.

skotz commented 5 years ago

Also, I just fixed two bugs in the MCTS Beeline and MCTS Barricade engines. I'll get a build for those shortly.

skotz commented 5 years ago

Closing for now since move ordering benefits minimax more than mcts, and I'm probably not going to mess with minimax for this game any more. The mcts algorithm should converge on an optimal strategy by itself given enough time to think.