Fast ladder computations that do not play actual moves on the board. More...
Functions | |
bool | IsEdgeLadder (const GoBoard &bd, SgPoint target, SgBlackWhite toPlay) |
Return true, if block can be captured in a ladder running along the edge. | |
bool | IsLadder (const GoBoard &bd, SgPoint target, SgBlackWhite toPlay) |
Return true, if block can be captured in a ladder. |
Fast ladder computations that do not play actual moves on the board.
Can be used where speed is of high importance (e.g. MC playouts). They detect only the subset of the ladders detected in GoLadder, in which the ladder path is free of stones.
bool GoStaticLadder::IsEdgeLadder | ( | const GoBoard & | bd, | |
SgPoint | target, | |||
SgBlackWhite | toPlay | |||
) |
Return true, if block can be captured in a ladder running along the edge.
Definition at line 15 of file GoStaticLadder.cpp.
References SgPointUtil::Col(), GoBoard::GetColor(), GoBoard::IsEmpty(), GoBoard::Line(), GoBoard::NumEmptyNeighbors(), GoBoard::NumLiberties(), GoBoard::NumNeighbors(), SG_ASSERT, SG_NS, SG_NULLMOVE, SG_WE, GoBoard::Size(), and GoBoard::TheLiberty().
Referenced by IsLadder().
bool GoStaticLadder::IsLadder | ( | const GoBoard & | bd, | |
SgPoint | target, | |||
SgBlackWhite | toPlay | |||
) |
Return true, if block can be captured in a ladder.
Definition at line 103 of file GoStaticLadder.cpp.
References IsEdgeLadder().
Referenced by GoGtpExtraCommands::CmdStaticLadder().