Question

I have just studied about heuristic functions but I cant find an idea for heuristic function for reversi(Othello), I just need a good idea for grading some state of the board

I thought about :

  1. count the number of moves
  2. count the number of discs
  3. and count the number of discs that are in corner and give them better score,

I dont know if it is good.

Was it helpful?

Solution

No, it is not good enough. The number of disks is particularly useless - although it is the goal of the game to collect as many as possible, the count on any move except for the last one is rather meaningless. Here are a few more things that you should take into consideration:

  • Counting the number of moves gives you a measure of immediate mobility; everything else being equal, situations when you can make a move that opens up more other moves should be favored. You need to measure the potential mobility as well - the number of opponent's disks next to an open space.
  • X squares - B2, B7, G2, and G7. Placing your disk there early almost certainly gives away the adjacent corner, so your heuristic should give them high negative weight, at least in the first 40 moves
  • C squares - A2, A7, B1, G1, H2, H7, B8, and G8. They offer the opponent access to corners, so their value should be different from that of other squares, at least when the edge has fewer than five disks

You can read a relatively short description of the strategy used in building a relatively strong (in the sense of its ability to beat human novices) reversi applet here.

OTHER TIPS

A good heuristic function for othello/reversi needs to capture more aspects of the positions, including:

  • Coin parity
  • Mobility (No. of possible moves)
  • Corner captivity (corners are stable/cannot be turned and have special importance)
  • Stability (measure of discs being immune from being turned)

I've discussed these aspects and provided implementation of a good heuristic function here: http://kartikkukreja.wordpress.com/2013/03/30/heuristic-function-for-reversiothello/

You could try it. Nothing like data for getting an answer.

Assuming you use reasonable software engineering practice and abstract the heuristic, you could check it pretty quickly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top