Exemple #1
0
def ddpg_run(skip_confirmation: bool = True,
             environment_type: Union[bool, str] = True,
             config=None,
             **kwargs):
    if config is None:
        config = ddpg_config
    session_factory(DeepDeterministicPolicyGradientAgent,
                    config,
                    session=ParallelSession,
                    skip_confirmation=skip_confirmation,
                    environment=environment_type,
                    **kwargs)
Exemple #2
0
def pg_run(skip_confirmation: bool = True,
           environment_type: Union[bool, str] = True,
           *,
           config=None,
           **kwargs) -> None:
    if config is None:
        config = pg_config

    session_factory(PolicyGradientAgent,
                    config,
                    session=ParallelSession,
                    skip_confirmation=skip_confirmation,
                    environment=environment_type,
                    **kwargs)
Exemple #3
0
def dqn_run(skip_confirmation: bool = True,
            environment_type: Union[bool, str] = True,
            config=None,
            **kwargs) -> None:
    if config is None:
        config = dqn_config
    session_factory(DeepQNetworkAgent,
                    config,
                    session=GDKC(ParallelSession,
                                 environment_name=ENVIRONMENT_NAME,
                                 procedure=OffPolicyEpisodic,
                                 environment=environment_type,
                                 **kwargs),
                    skip_confirmation=skip_confirmation,
                    environment=environment_type,
                    **kwargs)
Exemple #4
0
def random_run(
    rollouts=None,
    skip_confirmation: bool = True,
    environment_type: Union[bool, str] = True,
    config=None,
) -> None:
    if config is None:
        config = random_config

    if rollouts:
        config.ROLLOUTS = rollouts

    session_factory(
        RandomAgent,
        config,
        session=ParallelSession,
        skip_confirmation=skip_confirmation,
        environment_type=environment_type,
    )
Exemple #5
0
def ppo_run(
    skip_confirmation: bool = True,
    environment_type: Union[bool, str] = True,
    config=None,**kwargs
):
    """

  @param skip_confirmation:
  @type skip_confirmation:
  @param environment_type:
  @type environment_type:
  @param config:
  @type config:
  """
    if config is None:
        config = ppo_config
    session_factory(
        ProximalPolicyOptimizationAgent,
        config,
        session=ParallelSession,
        environment=environment_type,
        skip_confirmation=skip_confirmation,**kwargs
    )