alpaca/alpacka/agents/base.py
def solve(self, env, init_state=None, time_limit=None):
        """Solves a given environment.

        Coroutine, suspends execution for every neural network prediction
        request. This enables a very convenient interface for requesting
        predictions by the Agent:

            def solve(self, env, init_state=None):
                # Planning...
                predictions = yield inputs
                # Planning...
                predictions = yield inputs
                # Planning...
                return episode

        Example usage:

            coroutine = agent.solve(env)
            try:
                prediction_request = next(coroutine)
                network_output = process_request(prediction_request)
                prediction_request = coroutine.send(network_output)
                # Possibly more prediction requests...
            except StopIteration as e:
                episode = e.value

        Agents that do not use neural networks should wrap their solve() method
        in an @asyncio.coroutine decorator, so Python knows to treat it as
        a coroutine even though it doesn't have any yield.

        Args:
            env (gym.Env): Environment to solve.
            init_state (object): Reset the environment to this state.
                If None, then do normal gym_open_ai.Env.reset().
            time_limit (int or None): Maximum number of steps to make on the
                solved environment. None means no time limit.

        Yields:
            A stream of Network inputs requested for inference.

        Returns:
            (Agent/Trainer-specific) Episode object summarizing the collected
            data for training the Network.
        """
        raise NotImplementedError
Solves a given environment.

        Coroutine, suspends execution for every neural network prediction
        request. This enables a very convenient interface for requesting
        predictions by the Agent:

            def solve(self, env, init_state=None):
                # Planning...
                predictions = yield inputs
                # Planning...
                predictions = yield inputs
                # Planning...
                return episode

        Example usage:

            coroutine = agent.solve(env)
            try:
                prediction_request = next(coroutine)
                network_output = process_request(prediction_request)
                prediction_request = coroutine.send(network_output)
                # Possibly more prediction requests...
            except StopIteration as e:
                episode = e.value

        Agents that do not use neural networks should wrap their solve() method
        in an @asyncio.coroutine decorator, so Python knows to treat it as
        a coroutine even though it doesn't have any yield.

        Args:
            env (gym.Env): Environment to solve.
            init_state (object): Reset the environment to this state.
                If None, then do normal gym_open_ai.Env.reset().
            time_limit (int or None): Maximum number of steps to make on the
                solved environment. None means no time limit.

        Yields:
            A stream of Network inputs requested for inference.

        Returns:
            (Agent/Trainer-specific) Episode object summarizing the collected
            data for training the Network.
        
Solves a given environment.
Coroutine, suspends execution for every neural network prediction
request. This enables a very convenient interface for requesting
predictions by the Agent.

def solve(self, env, init_state=None):
Planning
predictions = yield inputs
Planning
predictions = yield inputs
Planning
return episode

Example usage.



Agents that do not use neural networks should wrap their solve() method
in an @asyncio.coroutine decorator, so Python knows to treat it as
a coroutine even though it doesn't have any yield.
Solves a given environment . Coroutine suspends execution for every neural network prediction request . This enables a very convenient interface for requesting predictions by the Agent . def solve ( self env init_state = None ) : Planning predictions = yield inputs Planning predictions = yield inputs Planning return episode Example usage . Agents that do not use neural networks should wrap their solve () method in an @asyncio . coroutine decorator so Python knows to treat it as a coroutine even though it doesn ' t have any yield .
def solve(self, env, init_state=None, time_limit=None):
        raise NotImplementedError
def solve ( self , env , init_state = None , time_limit = None ) : raise NotImplementedError
Solves a given environment.
Solves a given environment .
"""Solves a given environment.

        Coroutine, suspends execution for every neural network prediction
        request. This enables a very convenient interface for requesting
        predictions by the Agent:

            def solve(self, env, init_state=None):
                # Planning...
                predictions = yield inputs
                # Planning...
                predictions = yield inputs
                # Planning...
                return episode

        Example usage:

            coroutine = agent.solve(env)
            try:
                prediction_request = next(coroutine)
                network_output = process_request(prediction_request)
                prediction_request = coroutine.send(network_output)
                # Possibly more prediction requests...
            except StopIteration as e:
                episode = e.value

        Agents that do not use neural networks should wrap their solve() method
        in an @asyncio.coroutine decorator, so Python knows to treat it as
        a coroutine even though it doesn't have any yield.

        Args:
            env (gym.Env): Environment to solve.
            init_state (object): Reset the environment to this state.
                If None, then do normal gym_open_ai.Env.reset().
            time_limit (int or None): Maximum number of steps to make on the
                solved environment. None means no time limit.

        Yields:
            A stream of Network inputs requested for inference.

        Returns:
            (Agent/Trainer-specific) Episode object summarizing the collected
            data for training the Network.
        """
A stream of Network inputs requested for inference.
A stream of Network inputs requested for inference .
(Agent/Trainer-specific) Episode object summarizing the collected
data for training the Network.
( Agent / Trainer - specific ) Episode object summarizing the collected data for training the Network .
self
env
Environment to solve.
Environment to solve .
init_state
Reset the environment to this state.
If None, then do normal gym_open_ai.Env.reset().
Reset the environment to this state . If None then do normal gym_open_ai . Env . reset () .
time_limit
Maximum number of steps to make on the
solved environment. None means no time limit.
Maximum number of steps to make on the solved environment . None means no time limit .