(self,
                 env_bldr,
                 stack_size,
                 stop_at_street,
                 put_out_new_round_after_limit=False,
                 is_debugging=False,
                 )
To start the tree from a given scenario, set ""env"" to that scenario and it will be treated
        as the root.
To start the tree from a given scenario, set ""env"" to that scenario and it will be treated
        as the root.
To start the tree from a given scenario set env to that scenario and it will be treated as the root .
def __init__(self,
                 env_bldr,
                 stack_size,
                 stop_at_street,
                 put_out_new_round_after_limit=False,
                 is_debugging=False,
                 ):
        """
        To start the tree from a given scenario, set ""env"" to that scenario and it will be treated
        as the root.
        """
        self._env_bldr = env_bldr
        self._is_debugging = is_debugging
        self._stack_size = stack_size

        # set up optional graphical tree export
        _dir_tree_vis = os.path.join("C:\\" if os.name == 'nt' else os.path.expanduser('~/'), "PokerRL_Viz")

        # This is just me being over-cautious to not overwrite someones files...
        _tree_vis_installed = os.path.isdir(_dir_tree_vis) \
                              and os.path.isfile(os.path.join(_dir_tree_vis, "ALLOWED_TO_WRITE_HERE.dontdelete"))

        if _tree_vis_installed:
            self.dir_tree_vis_data = os.path.join(_dir_tree_vis, "data")
            file_util.create_dir_if_not_exist(self.dir_tree_vis_data)
        else:
            self.dir_tree_vis_data = None

        # _________________________________ tree vars __________________________________
        self.root = None
        self._n_nodes = 0
        self._n_nonterm = 0

        self._env = self._env_bldr.get_new_env(is_evaluating=True, stack_size=stack_size)
        _ar = self._env.get_args()
        _ar.RETURN_PRE_TRANSITION_STATE_IN_INFO = True
        self._env.set_args(_ar)
        self._env.reset()

        self._n_seats = self._env_bldr.N_SEATS

        # _____________________ stops building tree at given round _____________________
        self._stop_at_street = max(self._env.ALL_ROUNDS_LIST) + 1 if stop_at_street is None else stop_at_street
        self._put_out_new_round_after_limit = put_out_new_round_after_limit

        self._value_filler = ValueFiller(tree=self)
        self._strategy_filler = StrategyFiller(tree=self, env_bldr=env_bldr)
def __init__ ( self , env_bldr , stack_size , stop_at_street , put_out_new_round_after_limit = False , is_debugging = False , ) : self . _env_bldr = env_bldr self . _is_debugging = is_debugging self . _stack_size = stack_size # set up optional graphical tree export _dir_tree_vis = os . path . join ( "C:\\" if os . name == 'nt' else os . path . expanduser ( '~/' ) , "PokerRL_Viz" ) # This is just me being over-cautious to not overwrite someones files... _tree_vis_installed = os . path . isdir ( _dir_tree_vis ) and os . path . isfile ( os . path . join ( _dir_tree_vis , "ALLOWED_TO_WRITE_HERE.dontdelete" ) ) if _tree_vis_installed : self . dir_tree_vis_data = os . path . join ( _dir_tree_vis , "data" ) file_util . create_dir_if_not_exist ( self . dir_tree_vis_data ) else : self . dir_tree_vis_data = None # _________________________________ tree vars __________________________________ self . root = None self . _n_nodes = 0 self . _n_nonterm = 0 self . _env = self . _env_bldr . get_new_env ( is_evaluating = True , stack_size = stack_size ) _ar = self . _env . get_args ( ) _ar . RETURN_PRE_TRANSITION_STATE_IN_INFO = True self . _env . set_args ( _ar ) self . _env . reset ( ) self . _n_seats = self . _env_bldr . N_SEATS # _____________________ stops building tree at given round _____________________ self . _stop_at_street = max ( self . _env . ALL_ROUNDS_LIST ) + 1 if stop_at_street is None else stop_at_street self . _put_out_new_round_after_limit = put_out_new_round_after_limit self . _value_filler = ValueFiller ( tree = self ) self . _strategy_filler = StrategyFiller ( tree = self , env_bldr = env_bldr )