浏览代码

Add dynamics change to crawler (#4218)

* update walker

* add dynamics change crawler
/develop/bisim-review
GitHub 4 年前
当前提交
559549e4
共有 2 个文件被更改,包括 51 次插入0 次删除
  1. 11
      Project/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs
  2. 40
      config/ppo_transfer/CrawlerStatic_JointDamp.yaml

11
Project/Assets/ML-Agents/Examples/Crawler/Scripts/CrawlerAgent.cs


public Material groundedMaterial;
public Material unGroundedMaterial;
EnvironmentParameters m_ResetParams;
m_ResetParams = Academy.Instance.EnvironmentParameters;
SetResetParameters();
//Setup each body part
m_JdController.SetupBodyPart(body);

/// </summary>
public override void OnEpisodeBegin()
{
SetResetParameters();
foreach (var bodyPart in m_JdController.bodyPartsDict.Values)
{
bodyPart.Reset(bodyPart);

{
GetRandomTargetPos();
}
}
public void SetResetParameters()
{
m_JdController.jointDampen = m_ResetParams.GetWithDefault("dampen", 3000f);
}
private void OnDrawGizmosSelected()

40
config/ppo_transfer/CrawlerStatic_JointDamp.yaml


behaviors:
CrawlerStatic:
trainer_type: ppo_transfer
hyperparameters:
batch_size: 2024
buffer_size: 20240
learning_rate: 0.0003
beta: 0.005
epsilon: 0.2
lambd: 0.95
num_epoch: 3
learning_rate_schedule: linear
encoder_layers: 2
policy_layers: 2
value_layers: 2
feature_size: 32
reuse_encoder: true
in_epoch_alter: true
network_settings:
normalize: true
hidden_units: 512
num_layers: 3
vis_encode_type: simple
reward_signals:
extrinsic:
gamma: 0.995
strength: 1.0
keep_checkpoints: 5
max_steps: 10000000
time_horizon: 1000
summary_freq: 30000
threaded: true
parameter_randomization:
dampen:
sampler_type: uniform
sampler_parameters:
min_value: 10000
max_value: 10000
正在加载...
取消
保存