Search

Thursday, October 11, 2012

Day 63: Some fuseki things III: Hoshi


This is about playing hoshi at fuseki, of course, just talking about 4-4 point. The formulas should be similar to 3-3 point.

In 9x9 the points are: 44, 46, 64 and 66.

Let's see, for 44 the formula (n+1)*4+4 works.
For point 46 the formula is (n+1)*5-4.

For point 64: (n+1)*(n-3)+4= 10*6+4=64
For point 66: (n+1)*(n-2)-4= 10*7-4=66.

Thinking in a 19x19 board, positions are: 84, 96, 324 and 336.

(n+1)*4+4= 20*4+4=84

(n+1)*5-4=20*5-4=96

(n+1)*(n-3)+4= 20*16+4= 324

(n+1)*(n-2)-4 = 20*17 -4= 336

Like in the San San method let's create a isHoshi method:



public boolean isHoshi(int move,Board board){
        boolean isHoshi=false;
        int n=board.getBoardSize();
        if(move==(n+1)*4+4 || move==(n+1)*5-4 || move==(n+1)*(n-3)+4 || move==(n+1)*(n-2)-4){
            isHoshi=true;
        }
        return isHoshi;
    }

No comments:

Post a Comment