The handicap_layout module

The gomill.handicap_layout module describes the standard layout used for fixed handicap stones. It follows the rules from the GTP specification.

gomill.handicap_layout.handicap_points(number_of_stones, board_size)[source]
Return type:list of points

Returns the handicap points for a given number of stones and board size.

Raises ValueError if there isn’t a standard placement pattern for the specified number of handicap stones and board size.

The result’s length is always exactly number_of_stones.

gomill.handicap_layout.max_fixed_handicap_for_board_size(board_size)[source]
Return type:int

Returns the maximum number of stones permitted for the GTP fixed_handicap command, given the specified board size.

gomill.handicap_layout.max_free_handicap_for_board_size(board_size)[source]
Return type:int

Returns the maximum number of stones permitted for the GTP place_free_handicap command, given the specified board size.