Still ... mancala
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.
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.
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.
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.
Thanks a lot.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement