alpaca/alpacka/agents/stochastic_mcts.py
def _backpropagate(self, value, path):
        """Backpropagates value to the root through path.

        Only modifies the rewards and values of nodes on the path.

        Args:
            value (float or None): Value collected at the leaf, or None if value
                should not be backpropagated.
            path (list): List of (reward, node) pairs, describing a path from
                the root to a leaf.
        """
        for (reward, node) in reversed(path):
            node.visit(reward, value)
            if value is not None:
                value = reward + self._discount * value
Backpropagates value to the root through path.

        Only modifies the rewards and values of nodes on the path.

        Args:
            value (float or None): Value collected at the leaf, or None if value
                should not be backpropagated.
            path (list): List of (reward, node) pairs, describing a path from
                the root to a leaf.
        
Backpropagates value to the root through path.
Only modifies the rewards and values of nodes on the path.
Backpropagates value to the root through path . Only modifies the rewards and values of nodes on the path .
def _backpropagate(self, value, path):
        for (reward, node) in reversed(path):
            node.visit(reward, value)
            if value is not None:
                value = reward + self._discount * value
def _backpropagate ( self , value , path ) : for ( reward , node ) in reversed ( path ) : node . visit ( reward , value ) if value is not None : value = reward + self . _discount * value
Backpropagates value to the root through path.
Backpropagates value to the root through path .
"""Backpropagates value to the root through path.

        Only modifies the rewards and values of nodes on the path.

        Args:
            value (float or None): Value collected at the leaf, or None if value
                should not be backpropagated.
            path (list): List of (reward, node) pairs, describing a path from
                the root to a leaf.
        """
self
value
Value collected at the leaf, or None if value
should not be backpropagated.
Value collected at the leaf or None if value should not be backpropagated .
path
List of (reward, node) pairs, describing a path from
the root to a leaf.
List of ( reward node ) pairs describing a path from the root to a leaf .