Skip to main content
. 2021 Jan 12;21(2):492. doi: 10.3390/s21020492
Algorithm 1 Award accumulated in each IA’s observation-action cycle
for i = 1:20
if ray[i].hit = true
Add reward(−0.5/ray[i].distance);
end
end
if velocity ≤ 0
AddReward(−0.1 · f);
if velocity > 0
AddReward(2 · f);
if 2 < velocity < 12
AddReward(velocity · f);
if 12 < velocity ≤ 27
AddReward(0.1 · f);
AddReward(−0.1 · acceleration);
AddReward(−0.01 · steer · steer);