本文整理匯總了Python中universe.wrappers.Logger方法的典型用法代碼示例。如果您正苦於以下問題:Python wrappers.Logger方法的具體用法?Python wrappers.Logger怎麽用?Python wrappers.Logger使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類universe.wrappers
的用法示例。
在下文中一共展示了wrappers.Logger方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: create_flash_env
# 需要導入模塊: from universe import wrappers [as 別名]
# 或者: from universe.wrappers import Logger [as 別名]
def create_flash_env(env_id, client_id, remotes, **_):
env = gym.make(env_id)
env = Vision(env)
env = Logger(env)
env = BlockingReset(env)
reg = universe.runtime_spec('flashgames').server_registry
height = reg[env_id]["height"]
width = reg[env_id]["width"]
env = CropScreen(env, height, width, 84, 18)
env = FlashRescale(env)
keys = ['left', 'right', 'up', 'down', 'x']
env = DiscreteToFixedKeysVNCActions(env, keys)
env = EpisodeID(env)
env = DiagnosticsInfo(env)
env = Unvectorize(env)
env.configure(fps=5.0, remotes=remotes, start_timeout=15 * 60, client_id=client_id,
vnc_driver='go', vnc_kwargs={
'encoding': 'tight', 'compress_level': 0,
'fine_quality_level': 50, 'subsample_level': 3})
return env
示例2: create_vncatari_env
# 需要導入模塊: from universe import wrappers [as 別名]
# 或者: from universe.wrappers import Logger [as 別名]
def create_vncatari_env(env_id, client_id, remotes, **_):
env = gym.make(env_id)
env = Vision(env)
env = Logger(env)
env = BlockingReset(env)
env = GymCoreAction(env)
env = AtariRescale42x42(env)
env = EpisodeID(env)
env = DiagnosticsInfo(env)
env = Unvectorize(env)
logger.info('Connecting to remotes: %s', remotes)
fps = env.metadata['video.frames_per_second']
env.configure(remotes=remotes, start_timeout=15 * 60, fps=fps, client_id=client_id)
return env
示例3: create_flash_env
# 需要導入模塊: from universe import wrappers [as 別名]
# 或者: from universe.wrappers import Logger [as 別名]
def create_flash_env(env_id, client_id, remotes, **_):
env = gym.make(env_id)
env = Vision(env)
env = Logger(env)
env = BlockingReset(env)
reg = universe.runtime_spec('flashgames').server_registry
height = reg[env_id]["height"]
width = reg[env_id]["width"]
env = CropScreen(env, height, width, 84, 18)
env = FlashRescale(env)
keys = ['left', 'right', 'up', 'down', 'x']
if env_id == 'flashgames.NeonRace-v0':
# Better key space for this game.
keys = ['left', 'right', 'up', 'left up', 'right up', 'down', 'up x']
logger.info('create_flash_env(%s): keys=%s', env_id, keys)
env = DiscreteToFixedKeysVNCActions(env, keys)
env = EpisodeID(env)
env = DiagnosticsInfo(env)
env = Unvectorize(env)
env.configure(fps=5.0, remotes=remotes, start_timeout=15 * 60, client_id=client_id,
vnc_driver='go', vnc_kwargs={
'encoding': 'tight', 'compress_level': 0,
'fine_quality_level': 50, 'subsample_level': 3})
return env