Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/r/l/rlpy-HEAD/rlpy/Domains/InfiniteTrackCartPole.py   rlpy(Download)
        terminal = self.isTerminal()  # automatically uses self.state
        reward = self._getReward(a)  # Automatically uses self.state
        possibleActions = self.possibleActions()
        return reward, ns, terminal, possibleActions
 
                Qs = representation.Qs(s, terminal)
                # Array of all possible actions at state s
                As = self.possibleActions(s=s)
                # If multiple optimal actions, pick one randomly
                a = np.random.choice(As[Qs.max() == Qs])

src/r/l/rlpy-HEAD/rlpy/Domains/FiniteTrackCartPole.py   rlpy(Download)
        terminal = self.isTerminal()  # automatically uses self.state
        reward = self._getReward(a)  # Automatically uses self.state
        possibleActions = self.possibleActions()
        return reward, ns, terminal, possibleActions
 
                Qs = representation.Qs(s, terminal)
                # Array of all possible actions at state s
                As = self.possibleActions(s=s)
                # If multiple optimal actions, pick one randomly
                a = np.random.choice(As[Qs.max() == Qs])