Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 16874

Othello heuristic method

$
0
0

I'm working on an Othello game that tries to use minimax?

I made a heuristic function for it:

 

    int getHeuristic() {
        // give each square a certain value
        // corners are most valuable

        int[][] values = {
                {10, 2, 7, 7, 7, 7, 2, 10},
                {2, -4, 1, 1, 1, 1, -4, 2},
                {7, 1, 1, 1, 1, 1, 1, 7},
                {7, 1, 1, 1, 1, 1, 1, 7},
                {7, 1, 1, 1, 1, 1, 1, 7},
                {7, 1, 1, 1, 1, 1, 1, 7},
                {2, -4, 1, 1, 1, 1, -4, 2},
                {10, 2, 7, 7, 7, 7, 2, 10}};

        int theHeuristic …

Viewing all articles
Browse latest Browse all 16874

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>