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 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 Assign AttributeStore NameLoad attr BinOpMult SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num 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 For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpDiv Num BinOpAdd BinOpMult Num AttributeLoad NameLoad attr Num AugAssignAdd NameStore BinOpMult NameLoad Call AttributeLoad NameLoad attr AugAssignAdd NameStore NameLoad If 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 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 Assign NameStore Call NameLoad keyword Num Assign NameStore Call NameLoad keyword Num Assign NameStore Call NameLoad Num keyword Num keyword NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Expr Call NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad Call NameLoad NameLoad NameLoad Expr Call NameLoad AttributeLoad NameLoad attr
N/A __future__ print_function N/A __author__ Tom Schaul, tom@idsia.ch gomokutask GomokuTask pybrain.rl.environments.twoplayergames.gomokuplayers ModuleDecidingPlayer pybrain.rl.environments.twoplayergames GomokuGame pybrain.rl.environments.twoplayergames.gomokuplayers.gomokuplayer GomokuPlayer pybrain.structure.networks.custom.capturegame CaptureGameNetwork RelativeGomokuTask N/A GomokuTask 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
    - 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 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 GomokuTask N/A self size N/A N/A self env N/A N/A self task env N/A N/A self maxmoves N/A N/A N/A N/A self env size N/A 0 N/A N/A N/A self env size N/A 1 N/A N/A self minmoves 9 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 GomokuPlayer N/A N/A isinstance p2 GomokuPlayer 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 GomokuGame 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 res 0.0 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 res N/A coeff N/A N/A self _oneGame N/A coeffSum coeff N/A N/A i 0 N/A N/A N/A N/A self _globalWarming N/A N/A res 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.2 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 _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 GomokuGame 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 net1 N/A CaptureGameNetwork hsize 1 N/A net2 N/A CaptureGameNetwork hsize 1 N/A r N/A RelativeGomokuTask 7 maxGames 10 useNetworks True N/A N/A print N/A r net1 net2 N/A N/A print N/A r net2 net1 N/A N/A print N/A r env N/A N/A r maxGames 50 N/A N/A print N/A r net1 net2 N/A N/A print N/A r net2 net1 N/A N/A print N/A r env