Jump to content
  • Advertisement
Sign in to follow this  
EvLer

Mancala heuristic

This topic is 5453 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone, I was wondering if anybody could advise a good heuristic for mancala computer agent. It's mainly an implementation issue (in C). I know that free turn most of the time takes precedence. But how to implement it I am a bit unsure. So far, I have a game tree, which is built out of lists. So, I use minimax based on evaluate(). At first for evaluate() I decided to return difference in home_bins, then difference in stones on the players' sides, but that does not seem to work out well. Any advice is very much appreciated.

Share this post


Link to post
Share on other sites
Advertisement
There seem to be a large variety of mancala rules. Can you, please, post a link to the set of rules that you are using, or the exact rules themselves?

Share this post


Link to post
Share on other sites
Rules are following:
6 bins + one home_bin, per each player.

Player chooses a bin to empty, the amount of stones is distributed counter-clock-wise into other bins, even on the opponents side, but not opponent's home_bin.

Player gets a free turn if the last stone from the bin he chooses to empty lands in his home_bin.

If the last stone lands in an empty slot on the palyer's side, but the opponent's side has some stones in the bin across, those opponent's stones are captured into the player's home_bin.

Game ends when one of the players clears out his board.
Winner is the one who has most stones in home_bin.

I can't make computer make smart moves. I used a minimax, no prunning yet, based on evaluate function, as I mentioned before. Current depth is 5, and if I make depth larger, computer makes even more strange choices.
Please, if you have some suggestions, that would be greatly appreciated.

Share this post


Link to post
Share on other sites
I think the difference in home_bins should work fine. You might have done something wrong with the search.

You should at least implement alpha-beta. It reaches twice the depth of simple minimax and that will certainly have a huge impact in playing strength.

Share this post


Link to post
Share on other sites
I need advice on alpha-beta though. Is it better to get it running without alpha-beta first with a fixed depth and then implement it after I know that it does find a good move? My depth is going to be fixed anyway.
Thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!