Beispiel #1
0
gamma = 0.99
device = torch.device("cuda")
domain_name = "hopper"
task_name = "hop"
action_gradation = 30
noise_type = "ou"

control_stepsize = 1
max_episode = 5000 + int(control_stepsize / 10) * 1000

video_save_period = 100

record_dir = utils.directory_setting("/home/duju/training/pytorch",
                                     domain_name, task_name, control_stepsize)

utils.append_file_writer(record_dir, "exp_detail.txt",
                         "exp_type : " + str(exp_type) + "\n")
utils.append_file_writer(record_dir, "exp_detail.txt",
                         "framework : " + str(framework) + "\n")
utils.append_file_writer(record_dir, "exp_detail.txt",
                         "actor_lr : " + str(actor_lr) + "\n")
utils.append_file_writer(record_dir, "exp_detail.txt",
                         "critic_lr : " + str(critic_lr) + "\n")
utils.append_file_writer(record_dir, "exp_detail.txt",
                         "tau : " + str(tau) + "\n")
utils.append_file_writer(record_dir, "exp_detail.txt",
                         "batch_size : " + str(batch_size) + "\n")
utils.append_file_writer(record_dir, "exp_detail.txt",
                         "buffer_size : " + str(buffer_size) + "\n")
utils.append_file_writer(record_dir, "exp_detail.txt",
                         "sigma_min : " + str(sigma_min) + "\n")
utils.append_file_writer(record_dir, "exp_detail.txt",
Beispiel #2
0
    # arguments
    domain_name = parser.parse_args().domain
    task_name = parser.parse_args().task
    control_stepsize = int(parser.parse_args().control_stepsize)
    max_iteration = int(parser.parse_args().max_iteration)
    model_save_period = max_iteration / 10
    device_index = int(parser.parse_args().device)

    device = torch.device("cuda", device_index)

    record_dir = utils.directory_setting("../results",
                                         exp_type + "_" + domain_name,
                                         task_name, control_stepsize)

    utils.append_file_writer(record_dir, "exp_detail.txt",
                             "exp_type : " + str(exp_type) + "\n")
    utils.append_file_writer(record_dir, "exp_detail.txt",
                             "framework : " + str(framework) + "\n")
    utils.append_file_writer(record_dir, "exp_detail.txt",
                             "actor_lr : " + str(actor_lr) + "\n")
    utils.append_file_writer(record_dir, "exp_detail.txt",
                             "critic_lr : " + str(critic_lr) + "\n")
    utils.append_file_writer(record_dir, "exp_detail.txt",
                             "tau : " + str(tau) + "\n")
    utils.append_file_writer(record_dir, "exp_detail.txt",
                             "batch_size : " + str(batch_size) + "\n")
    utils.append_file_writer(record_dir, "exp_detail.txt",
                             "buffer_size : " + str(buffer_size) + "\n")
    utils.append_file_writer(record_dir, "exp_detail.txt",
                             "sigma : " + str(sigma) + "\n")
    utils.append_file_writer(record_dir, "exp_detail.txt",