Пример #1
0
def set_env():
    register(
        id='SnakeEnv-v0',
        entry_point='gym.envs.gym_snake:SingleSnake',
    )

    add_group(id='gym_snake', name='gym_snake', description='snake')

    add_task(id='SnakeEnv-v0',
             group='gym_snake',
             summary="Multi snakes environment")
Пример #2
0
from gym.envs.registration import register
from gym.scoreboard.registration import add_task, add_group
from .package_info import USERNAME

# Environment registration

for d in [4, 8, 16, 32, 64]:
    register(
        id='{}/gridworld-{}x{}'.format(USERNAME, d, d),
        entry_point='{}_gym_gridworld:GridWorldEnv'.format(USERNAME),
        max_episode_steps=1000,
        reward_threshold=9000.0,
        kwargs={'dimension': d},
    )

# Scoreboard registration
# ==========================
add_group(id='gridworld',
          name='GridWorld',
          description='Sutton & Barto classic Gridworld environment.')

for d in [4, 8, 16, 32, 64]:
    add_task(id='{}/GridWorld-{}x{}'.format(USERNAME, d, d),
             group='gridworld',
             summary='Sutton and Barto Grid world, {}x{}.'.format(d),
             description="""
        """)
Пример #3
0
from gym.scoreboard.registration import registry, add_task, add_group

# Discover API key from the environment. (You should never have to
# change api_base / web_base.)
api_key = os.environ.get('OPENAI_GYM_API_KEY')
api_base = os.environ.get('OPENAI_GYM_API_BASE', 'https://gym-api.openai.com')
web_base = os.environ.get('OPENAI_GYM_WEB_BASE', 'https://gym.openai.com')

# The following controls how various tasks appear on the
# scoreboard. These registrations can differ from what's registered in
# this repository.

# groups

add_group(id='classic_control',
          name='Classic control',
          description='Classic control problems from the RL literature.')

add_group(
    id='algorithmic',
    name='Algorithmic',
    description='Learn to imitate computations.',
)

add_group(
    id='atari',
    name='Atari',
    description='Reach high scores in Atari 2600 games.',
)

add_group(
Пример #4
0
import os

from gym.scoreboard.registration import registry, add_task, add_group

add_group(id='gazebo', name='Gazebo', description='TODO.')

add_task(
    id='test-v0',
    group='gazebo',
    summary='Obstacle avoidance in a Circuit.',
)

registry.finalize()
Пример #5
0
# Discover API key from the environment. (You should never have to
# change api_base / web_base.)
api_key = os.environ.get('OPENAI_GYM_API_KEY')
api_base = os.environ.get('OPENAI_GYM_API_BASE', 'https://gym-api.openai.com')
web_base = os.environ.get('OPENAI_GYM_WEB_BASE', 'https://gym.openai.com')

# The following controls how various tasks appear on the
# scoreboard. These registrations can differ from what's registered in
# this repository.

# groups

add_group(
    id='classic_control',
    name='Classic control',
    description='Classic control problems from the RL literature.'
)

add_group(
    id='algorithmic',
    name='Algorithmic',
    description='Learn to imitate computations.',
)

add_group(
    id='atari',
    name='Atari',
    description='Reach high scores in Atari 2600 games.',
)
Пример #6
0
    entry_point='{}_gym_doom:DoomTakeCoverEnv'.format(USERNAME),
    max_episode_steps=10000,
    reward_threshold=750.0,
)

register(
    id='{}/DoomDeathmatch-v0'.format(USERNAME),
    entry_point='{}_gym_doom:DoomDeathmatchEnv'.format(USERNAME),
    max_episode_steps=10000,
    reward_threshold=20.0,
)

# Scoreboard registration
# ==========================
add_group(id='doom',
          name='Doom',
          description='Doom environments based on VizDoom.')

add_task(id='{}/meta-Doom-v0'.format(USERNAME),
         group='doom',
         summary='Mission #1 to #9 - Beat all 9 Doom missions.',
         description="""
This is a meta map that combines all 9 Doom levels.

Levels:
    - #0 Doom Basic
    - #1 Doom Corridor
    - #2 Doom DefendCenter
    - #3 Doom DefendLine
    - #4 Doom HealthGathering
    - #5 Doom MyWayHome
Пример #7
0
from gym.scoreboard.registration import add_task, add_group

add_group(id='bandits',
          name='Bandits',
          description='Various multi-armed Bandit environments')

add_task(
    id='multi_arm_bandit_gaussian_fixed-v0',
    group='bandits',
    experimental=True,
    contributor='bardofcodes',
    summary=
    "multi-armed bandit mentioned with reward based on a Gaussian distribution",
    description="""
    Each bandit gives a fixed reward,'r', where 'r' is sampled from a Gaussian Distribution(5,2)
    """,
    background="")

add_task(
    id='multi_arm_bandit_gaussian_gaussian-v0',
    group='bandits',
    experimental=True,
    contributor='bardofcodes',
    summary=
    "multi-armed bandit with each bandit having a normal distribution for reward distribution",
    description="""
     Each bandit has a N(r,1) reward distribution, where 'r' is sampled from a Normal(5,2) distribution.
    """,
    background="")

add_task(
Пример #8
0
            level = (world_number - 1) * 4 + (level_number - 1)
            register(
                id='{}/SuperMarioBros-{}-{}{}-v0'.format(USERNAME, world_number, level_number, tile_suffix),
                entry_point='{}_gym_super_mario:SuperMarioBrosEnv'.format(USERNAME),
                max_episode_steps=10000,
                reward_threshold=(max_distance - 40),
                kwargs={ 'draw_tiles': draw_tiles, 'level': level },
                # Seems to be non-deterministic about 5% of the time
                nondeterministic=True,
            )

    # Scoreboard registration
    # ==========================
    add_group(
        id= 'super-mario',
        name= 'SuperMario',
        description= '32 levels of the original Super Mario Bros game.'
    )

    add_task(
        id='{}/meta-SuperMarioBros-v0'.format(USERNAME),
        group='super-mario',
        summary='Compilation of all 32 levels of Super Mario Bros. on Nintendo platform - Screen version.',
    )
    add_task(
        id='{}/meta-SuperMarioBros-Tiles-v0'.format(USERNAME),
        group='super-mario',
        summary='Compilation of all 32 levels of Super Mario Bros. on Nintendo platform - Tiles version.',
    )

    for world in range(8):
Пример #9
0
)

register(
    id='vladfi1/SSBM-headless-v0',
    entry_point='dolphin:simpleSSBMEnv',
    reward_threshold=1,
    timestep_limit=9999999,
    kwargs=dict(
      cpu=9,
      stage='battlefield',
    ),
    nondeterministic=True,
)

# Scoreboard registration
# ==========================
add_group(
    id= 'ssbm',
    name= 'Super Smash Bros. Melee',
    description= 'Beat the in-game AIs at SSBM.'
)

"""
add_task(
    id='{}/meta-SuperMarioBros-v0'.format(USERNAME),
    group='ssbm',
    summary='Compilation of all 32 levels of Super Mario Bros. on Nintendo platform - Screen version.',
)
"""

Пример #10
0
# Discover API key from the environment. (You should never have to
# change api_base / web_base.)
api_key = os.environ.get('OPENAI_GYM_API_KEY')
api_base = os.environ.get('OPENAI_GYM_API_BASE', 'https://gym-api.openai.com')
web_base = os.environ.get('OPENAI_GYM_WEB_BASE', 'https://gym.openai.com')

# The following controls how various tasks appear on the
# scoreboard. These registrations can differ from what's registered in
# this repository.

# groups

add_group(
    id='classic_control',
    name='Classic control',
    description='Classic control problems from the RL literature.'
)

add_group(
    id='algorithmic',
    name='Algorithmic',
    description='Learn to imitate computations.',
)

add_group(
    id='atari',
    name='Atari',
    description='Reach high scores in Atari 2600 games.',
)
import gym
from gym.envs.registration import register
from gym.scoreboard.registration import add_group
from gym.scoreboard.registration import add_taskcd

register(
    id='SuperMarioBros-1-1-v0',
    entry_point='gym.envs.ppaquette_gym_super_mario:MetaSuperMarioBrosEnv',
)

add_group(id='ppaquette_gym_super_mario',
          name='ppaquette_gym_super_mario',
          description='super_mario')

add_task(id='SuperMarioBros-1-1-v0',
         group='ppaquette_gym_super_mario',
         summary="SuperMarioBros-1-1-v0")

env = gym.make('SuperMarioBros-1-1-v0')
env.reset()
for _ in range(10000):
    env.render()
    env.step(env.action_space.sample())  # take a random action
Пример #12
0
from gym.scoreboard.registration import add_task, add_group

add_group(id='SpaceFortress',
          name='SpaceFortress',
          description='SpaceFortress games')

add_task(id='SpaceFortress-explode-image-v0',
         summary="2D frictionless space shooter (explode, image)",
         group='SpaceFortress',
         contributor='Ryan M. Hope')

add_task(id='SpaceFortress-autoturn-image-v0',
         summary="2D frictionless space shooter (autoturn, image)",
         group='SpaceFortress',
         contributor='Ryan M. Hope')

add_task(id='SpaceFortress-explode-features-v0',
         summary="2D frictionless space shooter (explode, features)",
         group='SpaceFortress',
         contributor='Ryan M. Hope')

add_task(id='SpaceFortress-autoturn-features-v0',
         summary="2D frictionless space shooter (autoturn, features)",
         group='SpaceFortress',
         contributor='Ryan M. Hope')
Пример #13
0
from gym.scoreboard.registration import registry, add_task, add_group

# Discover API key from the environment. (You should never have to
# change api_base / web_base.)
'''api_key = os.environ.get('OPENAI_GYM_API_KEY')
api_base = os.environ.get('OPENAI_GYM_API_BASE', 'https://gym-api.openai.com')
web_base = os.environ.get('OPENAI_GYM_WEB_BASE', 'https://gym.openai.com')'''

# The following controls how various tasks appear on the
# scoreboard. These registrations can differ from what's registered in
# this repository.

# groups

add_group(id='gym-vehicle', name='gym-vehicle', description='TODO.')

add_task(
    id='GazeboCircuitLargeCatvehicleLidar-v0',
    group='gym-vehicle',
    summary='Test1.',
)

add_task(
    id='GazeboCircuitLargeCatvehicleLidarNn-v0',
    group='gym-vehicle',
    summary='Test2.',
)

add_task(
    id='GazeboTrackCatvehicleLidar-v0',
Пример #14
0
    #tags={'wrapper_config.TimeLimit.max_episode_steps': 1818},
    #timestep_limit=1818,
    reward_threshold=16000)

register(
    id='MinecraftHard-v0',
    entry_point='gym_minecraft.envs:MinecraftEnv',
    kwargs={'mission_file': 'hard.xml'},
    #tags={'wrapper_config.TimeLimit.max_episode_steps': 2424},
    #timestep_limit=2424,
    reward_threshold=32000)

# Scoreboard registration
# ==========================
add_group(id='minecraft',
          name='Minecraft',
          description='Minecraft environments based on Malmo.')

add_task(id='MinecraftDefaultWorld1-v0',
         group='minecraft',
         summary='Survive and find gold, diamond or redstone!',
         description="""
The agent appears in a default Minecraft world, with all possible objects.
The agent appears at x="-204" y="81" z="217", which depending on the world
that is generated means that it's going to fall initially to touch ground.

Goal:
The task instance is considered complete if the agent finds (mines) any
special block (any of "gold_block diamond_block redstone_block").

Rewards:
Пример #15
0
    max_episode_steps=10000,
    reward_threshold=20.0,
)

register(
    id='{}/DoomBattle3-v0',
    entry_point='{}.gym.doom:DoomBattleD3Env',
    max_episode_steps=10000,
    reward_threshold=20.0,
)

# Scoreboard registration
# ==========================
add_group(
    id= 'doom',
    name= 'Doom',
    description= 'Doom environments based on VizDoom.'
)

add_task(
    id='{}/meta-Doom-v0',
    group='doom',
    summary='Mission #1 to #9 - Beat all 9 Doom missions.',
    description="""
This is a meta map that combines all 9 Doom levels.

Levels:
    - #0 Doom Basic
    - #1 Doom Corridor
    - #2 Doom DefendCenter
    - #3 Doom DefendLine