def cylinder_ball(expcfgs=None):
    return generate_expcfgs(
        [
            ('dov_tube40_80_0.s', 'dov_ball45_0.s'),
            ('dov_tube40_80_0_rs.s', 'dov_ball45_0.s'),
            #('dov_ball45_0.s',    'dov_tube40_80_0.s'),
        ],
        expcfgs=expcfgs,
        src_ex_names=('random_goal200', ),
        reuse_algo=('sensor_uniform', 'random'))


def ball_cube_25(expcfgs=None):
    return generate_expcfgs([('dov_ball25_0.s', 'dov_ball25_0.s'),
                             ('dov_ball25_0.s', 'dov_cube25_0.s'),
                             ('dov_cube25_0.s', 'dov_cube25_0.s'),
                             ('dov_cube25_0.s', 'dov_ball25_0.s')],
                            expcfgs=expcfgs,
                            src_ex_names=('random_goal200', ),
                            reuse_algo=('sensor_uniform', ))


if __name__ == '__main__':
    expcfgs = [[], []]
    expcfgs = ball_cube_45(expcfgs)
    expcfgs = misreuse(expcfgs)
    expcfgs = cylinder_ball(expcfgs)
    expcfgs = ball_cube_25(expcfgs)

    explib.run([cfg for cfg_level in expcfgs for cfg in cfg_level])
示例#2
0
cfg.testscov.buffer_size   = 0.02
cfg.testscov.ticks         = [1000*i for i in range(11)]


expcfgs_levels = [[]]
env_names     = ['kin20_150']
ps            = [0.001, 0.05, 0.5]
explorer_name = 'random.goal'

for p in ps:
    for d in [i*0.05 for i in range(21)]:
        for env_name in env_names:
            exp_cfg = cfg._deepcopy()

            exp_cfg.exploration.explorer._strict(False)
            exp_cfg.exploration.explorer._update(exs.catalog[explorer_name]._deepcopy(), overwrite=False)
            exp_cfg.exploration.explorer.weights                = ((1.0, 0.0), (d, 1-d))
            exp_cfg.exploration.explorer.eras                   = (1, None)
            exp_cfg.exploration.explorer.ex_1.learner.m_disturb = p

            exp_cfg.job.env._update(envs.catalog[env_name], overwrite=False)
            exp_cfg.exp.prefix_name += (str(disturb),str(p))
            exp_cfg.exp.key = ((exp_cfg.exp.prefix_name + (explorer_name, env_name), cfg.exp.repetitions), exp_cfg.exp.deps)
            exp_cfg.exp.explorer_name = explorer_name
            exp_cfg.exp.env_name      = env_name
            expcfgs_levels[0].append(exp_cfg)


if __name__ == '__main__':
    explib.run([cfg for cfg_level in expcfgs_levels for cfg in cfg_level])