Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need heuristic function for Reversi(Othello) ideas

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.

like image 957
john smith Avatar asked Nov 09 '12 19:11

john smith


2 Answers

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.

like image 165
Sergey Kalinichenko Avatar answered Dec 27 '22 03:12

Sergey Kalinichenko


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/

like image 45
Kartik Kukreja Avatar answered Dec 27 '22 03:12

Kartik Kukreja