v0.1.4; Add terrain IS_HARD option

This commit is contained in:
wty-yy
2026-01-05 22:10:09 +08:00
parent 319853d0f3
commit ddd7119050
3 changed files with 16 additions and 4 deletions

View File

@@ -90,9 +90,18 @@ class Terrain:
length=self.width_per_env_pixels,
vertical_scale=self.cfg.vertical_scale,
horizontal_scale=self.cfg.horizontal_scale)
slope = 0.1 + difficulty * 0.52
step_height = 0.05 + 0.23 * difficulty
discrete_obstacles_height = 0.05 + difficulty * 0.25
IS_HARD = True
if IS_HARD:
# hard
slope = 0.1 + difficulty * 0.52 # max: 29.6 degrees
step_height = 0.05 + 0.23 * difficulty # max: 0.257 m
discrete_obstacles_height = 0.05 + difficulty * 0.25 # max: 0.275 m
else:
# default (easy)
slope = difficulty * 0.4 # max: 19.8 degrees
step_height = 0.05 + 0.18 * difficulty # max: 0.212 m
discrete_obstacles_height = 0.05 + difficulty * 0.2 # max: 0.23 m
stepping_stones_size = 1.5 * (1.05 - difficulty)
stone_distance = 0.05 if difficulty==0 else 0.1
gap_size = 1. * difficulty