Module ImportFrom alias Assign NameStore Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore NameLoad Assign NameStore Num FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If CompareGt AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad BinOpDiv Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr orelse Assert Call NameLoad NameLoad NameLoad Assert Call NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr UnaryOpUSub AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Call NameLoad BinOpMult AttributeLoad NameLoad attr BinOpSub Num AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpDiv Num BinOpAdd BinOpMult Num AttributeLoad NameLoad attr Num Assign NameStore NameLoad If CompareGt AttributeLoad NameLoad attr Num body If CompareGtE BinOpMod NameLoad AttributeLoad NameLoad attr NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index BinOpMod BinOpSub NameLoad NameLoad AttributeLoad NameLoad attr orelse If CompareLt NameLoad AttributeLoad NameLoad attr body If CompareEq NameLoad Num body AugAssignMult NameStore NameLoad orelse Continue Assign NameStore Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore BinOpMult NameLoad NameLoad AugAssignAdd NameStore NameLoad If BoolOpOr CompareEq AttributeLoad NameLoad attr Num BoolOpAnd CompareEq BinOpMod NameLoad AttributeLoad NameLoad attr Num CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr Return BinOpDiv NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr Num body Assign AttributeStore NameLoad attr Num orelse AugAssignMult AttributeStore NameLoad attr Num If CompareGt AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad orelse If CompareEq Call AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return NameLoad orelse If Call NameLoad AttributeLoad NameLoad attr Str body Assign NameStore BinOpDiv AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Num Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Return NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad If CompareLt AttributeLoad NameLoad attr Num body Return NameLoad For NameStore Call NameLoad Num BinOpFloorDiv BinOpAdd AttributeLoad NameLoad attr Num Num body For NameStore Call NameLoad NameLoad BinOpFloorDiv BinOpAdd AttributeLoad NameLoad attr Num Num body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareNotEq NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad AugAssignAdd AttributeStore AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr If AttributeLoad NameLoad attr body Expr Call NameLoad TupleLoad Str NameLoad Str AttributeLoad NameLoad attr Str NameLoad Str NameLoad Str Assign NameStore BinOpSub Num BinOpDiv BinOpMult AttributeLoad NameLoad attr BinOpSub NameLoad AttributeLoad NameLoad attr BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body Return NameLoad orelse Return UnaryOpUSub NameLoad decorator_list decorator_list If CompareEq NameLoad Str body Assert CompareEq Call AttributeLoad Call NameLoad Num attr ListLoad TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num Assert CompareEq Call AttributeLoad Call NameLoad Num attr ListLoad TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num Assign NameStore Call NameLoad keyword Num Assign NameStore Call NameLoad keyword Num Assign NameStore Call NameLoad Num keyword Num keyword NameLoad keyword Num Expr Call NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Num Expr Call NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad
N/A __future__ print_function N/A __author__ Tom Schaul, tom@idsia.ch capturetask CaptureGameTask pybrain.rl.environments.twoplayergames.capturegameplayers ModuleDecidingPlayer pybrain.rl.environments.twoplayergames CaptureGame pybrain.rl.environments.twoplayergames.capturegameplayers.captureplayer CapturePlayer pybrain.structure.networks.custom.capturegame CaptureGameNetwork RelativeCaptureTask N/A CaptureGameTask N/A N/A  returns the (anti-symmetric) relative score of p1 with respect to p2.
    (p1 and p2 are CaptureGameNetworks)
    The score depends on:
    - greedy play
    - play with fixed starting positions (only first stone)
    - moves-until-win or moves-until-defeat (winning faster is better)
    - play with noisy moves (e.g. adjusting softmax temperature)

     N/A useNetworks False N/A maxGames 3 N/A presetGamesProportion 0.5 N/A minTemperature 0 N/A maxTemperature 0.2 N/A verbose False N/A numMovesCoeff 0.5 __init__ N/A N/A self size N/A args N/A N/A N/A N/A self setArgs args N/A N/A self size size N/A N/A self task N/A CaptureGameTask N/A self size N/A N/A self env N/A N/A self task env N/A N/A N/A self presetGamesProportion 0 N/A N/A N/A self sPos N/A N/A self _fixedStartingPos N/A N/A self cases N/A int N/A N/A len N/A self sPos N/A self presetGamesProportion N/A N/A N/A self cases 1 N/A N/A self maxmoves N/A N/A self size N/A self size N/A N/A self minmoves 3 N/A __call__ N/A N/A self p1 p2 N/A N/A N/A N/A self temp N/A self minTemperature N/A N/A self useNetworks N/A N/A p1 N/A ModuleDecidingPlayer p1 N/A N/A self task env temperature N/A self temp N/A p2 N/A ModuleDecidingPlayer p2 N/A N/A self task env temperature N/A self temp N/A N/A N/A isinstance p1 CapturePlayer N/A N/A isinstance p2 CapturePlayer N/A N/A p1 game N/A N/A self task env N/A N/A p2 game N/A N/A self task env N/A N/A p1 color N/A CaptureGame BLACK N/A N/A p2 color N/A N/A p1 color N/A N/A self player p1 N/A N/A self opponent p2 N/A coeffSum 0.0 N/A score 0.0 N/A np N/A int N/A N/A self cases N/A 1 N/A self presetGamesProportion N/A i N/A range N/A self maxGames N/A N/A coeff N/A 1 N/A N/A 10 N/A self temp 1 N/A preset None N/A N/A N/A self cases 1 N/A N/A N/A N/A i N/A self cases np N/A N/A preset N/A N/A self sPos N/A N/A N/A i np N/A self cases N/A N/A N/A i N/A self cases N/A N/A N/A i 0 N/A N/A coeff np N/A N/A N/A res N/A N/A self _oneGame preset N/A score N/A coeff res N/A coeffSum coeff N/A N/A N/A N/A self cases 1 N/A N/A N/A i N/A self cases 0 N/A i 0 N/A N/A N/A N/A self _globalWarming N/A N/A score coeffSum N/A _globalWarming N/A N/A self N/A N/A N/A  increase temperature  N/A N/A N/A self temp 0 N/A N/A N/A self temp 0.02 N/A N/A N/A self temp 1.5 N/A N/A N/A self temp N/A self maxTemperature N/A N/A False N/A N/A N/A N/A N/A self _setTemperature False N/A N/A N/A self temp N/A self minTemperature N/A False N/A True N/A _setTemperature N/A N/A self N/A N/A N/A N/A self useNetworks N/A N/A N/A N/A self opponent temperature N/A self temp N/A N/A N/A self player temperature N/A self temp N/A True N/A N/A N/A hasattr N/A self opponent randomPartMoves N/A N/A randPart N/A N/A self temp N/A N/A self temp 1 N/A N/A N/A self opponent randomPartMoves randPart N/A N/A N/A self player randomPartMoves randPart N/A True N/A N/A False N/A _fixedStartingPos N/A N/A self N/A N/A N/A  a list of starting positions, not along the border, and respecting symmetry.  N/A res N/A N/A N/A N/A self size 3 N/A N/A res N/A x N/A range 1 N/A N/A N/A self size 1 2 N/A N/A y N/A range x N/A N/A N/A self size 1 2 N/A N/A N/A N/A res append N/A x y N/A res N/A _oneGame N/A N/A self preset N/A None N/A N/A  a single black stone can be set as the first move.  N/A N/A N/A N/A self env reset N/A N/A preset None N/A N/A N/A N/A N/A self env _setStone N/A CaptureGame BLACK preset N/A N/A N/A self env movesDone 1 N/A N/A N/A N/A self env playToTheEnd N/A self opponent N/A self player N/A N/A N/A N/A N/A self env playToTheEnd N/A self player N/A self opponent N/A moves N/A N/A self env movesDone N/A win N/A N/A N/A self env winner N/A N/A self player color N/A N/A self verbose N/A N/A N/A print N/A Preset: preset T: N/A self temp Win: win after moves moves. N/A res N/A 1 N/A N/A N/A self numMovesCoeff N/A moves N/A self minmoves N/A N/A self maxmoves N/A self minmoves N/A win N/A N/A res N/A N/A N/A res N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A N/A N/A RelativeCaptureTask 5 _fixedStartingPos N/A N/A 1 1 N/A 1 2 N/A 2 2 N/A N/A N/A N/A N/A RelativeCaptureTask 8 _fixedStartingPos N/A N/A 1 1 N/A 1 2 N/A 1 3 N/A 2 2 N/A 2 3 N/A 3 3 N/A net1 N/A CaptureGameNetwork hsize 1 N/A net2 N/A CaptureGameNetwork hsize 1 N/A r N/A RelativeCaptureTask 5 maxGames 40 useNetworks True presetGamesProportion 0.5 N/A N/A print N/A r net1 net2 N/A N/A print N/A r net2 net1 N/A N/A r maxGames 200 N/A N/A print N/A r net1 net2 N/A N/A print N/A r net2 net1