Interface GobanEngineConfig

interface GobanEngineConfig {
    aga_handicap_scoring?: boolean;
    allow_ko?: boolean;
    allow_self_capture?: boolean;
    allow_superko?: boolean;
    automatic_stone_removal?: boolean;
    black_player_id?: number;
    black_prisoners?: number;
    board?: JGOFNumericPlayerColor[][];
    board_is_repeating?: boolean;
    clock?: GameClock;
    disable_analysis?: boolean;
    end_time?: number;
    errors?: {
        error: string;
        stack: any;
    }[];
    free_handicap_placement?: boolean;
    game_date?: string;
    game_id?: string | number;
    game_name?: string;
    group_ids?: number[];
    handicap?: number;
    handicap_rank_difference?: number;
    height?: number;
    initial_player?: PlayerColor;
    initial_state?: GobanEngineInitialState;
    is_game_record?: boolean;
    isobranch_hash?: string;
    komi?: number;
    ladder?: number;
    ladder_id?: number;
    latencies?: {
        [player_id: string]: number;
    };
    marks?: {
        [mark: string]: string;
    };
    move_tree?: MoveTreeJson;
    moves?: GobanMovesArray;
    needs_sealing?: JGOFSealingIntersection[];
    ogs?: {
        black_dead_stones: string;
        black_seki_eyes: string;
        black_stones: string;
        black_territory: string;
        white_dead_stones: string;
        white_seki_eyes: string;
        white_stones: string;
        white_territory: string;
    };
    ogs_import?: boolean;
    opponent_plays_first_after_resume?: boolean;
    original_disable_analysis?: boolean;
    original_sgf?: string;
    outcome?: string;
    phase?: GobanEnginePhase;
    player?: JGOFNumericPlayerColor;
    player_id?: number;
    player_pool?: {
        [id: number]: GobanEnginePlayerEntry;
    };
    players?: {
        black: GobanEnginePlayerEntry;
        white: GobanEnginePlayerEntry;
    };
    ranked?: boolean;
    removal?: boolean[][];
    removed?: string | JGOFMove[];
    rengo?: boolean;
    rengo_casual_mode?: boolean;
    rengo_teams?: {
        black: GobanEnginePlayerEntry[];
        white: GobanEnginePlayerEntry[];
    };
    review_id?: number;
    reviews?: {
        [review_id: number]: GobanEnginePlayerEntry;
    };
    rules?: GobanEngineRules;
    score?: Score;
    score_handicap?: boolean;
    score_passes?: boolean;
    score_prisoners?: boolean;
    score_stones?: boolean;
    score_territory?: boolean;
    score_territory_in_seki?: boolean;
    stalling_score_estimate?: StallingScoreEstimate;
    start_time?: number;
    strict_seki_mode?: boolean;
    superko_algorithm?: GobanEngineSuperKoAlgorithm;
    throw_all_errors?: boolean;
    time_control?: JGOFTimeControl;
    time_per_move?: number;
    tournament_id?: number;
    white_must_pass_last?: boolean;
    white_player_id?: number;
    white_prisoners?: number;
    width?: number;
    winner?: number | "black" | "white";
}

Hierarchy (view full)

Properties

aga_handicap_scoring?: boolean
allow_ko?: boolean
allow_self_capture?: boolean
allow_superko?: boolean
automatic_stone_removal?: boolean
black_player_id?: number
black_prisoners?: number
board_is_repeating?: boolean
clock?: GameClock
disable_analysis?: boolean
end_time?: number
errors?: {
    error: string;
    stack: any;
}[]

Type declaration

  • error: string
  • stack: any
free_handicap_placement?: boolean
game_date?: string
game_id?: string | number
game_name?: string
group_ids?: number[]
handicap?: number
handicap_rank_difference?: number
height?: number
initial_player?: PlayerColor
initial_state?: GobanEngineInitialState
is_game_record?: boolean
isobranch_hash?: string
komi?: number
ladder?: number
ladder_id?: number
latencies?: {
    [player_id: string]: number;
}

Type declaration

  • [player_id: string]: number
marks?: {
    [mark: string]: string;
}

Type declaration

  • [mark: string]: string
move_tree?: MoveTreeJson
needs_sealing?: JGOFSealingIntersection[]

Intersections that need to be sealed before scoring should happen

ogs?: {
    black_dead_stones: string;
    black_seki_eyes: string;
    black_stones: string;
    black_territory: string;
    white_dead_stones: string;
    white_seki_eyes: string;
    white_stones: string;
    white_territory: string;
}

Type declaration

  • black_dead_stones: string
  • black_seki_eyes: string
  • black_stones: string
  • black_territory: string
  • white_dead_stones: string
  • white_seki_eyes: string
  • white_stones: string
  • white_territory: string
ogs_import?: boolean

Deprecated, I don't think we need this anymore, but need to be sure

opponent_plays_first_after_resume?: boolean
original_disable_analysis?: boolean
original_sgf?: string
outcome?: string
player_id?: number
player_pool?: {
    [id: number]: GobanEnginePlayerEntry;
}

Type declaration

players?: {
    black: GobanEnginePlayerEntry;
    white: GobanEnginePlayerEntry;
}

Type declaration

ranked?: boolean
removal?: boolean[][]
removed?: string | JGOFMove[]

Removed stones in stone removal phase Passing an array of JGOFMove objects is preferred, the string format exists for historical backwards compatibility. It is an encoded move string, e.g. "aa" for A19

rengo?: boolean
rengo_casual_mode?: boolean
rengo_teams?: {
    black: GobanEnginePlayerEntry[];
    white: GobanEnginePlayerEntry[];
}

Type declaration

review_id?: number
reviews?: {
    [review_id: number]: GobanEnginePlayerEntry;
}

Type declaration

score?: Score
score_handicap?: boolean
score_passes?: boolean
score_prisoners?: boolean
score_stones?: boolean
score_territory?: boolean
score_territory_in_seki?: boolean
stalling_score_estimate?: StallingScoreEstimate
start_time?: number
strict_seki_mode?: boolean
superko_algorithm?: GobanEngineSuperKoAlgorithm
throw_all_errors?: boolean

When loading initial state or moves, by default GobanEngine will try and handle bad data by just resorting to 'edit placing' moves. If this is true, then those errors are thrown instead.

time_control?: JGOFTimeControl
time_per_move?: number
tournament_id?: number
white_must_pass_last?: boolean
white_player_id?: number
white_prisoners?: number
width?: number
winner?: number | "black" | "white"