|
|
|
|
|
|
learning_rate_schedule=ScheduleType.CONSTANT, |
|
|
|
batch_size=16, |
|
|
|
buffer_size=64, |
|
|
|
feature_size=2, |
|
|
|
feature_size=4, |
|
|
|
reuse_encoder=True, |
|
|
|
in_epoch_alter=True, |
|
|
|
# in_batch_alter=True, |
|
|
|
|
|
|
# assert all(reward > success_threshold for reward in processed_rewards) |
|
|
|
|
|
|
|
|
|
|
|
def test_2d_model(config=Transfer_CONFIG, obs_spec_type="normal", run_id="model_normal", seed=0): |
|
|
|
def test_2d_model(config=Transfer_CONFIG, obs_spec_type="normal", run_id="model_normal_f4_varp-pri-test", seed=0): |
|
|
|
config.hyperparameters, batch_size=120, buffer_size=12000, learning_rate=5.0e-3 |
|
|
|
config.hyperparameters, batch_size=120, buffer_size=12000, learning_rate=5.0e-3, |
|
|
|
use_var_predict=True, with_prior=True |
|
|
|
def test_2d_transfer(config=Transfer_CONFIG, obs_spec_type="rich2", run_id="transfer_rich2_from-rich1", seed=1337): |
|
|
|
def test_2d_transfer(config=Transfer_CONFIG, obs_spec_type="rich1", run_id="transfer_rich1_from-normal_varp-pri_retrain-all_5e-2", seed=1337): |
|
|
|
env = SimpleTransferEnvironment( |
|
|
|
[BRAIN_NAME], use_discrete=False, action_size=2, step_size=0.1, |
|
|
|
num_vector=2, obs_spec_type=obs_spec_type, goal_type="hard" |
|
|
|
|
|
|
transfer_path="./transfer_results/model_rich1_s0/Simple", |
|
|
|
use_op_buffer=True, in_epoch_alter=True, in_batch_alter=False, learning_rate=5e-4, |
|
|
|
train_policy=False, train_value=False, train_model=False, feature_size=2 |
|
|
|
transfer_path="./transfer_results/model_normal_f4_varp-pri_s0/Simple", |
|
|
|
use_op_buffer=True, in_epoch_alter=True, in_batch_alter=False, learning_rate=5.0e-2, |
|
|
|
train_policy=True, train_value=True, train_model=True, feature_size=4, learning_rate_schedule=ScheduleType.LINEAR, |
|
|
|
use_var_predict=True, with_prior=True |
|
|
|
) |
|
|
|
config = attr.evolve(config, hyperparameters=new_hyperparams, max_steps=200000, summary_freq=5000) |
|
|
|
_check_environment_trains(env, {BRAIN_NAME: config}, run_id=run_id + "_s" + str(seed), seed=seed) |
|
|
|
|
|
|
# test_2d_model(seed=0) |
|
|
|
# test_2d_model(config=PPO_CONFIG, run_id="ppo_normal", seed=0) |
|
|
|
test_2d_transfer(seed=0) |
|
|
|
test_2d_transfer(seed=123) |
|
|
|
# for i in range(5): |
|
|
|
# test_2d_model(seed=i) |