AI improvements
Posted: 21 Sep 2011, 22:27
For the past few weeks I've been focusing on AI improvements. I've made some great strides w/ the minmax, and even moreso w/ the hybrid AI. Against the minmax it wins close to 100% of the time. I also spent time w/ pure Monte Carlo and even at very very high numbers of plays it doesn't do all that well. I've made enough improvements performance-wise to bump up the default depth for minmax to 8.
Over the past night or so I let the 2 AIs play against themselves (using the same warband to keep things fair).
The results were:
Silver wins 4, Gold wins 96
The 4 losses were:
Winning player was Silver; Final score: Silver 6 ---- Gold 3
Winning player was Silver; Final score: Silver 6 ---- Gold 5
Winning player was Silver; Final score: Silver 6 ---- Gold 5
Winning player was Silver; Final score: Silver 6 ---- Gold 3
This was at a depth of 8 for minmax and 4 turns ahead w/ 10000 plays w/ 8 minmax for hybrid.
The hybrid AI is just a combination of Monte Carlo and minmax. However, this Monte Carlo algorithm does not play to the end of the game w/ hybrid, it plays a set number of turns (in this case 4). If the Monte Carlo cannot find a truly optional choice the minmax takes over using a list pruned by the MC eval. Also, if the MC portion determines that all moves are winners or losers, the minmax allows for an optimal choice (using the eval function). The Monte Carlo also doesn't just score if the player is ahead, it takes into account the net gain/loss in victory points for scoring.
However promising, this so far has all been just testing. I myself need to play some games against it now.
~telengard
Over the past night or so I let the 2 AIs play against themselves (using the same warband to keep things fair).
The results were:
Silver wins 4, Gold wins 96
The 4 losses were:
Winning player was Silver; Final score: Silver 6 ---- Gold 3
Winning player was Silver; Final score: Silver 6 ---- Gold 5
Winning player was Silver; Final score: Silver 6 ---- Gold 5
Winning player was Silver; Final score: Silver 6 ---- Gold 3
This was at a depth of 8 for minmax and 4 turns ahead w/ 10000 plays w/ 8 minmax for hybrid.
The hybrid AI is just a combination of Monte Carlo and minmax. However, this Monte Carlo algorithm does not play to the end of the game w/ hybrid, it plays a set number of turns (in this case 4). If the Monte Carlo cannot find a truly optional choice the minmax takes over using a list pruned by the MC eval. Also, if the MC portion determines that all moves are winners or losers, the minmax allows for an optimal choice (using the eval function). The Monte Carlo also doesn't just score if the player is ahead, it takes into account the net gain/loss in victory points for scoring.
However promising, this so far has all been just testing. I myself need to play some games against it now.
~telengard