Jump to content
  • Advertisement
Sign in to follow this  
EvLer

Still ... mancala

This topic is 5390 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, what is a good heuristic for mancala? I am in the process of writing evaluate(), but not sure how to go about it. At first I thought it can be based on the dufference between two homebins, then on difference in total number of stones on a side of each player, but that does not seemt to work out well. Any advice is very much appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by SSJCORY
What's a heuristic?

it's a big word for a strategy or method.

Share this post


Link to post
Share on other sites
I'd say write down the logic on paper whatever the problem solving strategy and then use that to formulate your code. Works well for me. I can't really help since I don't know anything about mancala.

Share this post


Link to post
Share on other sites
A straight minimax search works very well for Mancala because the number of moves you can make during a turn is very limited (usually six or fewer). You can make a really deep tree and get a pretty unbeatable game without much work.

Share this post


Link to post
Share on other sites
Yeah, that's what I have. My problem is implementation of the evaluate() which is the base for the minimax. More specifically, it probably has to be based on the difference of the stones in each homebin (or score bin), but that would mean building a tree until the game is over for one of the players. Complexity of that is quite high (6^n) and I am not sure how to determine depth. Another thing, is alpha-beta prunning going to improve the search much in terms of time? Or is simple minimax sufficient enough?

Thanks a lot.

Share this post


Link to post
Share on other sites
Alpha-beta pruning will generally improve your search speed by 20-30% by eliminating travels down pointless branches. Given that pruning just requires a couple of if() statements, it's well worth it.

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!