我已经建立了一个学习环境,在这个环境中,球要学会直奔目标,并与目标碰撞。目标的位置是随机的,但目标产卵点的半径可以通过在游戏控制器中设置的公共变量来控制,以便改变难度。
public float distanceToAgent = 1f;我的意图是通过在YAML课程中使用课程来增加距离-然而,当我尝试下面的课程时,它似乎没有增加基于课程计划的目标产卵距离。
我做错了什么?我觉得我在脚本中遗漏了将课程值与课程配置联系起来的内容。
behaviors:
RollerBall:
trainer_type: ppo
hyperparameters:
batch_size: 10
buffer_size: 100
learning_rate: 3.0e-4
beta: 5.0e-4
epsilon: 0.2
lambd: 0.99
num_epoch: 3
learning_rate_schedule: linear
network_settings:
normalize: false
hidden_units: 128
num_layers: 2
reward_signals:
extrinsic:
gamma: 0.99
strength: 1.0
max_steps: 900000
time_horizon: 64
summary_freq: 10000
environment_parameters:
distanceToAgent:
curriculum:
- name: FirstLesson
completion_criteria:
measure: progress
behavior: RollerBall
signal_smoothing: true
min_lesson_length: 100
threshold: 0.1
value: 1.0
- name: SecondLesson
completion_criteria:
measure: progress
behavior: RollerBall
signal_smoothing: true
min_lesson_length: 1000
threshold: 0.3
value: 5.0
- name: ThirdLesson
completion_criteria:
measure: progress
behavior: RollerBall
signal_smoothing: true
min_lesson_length: 1000
threshold: 0.5
value: 10.0
- name: ThirdLesson
value: 15.0发布于 2021-03-24 23:03:21
我认为这很好。
但您需要:
EnvironmentParameters m_ResetParams;
public override void Initialize()
{
m_ResetParams = Academy.Instance.EnvironmentParameters;
}
//and than your can get you value for example in OnEpisodeBeginn()
distanceToAgent = m_ResetParams.GetWithDefault("distanceToAgent", 1.0f);https://stackoverflow.com/questions/64869173
复制相似问题