Module Import alias identifier Import alias identifier FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad ExtSlice Index Num Slice Slice CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad ExtSlice Index Num Slice Slice CompareEq AttributeLoad NameLoad attr UnaryOpUSub AttributeLoad NameLoad attr Assign SubscriptStore NameLoad ExtSlice Index Num Slice Slice CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Num For NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num body If CompareIsNot NameLoad AttributeLoad NameLoad attr body If CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index NameLoad AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameLoad If CompareEq Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index NameLoad Index NameLoad Num body Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad NameLoad Num If CompareLt NameLoad BinOpSub NameLoad Num body AugAssignAdd NameStore Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body Assign SubscriptStore NameLoad Index TupleLoad NameLoad CompareEq AttributeLoad NameLoad attr BinOpAdd NameLoad Num Num Assign SubscriptStore NameLoad Index TupleLoad BinOpSub NameLoad Num CompareGtE AttributeLoad NameLoad attr NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Num For NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad If BoolOpAnd CompareEq SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Num CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr body AugAssignAdd NameStore Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Assign SubscriptStore NameLoad Index TupleLoad Call NameLoad NameLoad BinOpSub NameLoad Num NameLoad NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad If CompareEq SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr body AugAssignBitOr NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad AugAssignBitOr NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad If CompareIn TupleLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad If CompareEq Call NameLoad NameLoad Num body Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index TupleLoad Call NameLoad BinOpSub NameLoad Num BinOpSub NameLoad Num NameLoad NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad For NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad If CompareEq SubscriptLoad AttributeLoad NameLoad attr Index TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr body AugAssignBitOr NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index NameLoad If CompareIn TupleLoad NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index TupleLoad Call NameLoad BinOpSub NameLoad Num BinOpSub Call NameLoad NameLoad Num NameLoad NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr keyword NameLoad body Assign SubscriptStore NameLoad Index TupleLoad Num NameLoad NameLoad Num Return NameLoad decorator_list Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Dict Str Str Num NameLoad Dict Str Str Num Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr TupleLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr Dict Str Str Num NameLoad Dict Str Str Num NameLoad Dict Str Str Num NameLoad Dict Str Str Num NameLoad Dict Str Str Num NameLoad Dict Str Str Num NameLoad Dict Str Str Num NameLoad Dict Str Str Num NameLoad Dict Str Str Num Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr TupleLoad Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpMult ListLoad NameLoad Call NameLoad NameLoad For NameStore Call NameLoad Call NameLoad NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr If CompareIn NameLoad NameLoad body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str AugAssignAdd AttributeStore NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str orelse Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr TupleLoad Num NameLoad NameLoad NameLoad decorator_list decorator_list
N/A N/A numpy np N/A AlphaGo.go go get_board N/A N/A state N/A N/A N/A A feature encoding WHITE BLACK and EMPTY on separate planes, but plane 0
	always refers to the current player and plane 1 to the opponent
	 N/A planes N/A N/A np zeros N/A 3 N/A state size N/A state size N/A N/A planes N/A N/A 0 N/A N/A N/A N/A state board N/A state current_player N/A N/A planes N/A N/A 1 N/A N/A N/A N/A state board N/A N/A state current_player N/A N/A planes N/A N/A 2 N/A N/A N/A N/A state board N/A go EMPTY N/A planes N/A get_turns_since N/A N/A state maximum N/A 8 N/A N/A A feature encoding the age of the stone at each location up to 'maximum'

	Note:
	- the [maximum-1] plane is used for any stone with age greater than or equal to maximum
	- EMPTY locations are all-zero features
	 N/A planes N/A N/A np zeros N/A maximum N/A state size N/A state size N/A depth 0 N/A move N/A N/A state history N/A -1 N/A N/A N/A move N/A go PASS_MOVE N/A N/A N/A N/A N/A state board N/A move N/A go EMPTY N/A N/A N/A x y move N/A N/A N/A N/A np sum N/A planes N/A N/A N/A x N/A y 0 N/A N/A N/A planes N/A N/A depth x y 1 N/A N/A depth N/A maximum 1 N/A N/A depth 1 N/A planes N/A get_liberties N/A N/A state maximum N/A 8 N/A N/A A feature encoding the number of liberties of the group connected to the stone at
	each location

	Note:
	- there is no zero-liberties plane; the 0th plane indicates groups in atari
	- the [maximum-1] plane is used for any stone with liberties greater than or equal to maximum
	- EMPTY locations are all-zero features
	 N/A planes N/A N/A np zeros N/A maximum N/A state size N/A state size N/A i N/A range maximum N/A N/A N/A planes N/A N/A i N/A N/A state liberty_counts N/A i 1 1 N/A N/A planes N/A N/A N/A maximum 1 N/A N/A state liberty_counts maximum 1 N/A planes N/A get_capture_size N/A N/A state maximum N/A 8 N/A N/A A feature encoding the number of opponent stones that would be captured by planing at each location,
	up to 'maximum'

	Note:
	- we currently *do* treat the 0th plane as "capturing zero stones"
	- the [maximum-1] plane is used for any capturable group of size greater than or equal to maximum-1
	- the 0th plane is used for legal moves that would not result in capture
	- illegal move locations are all-zero features
	 N/A planes N/A N/A np zeros N/A maximum N/A state size N/A state size N/A N/A x y N/A N/A state get_legal_moves N/A N/A n_captured 0 N/A neighbor_group N/A N/A state get_groups_around N/A x y N/A N/A N/A gx gy N/A next N/A iter neighbor_group N/A N/A N/A N/A N/A N/A state liberty_counts N/A gx N/A gy 1 N/A N/A N/A state board N/A N/A gx gy N/A state current_player N/A N/A n_captured N/A len N/A N/A N/A state group_sets N/A gx N/A gy N/A N/A planes N/A N/A N/A min n_captured N/A maximum 1 x y 1 N/A planes N/A get_self_atari_size N/A N/A state maximum N/A 8 N/A N/A A feature encoding the size of the own-stone group that is put into atari by playing at a location
	 N/A planes N/A N/A np zeros N/A maximum N/A state size N/A state size N/A N/A x y N/A N/A state get_legal_moves N/A N/A lib_set_after N/A set N/A N/A N/A state liberty_sets N/A x N/A y N/A group_set_after N/A set N/A N/A N/A group_set_after add N/A x y N/A neighbor_group N/A N/A state get_groups_around N/A x y N/A N/A N/A gx gy N/A next N/A iter neighbor_group N/A N/A N/A N/A state board N/A N/A gx gy N/A state current_player N/A N/A lib_set_after N/A N/A N/A state liberty_sets N/A gx N/A gy N/A group_set_after N/A N/A N/A state group_sets N/A gx N/A gy N/A N/A N/A x y lib_set_after N/A N/A N/A N/A lib_set_after remove N/A x y N/A N/A N/A len lib_set_after 1 N/A N/A group_size N/A len group_set_after N/A N/A planes N/A N/A N/A min N/A group_size 1 N/A maximum 1 x y 1 N/A planes N/A get_liberties_after N/A N/A state maximum N/A 8 N/A N/A A feature encoding what the number of liberties *would be* of the group connected to
	the stone *if* played at a location

	Note:
	- there is no zero-liberties plane; the 0th plane indicates groups in atari
	- the [maximum-1] plane is used for any stone with liberties greater than or equal to maximum
	- illegal move locations are all-zero features
	 N/A planes N/A N/A np zeros N/A maximum N/A state size N/A state size N/A N/A x y N/A N/A state get_legal_moves N/A N/A lib_set_after N/A set N/A N/A N/A state liberty_sets N/A x N/A y N/A neighbor_group N/A N/A state get_groups_around N/A x y N/A N/A N/A gx gy N/A next N/A iter neighbor_group N/A N/A N/A N/A state board N/A N/A gx gy N/A state current_player N/A N/A lib_set_after N/A N/A N/A state liberty_sets N/A gx N/A gy N/A N/A N/A x y lib_set_after N/A N/A N/A N/A lib_set_after remove N/A x y N/A N/A planes N/A N/A N/A min N/A maximum 1 N/A N/A len lib_set_after 1 x y 1 N/A planes N/A get_ladder_capture N/A N/A state N/A N/A N/A N/A NotImplementedError N/A get_ladder_escape N/A N/A state N/A N/A N/A N/A NotImplementedError N/A get_sensibleness N/A N/A state N/A N/A N/A A move is 'sensible' if it is legal and if it does not fill the current_player's own eye
	 N/A feature N/A N/A np zeros N/A 1 N/A state size N/A state size N/A N/A x y N/A N/A state get_legal_moves include_eyes False N/A N/A N/A feature N/A N/A 0 x y 1 N/A feature N/A N/A FEATURES N/A board ones turns_since liberties capture_size self_atari_size liberties_after ladder_capture ladder_escape sensibleness zeros N/A size function 3 get_board N/A size function 1 N/A N/A N/A state N/A N/A N/A np ones N/A 1 N/A state size N/A state size N/A size function 8 get_turns_since N/A size function 8 get_liberties N/A size function 8 get_capture_size N/A size function 8 get_self_atari_size N/A size function 8 get_liberties_after N/A size function 1 get_ladder_capture N/A size function 1 get_ladder_escape N/A size function 1 get_sensibleness N/A size function 1 N/A N/A N/A state N/A N/A N/A np zeros N/A 1 N/A state size N/A state size N/A DEFAULT_FEATURES N/A board ones turns_since liberties capture_size self_atari_size liberties_after ladder_capture ladder_escape sensibleness zeros Preprocess N/A object N/A N/A a class to convert from AlphaGo GameState objects to tensors of one-hot
	features for NN inputs
	 __init__ N/A N/A self feature_list N/A DEFAULT_FEATURES N/A N/A create a preprocessor object that will concatenate together the
		given list of features
		 N/A N/A self output_dim 0 N/A N/A self feature_list feature_list N/A N/A self processors N/A N/A None N/A len feature_list N/A i N/A range N/A len feature_list N/A N/A feat N/A N/A N/A feature_list N/A i lower N/A N/A feat FEATURES N/A N/A N/A N/A self processors N/A i N/A N/A FEATURES N/A feat N/A function N/A N/A self output_dim N/A N/A FEATURES N/A feat N/A size N/A N/A N/A ValueError N/A uknown feature: %s feat N/A state_to_tensor N/A N/A self state N/A N/A N/A Convert a GameState to a Theano-compatible tensor
		 N/A feat_tensors N/A N/A proc state N/A proc N/A self processors N/A N/A f s N/A N/A self output_dim N/A state size N/A N/A N/A N/A N/A np concatenate feat_tensors reshape N/A 1 f s s N/A N/A