sonic_on_ray/sonic_on_ray.py
def make(game, state, stack=True, scale_rew=True, monitordir='logs/', bk2dir='videos/'):
    """
    Create an environment with some standard wrappers.
    """
    env = retro.make(game, state)
    if bk2dir:
        env.auto_record('videos/')
    if monitordir:
        #env = Monitor(env, os.path.join(monitordir, 'monitor.csv'), os.path.join(monitordir, 'log.csv'))
        time_int = int(time.time())
        env = Monitor(env, os.path.join('monitor_{}.csv'.format(time_int)), os.path.join('log_{}.csv'.format(time_int)))

    env = StochasticFrameSkip(env, n=6, stickprob=0.0)

    env = SonicDiscretizer(env)
    if scale_rew:
        env = RewardScaler(env)
    env = WarpFrame(env)
    if stack:
        env = FrameStack(env, 4)
    return env

    Create an environment with some standard wrappers.
    
Create an environment with some standard wrappers.
Create an environment with some standard wrappers .
def make(game, state, stack=True, scale_rew=True, monitordir='logs/', bk2dir='videos/'):
    env = retro.make(game, state)
    if bk2dir:
        env.auto_record('videos/')
    if monitordir:
        time_int = int(time.time())
        env = Monitor(env, os.path.join('monitor_{}.csv'.format(time_int)), os.path.join('log_{}.csv'.format(time_int)))
    env = StochasticFrameSkip(env, n=6, stickprob=0.0)
    env = SonicDiscretizer(env)
    if scale_rew:
        env = RewardScaler(env)
    env = WarpFrame(env)
    if stack:
        env = FrameStack(env, 4)
    return env
def make ( game , state , stack = True , scale_rew = True , monitordir = 'logs/' , bk2dir = 'videos/' ) : env = retro . make ( game , state ) if bk2dir : env . auto_record ( 'videos/' ) if monitordir : time_int = int ( time . time ( ) ) env = Monitor ( env , os . path . join ( 'monitor_{}.csv' . format ( time_int ) ) , os . path . join ( 'log_{}.csv' . format ( time_int ) ) ) env = StochasticFrameSkip ( env , n = 6 , stickprob = 0.0 ) env = SonicDiscretizer ( env ) if scale_rew : env = RewardScaler ( env ) env = WarpFrame ( env ) if stack : env = FrameStack ( env , 4 ) return env
Create an environment with some standard wrappers.
Create an environment with some standard wrappers .
"""
    Create an environment with some standard wrappers.
    """ #env = Monitor(env, os.path.join(monitordir, 'monitor.csv'), os.path.join(monitordir, 'log.csv'))
game
state
stack
scale_rew
monitordir
bk2dir