Module Import alias identifier Assign NameStore Num Assign NameStore UnaryOpUAdd Num Assign NameStore Num Assign NameStore NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults Num Num body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr ListComp ListComp Call NameLoad comprehension NameStore Call NameLoad NameLoad comprehension NameStore Call NameLoad NameLoad For NameStore Call NameLoad NameLoad body For NameStore Call NameLoad NameLoad body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Call NameLoad Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign AttributeStore NameLoad attr ListComp ListComp Call NameLoad comprehension NameStore Call NameLoad NameLoad comprehension NameStore Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameLoad Return SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body If CompareNotEq SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad NameLoad body Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad If UnaryOpNot Call NameLoad GeneratorExp CompareIn NameLoad NameLoad comprehension NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameLoad Return BoolOpAnd CompareGtE NameLoad Num CompareGtE NameLoad Num CompareLt NameLoad AttributeLoad NameLoad attr CompareLt NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameLoad Return Call NameLoad AttributeLoad NameLoad attr ListLoad TupleLoad BinOpSub NameLoad Num NameLoad TupleLoad BinOpAdd NameLoad Num NameLoad TupleLoad NameLoad BinOpSub NameLoad Num TupleLoad NameLoad BinOpAdd NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameLoad Return Call NameLoad AttributeLoad NameLoad attr ListLoad TupleLoad BinOpSub NameLoad Num BinOpSub NameLoad Num TupleLoad BinOpAdd NameLoad Num BinOpAdd NameLoad Num TupleLoad BinOpAdd NameLoad Num BinOpSub NameLoad Num TupleLoad BinOpSub NameLoad Num BinOpAdd NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body AugAssignSub SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Call NameLoad ListLoad NameLoad If CompareEq SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad UnaryOpUSub AttributeLoad NameLoad attr body Assign NameStore Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad For TupleStore NameStore NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad NameLoad orelse If CompareEq SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad body AugAssignBitOr NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad AugAssignBitOr NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad For TupleStore NameStore NameStore NameLoad body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad NameLoad Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad NameLoad Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For TupleStore NameStore NameStore NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad NameLoad For TupleStore NameStore NameStore NameLoad body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Call NameLoad Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Call NameLoad Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Num For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad body If CompareEq SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad attr TupleLoad NameLoad NameLoad AugAssignAdd SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Num orelse Expr Call AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad attr TupleLoad NameLoad NameLoad AugAssignAdd SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameLoad Assign NameStore Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad If CompareEq NameLoad Num body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body Assign NameStore CompareEq SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore CompareGt Call NameLoad BinOpSub SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Call NameLoad ListLoad NameLoad Num If BoolOpAnd NameLoad NameLoad body Return NameLoad Assign NameStore CompareEq SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad UnaryOpUSub AttributeLoad NameLoad attr If BoolOpAnd NameLoad UnaryOpNot NameLoad body Return NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Return NameLoad Assign TupleStore NameStore NameStore NameLoad Assign NameStore CompareEq SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore CompareEq NameLoad AttributeLoad NameLoad attr Return BoolOpAnd Call AttributeLoad NameLoad attr NameLoad UnaryOpNot NameLoad UnaryOpNot NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore NameLoad If CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad NameLoad body Return NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body If CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults ListLoad body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad NameLoad body Return NameLoad Assign NameStore Num Assign NameStore IfExp CompareEq Call NameLoad Call AttributeLoad NameLoad attr NameLoad Num Num Num For NameStore Call AttributeLoad NameLoad attr NameLoad body If CompareEq SubscriptLoad AttributeLoad NameLoad attr Index NameLoad UnaryOpUSub NameLoad body AugAssignAdd NameStore Num orelse If BoolOpAnd CompareEq SubscriptLoad AttributeLoad NameLoad attr Index NameLoad NameLoad CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr If CompareGt NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign NameStore ListLoad For NameStore Call NameLoad AttributeLoad NameLoad attr body For NameStore Call NameLoad AttributeLoad NameLoad attr body If BoolOpAnd Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad BoolOpOr NameLoad UnaryOpNot Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body If Call AttributeLoad NameLoad attr NameLoad NameLoad body AugAssignAdd NameStore Num orelse If Call AttributeLoad NameLoad attr NameLoad NameLoad body AugAssignAdd NameStore Num AugAssignAdd NameStore AttributeLoad NameLoad attr AugAssignSub NameStore AttributeLoad NameLoad attr AugAssignSub NameStore AttributeLoad NameLoad attr If CompareGt NameLoad NameLoad body Assign NameStore NameLoad orelse If CompareGt NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign TupleStore NameStore NameStore NameLoad Assign SubscriptStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body If BoolOpAnd CompareEq SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad UnaryOpUSub NameLoad CompareEq Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Num body Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad NameLoad body AugAssignAdd AttributeStore NameLoad attr NameLoad orelse AugAssignAdd AttributeStore NameLoad attr NameLoad If CompareEq NameLoad Num body Assign NameStore CompareEq Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Num Assign NameStore CompareEq Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Num If BoolOpAnd NameLoad NameLoad body Assign AttributeStore NameLoad attr TupleLoad NameLoad NameLoad orelse If CompareEq NameLoad NameLoad body AugAssignAdd AttributeStore NameLoad attr Num If CompareEq NameLoad NameLoad body AugAssignAdd AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr UnaryOpUSub NameLoad AugAssignAdd AttributeStore NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Raise Call NameLoad Call NameLoad NameLoad If CompareGt Call NameLoad AttributeLoad NameLoad attr Num body If BoolOpAnd CompareIs SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad CompareIs SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad CompareEq AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Pass decorator_list
N/A N/A numpy np N/A WHITE -1 N/A BLACK N/A 1 N/A EMPTY 0 N/A PASS_MOVE None GameState N/A object N/A N/A State of a game of Go and some basic functions to interact with it
	 __init__ N/A N/A self size komi N/A 19 7.5 N/A N/A N/A self board N/A N/A np zeros N/A size size N/A N/A N/A N/A self board fill EMPTY N/A N/A self size size N/A N/A self turns_played 0 N/A N/A self current_player BLACK N/A N/A self ko None N/A N/A self komi komi N/A N/A self history N/A N/A N/A self is_end_of_game False N/A N/A self num_black_prisoners 0 N/A N/A self num_white_prisoners 0 N/A N/A self komi komi N/A N/A self passes_white 0 N/A N/A self passes_black 0 N/A N/A self liberty_sets N/A N/A N/A set N/A _ N/A range size N/A _ N/A range size N/A x N/A range size N/A N/A y N/A range size N/A N/A N/A N/A N/A self liberty_sets N/A x N/A y N/A set N/A N/A self _neighbors N/A x y N/A N/A self liberty_counts N/A N/A np zeros N/A size size dtype N/A np int N/A N/A N/A N/A self liberty_counts fill -1 N/A N/A self group_sets N/A N/A N/A set N/A _ N/A range size N/A _ N/A range size N/A get_group N/A N/A self position N/A N/A N/A Get the group of connected same-color stones to the given position

		Keyword arguments:
		position -- a tuple of (x, y)
		x being the column index of the starting position of the search
		y being the row index of the starting position of the search

		Return:
		a set of tuples consist of (x, y)s which are the same-color cluster
		which contains the input single position. len(group) is size of the cluster, can be large.
		 N/A N/A x y position N/A N/A N/A N/A self group_sets N/A x N/A y N/A get_groups_around N/A N/A self position N/A N/A N/A returns a list of the unique groups adjacent to position

		'unique' means that, for example in this position:

			. . . . .
			. B W . .
			. W W . .
			. . . . .
			. . . . .

		only the one white group would be returned on get_groups_around((1,1))
		 N/A groups N/A N/A N/A nx ny N/A N/A self _neighbors position N/A N/A N/A N/A N/A N/A self board N/A nx N/A ny EMPTY N/A N/A group N/A N/A N/A self group_sets N/A nx N/A ny N/A group_member N/A next N/A iter group N/A N/A N/A any N/A N/A group_member g N/A g groups N/A N/A N/A N/A groups append group N/A groups N/A _on_board N/A N/A self position N/A N/A N/A simply return True iff position is within the bounds of [0, self.size)
		 N/A N/A x y position N/A N/A N/A x 0 N/A y 0 N/A x N/A self size N/A y N/A self size N/A _neighbors N/A N/A self position N/A N/A N/A A private helper function that simply returns a list of positions neighboring
		the given (x,y) position. Basically it handles edges and corners.
		 N/A N/A x y position N/A N/A filter N/A self _on_board N/A N/A N/A x 1 y N/A N/A x 1 y N/A x N/A y 1 N/A x N/A y 1 N/A _diagonals N/A N/A self position N/A N/A N/A Like _neighbors but for diagonal positions
		 N/A N/A x y position N/A N/A filter N/A self _on_board N/A N/A N/A x 1 N/A y 1 N/A N/A x 1 N/A y 1 N/A N/A x 1 N/A y 1 N/A N/A x 1 N/A y 1 N/A _update_neighbors N/A N/A self position N/A N/A N/A A private helper function to update self.group_sets and self.liberty_sets
		given that a stone was just played at `position`
		 N/A N/A x y position N/A merged_group N/A set N/A N/A N/A merged_group add position N/A merged_libs N/A N/A N/A self liberty_sets N/A x N/A y N/A N/A nx ny N/A N/A self _neighbors position N/A N/A N/A N/A N/A self liberty_sets N/A nx N/A ny N/A set N/A position N/A N/A N/A N/A N/A self board N/A nx N/A ny N/A N/A self current_player N/A N/A new_liberty_count N/A len N/A N/A N/A self liberty_sets N/A nx N/A ny N/A N/A gx gy N/A N/A N/A self group_sets N/A nx N/A ny N/A N/A N/A N/A N/A self liberty_counts N/A gx N/A gy new_liberty_count N/A N/A N/A N/A N/A N/A self board N/A x N/A y N/A N/A N/A self board N/A nx N/A ny N/A N/A merged_group N/A N/A N/A self group_sets N/A nx N/A ny N/A merged_libs N/A N/A N/A self liberty_sets N/A nx N/A ny N/A count_merged_libs N/A len merged_libs N/A N/A gx gy merged_group N/A N/A N/A N/A N/A self group_sets N/A gx N/A gy merged_group N/A N/A N/A N/A self liberty_sets N/A gx N/A gy merged_libs N/A N/A N/A N/A self liberty_counts N/A gx N/A gy count_merged_libs N/A _remove_group N/A N/A self group N/A N/A N/A A private helper function to take a group off the board (due to capture),
		updating group sets and liberties along the way
		 N/A N/A x y group N/A N/A N/A N/A self board N/A N/A x y EMPTY N/A N/A x y group N/A N/A N/A N/A N/A self group_sets N/A x N/A y N/A set N/A N/A N/A N/A self liberty_sets N/A x N/A y N/A set N/A N/A N/A N/A self liberty_counts N/A x N/A y 0 N/A N/A nx ny N/A N/A self _neighbors N/A x y N/A N/A N/A N/A N/A self board N/A N/A nx ny EMPTY N/A N/A N/A N/A N/A N/A N/A self liberty_sets N/A x N/A y add N/A nx ny N/A N/A N/A N/A self liberty_counts N/A x N/A y 1 N/A N/A N/A N/A N/A N/A N/A self liberty_sets N/A nx N/A ny add N/A x y N/A N/A N/A N/A self liberty_counts N/A nx N/A ny 1 N/A copy N/A N/A self N/A N/A N/A get a copy of this Game state
		 N/A other N/A GameState N/A self size N/A N/A other board N/A N/A N/A self board copy N/A N/A other turns_played N/A self turns_played N/A N/A other current_player N/A self current_player N/A N/A other ko N/A self ko N/A N/A other history N/A self history N/A N/A other num_black_prisoners N/A self num_black_prisoners N/A N/A other num_white_prisoners N/A self num_white_prisoners N/A x N/A range N/A self size N/A N/A y N/A range N/A self size N/A N/A N/A N/A N/A other group_sets N/A x N/A y N/A set N/A N/A N/A self group_sets N/A x N/A y N/A N/A N/A N/A other liberty_sets N/A x N/A y N/A set N/A N/A N/A self liberty_sets N/A x N/A y N/A N/A other liberty_counts N/A N/A N/A self liberty_counts copy N/A other N/A is_suicide N/A N/A self action N/A N/A N/A return true if having current_player play at <action> would be suicide
		 N/A N/A x y action N/A num_liberties_here N/A len N/A N/A N/A self liberty_sets N/A x N/A y N/A N/A num_liberties_here 0 N/A N/A N/A nx ny N/A N/A self _neighbors action N/A N/A is_friendly_group N/A N/A N/A self board N/A N/A nx ny N/A self current_player N/A group_has_other_liberties N/A N/A len N/A N/A N/A N/A self liberty_sets N/A nx N/A ny N/A set N/A action 0 N/A N/A is_friendly_group group_has_other_liberties N/A N/A False N/A is_enemy_group N/A N/A N/A self board N/A N/A nx ny N/A N/A self current_player N/A N/A is_enemy_group N/A group_has_other_liberties N/A N/A False N/A True N/A False N/A is_legal N/A N/A self action N/A N/A N/A determine if the given action (x,y tuple) is a legal move

		note: we only check ko, not superko at this point (TODO?)
		 N/A N/A action PASS_MOVE N/A N/A True N/A N/A x y action N/A empty N/A N/A N/A N/A self board N/A x N/A y EMPTY N/A suicide N/A N/A self is_suicide action N/A ko N/A action N/A self ko N/A N/A N/A N/A self _on_board action N/A suicide N/A ko empty N/A is_eyeish N/A N/A self position owner N/A N/A N/A returns whether the position is empty and is surrounded by all stones of 'owner'
		 N/A N/A x y position N/A N/A N/A N/A self board N/A N/A x y EMPTY N/A N/A False N/A N/A nx ny N/A N/A self _neighbors position N/A N/A N/A N/A N/A self board N/A N/A nx ny owner N/A N/A False N/A True N/A is_eye N/A N/A self position owner stack N/A N/A N/A N/A returns whether the position is a true eye of 'owner'

		Requires a recursive call; empty spaces diagonal to 'position' are fine
		as long as they themselves are eyes
		 N/A N/A N/A N/A self is_eyeish position owner N/A N/A False N/A num_bad_diagonal 0 N/A allowable_bad_diagonal N/A N/A N/A len N/A N/A self _neighbors position 4 1 0 N/A d N/A N/A self _diagonals position N/A N/A N/A N/A N/A self board N/A d N/A owner N/A N/A num_bad_diagonal 1 N/A N/A N/A N/A N/A N/A self board N/A d EMPTY N/A d stack N/A N/A N/A N/A stack append position N/A N/A N/A N/A self is_eye d owner stack N/A N/A num_bad_diagonal 1 N/A N/A N/A stack pop N/A N/A num_bad_diagonal allowable_bad_diagonal N/A N/A False N/A True N/A get_legal_moves N/A N/A self include_eyes N/A True N/A N/A moves N/A N/A x N/A range N/A self size N/A N/A y N/A range N/A self size N/A N/A N/A N/A N/A self is_legal N/A x y N/A include_eyes N/A N/A N/A self is_eye N/A x y N/A self current_player N/A N/A N/A N/A moves append N/A x y N/A moves N/A get_winner N/A N/A self N/A N/A N/A Calculate score of board state and return player ID (1, -1, or 0 for tie)
		corresponding to winner. Uses 'Area scoring'.
		 N/A score_white N/A N/A np sum N/A N/A self board WHITE N/A score_black N/A N/A np sum N/A N/A self board BLACK N/A empties N/A zip N/A N/A np where N/A N/A self board EMPTY N/A empty empties N/A N/A N/A N/A self is_eyeish empty BLACK N/A N/A score_black 1 N/A N/A N/A N/A self is_eyeish empty WHITE N/A N/A score_white 1 N/A score_white N/A self komi N/A score_white N/A self passes_white N/A score_black N/A self passes_black N/A N/A score_black score_white N/A N/A winner BLACK N/A N/A N/A score_white score_black N/A N/A winner WHITE N/A N/A winner 0 N/A winner N/A do_move N/A N/A self action color N/A None N/A N/A Play stone at action=(x,y). If color is not specified, current_player is used

		If it is a legal move, current_player switches to the opposite color
		If not, an IllegalMove exception is raised
		 N/A color N/A color N/A self current_player N/A N/A N/A self is_legal action N/A N/A N/A self ko None N/A N/A action PASS_MOVE N/A N/A N/A x y action N/A N/A N/A N/A self board N/A x N/A y color N/A N/A N/A self _update_neighbors action N/A N/A nx ny N/A N/A self _neighbors action N/A N/A N/A N/A N/A N/A self board N/A N/A nx ny N/A color N/A N/A len N/A N/A N/A self liberty_sets N/A nx N/A ny 0 N/A N/A captured_group N/A N/A N/A self group_sets N/A nx N/A ny N/A num_captured N/A len captured_group N/A N/A N/A self _remove_group captured_group N/A N/A color BLACK N/A N/A N/A self num_white_prisoners num_captured N/A N/A N/A self num_black_prisoners num_captured N/A N/A num_captured 1 N/A N/A would_recapture N/A N/A len N/A N/A N/A self liberty_sets N/A x N/A y 1 N/A recapture_size_is_1 N/A N/A len N/A N/A N/A self group_sets N/A x N/A y 1 N/A N/A would_recapture recapture_size_is_1 N/A N/A N/A self ko N/A nx ny N/A N/A N/A color BLACK N/A N/A N/A self passes_black 1 N/A N/A color WHITE N/A N/A N/A self passes_white 1 N/A N/A self current_player N/A color N/A N/A self turns_played 1 N/A N/A N/A N/A self history append action N/A N/A N/A IllegalMove N/A str action N/A N/A N/A len N/A self history 1 N/A N/A N/A N/A N/A N/A self history N/A -1 None N/A N/A N/A self history N/A -2 None N/A N/A self current_player WHITE N/A N/A N/A self is_end_of_game True N/A N/A self is_end_of_game N/A N/A IllegalMove N/A Exception N/A N/A N/A