Skip to content

Commit

Permalink
polish(nyz): add metadrive version info
Browse files Browse the repository at this point in the history
  • Loading branch information
PaParaZz1 committed Aug 3, 2024
1 parent 5de52bc commit 3f6cb5a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ The environments and algorithms currently supported by LightZero are shown in th
| MiniGrid | --- |||| 🔒 | 🔒 ||🔒 |
| Bsuite | --- |||| 🔒 | 🔒 ||🔒 |
| Memory | --- |||| 🔒 | 🔒 ||🔒 |
| SumToThree (billiards) | --- | 🔒 | 🔒 || 🔒 | 🔒 |🔒|🔒 |
| SumToThree (billiards) | --- | 🔒 | 🔒 || 🔒 | 🔒 |🔒|🔒 |
| MetaDrive | --- | 🔒 | 🔒 || 🔒 | 🔒 | 🔒 |🔒 |


<sup>(1): "✔" means that the corresponding item is finished and well-tested.</sup>
Expand Down
5 changes: 5 additions & 0 deletions zoo/metadrive/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Installation
```shell
pip install metadrive-simulator==0.3.0.1
pip install panda3d-simplepbr==0.9
```
4 changes: 2 additions & 2 deletions zoo/metadrive/env/drive_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def reward_function(self, vehicle_id: str):

reward = 0.0
reward += self.config["driving_reward"] * (long_now - long_last) * lateral_factor * positive_road
reward += self.config["speed_reward"] * (vehicle.speed / vehicle.max_speed) * positive_road
reward += self.config["speed_reward"] * (vehicle.speed / vehicle.max_speed_km_h) * positive_road

step_info["step_reward"] = reward

Expand Down Expand Up @@ -391,4 +391,4 @@ def get_navigation_len(self, vehicle):
if hasattr(vehicle.navigation, 'u_turn_case'):
if vehicle.navigation.u_turn_case is True:
total_dist += 35
return total_dist
return total_dist

0 comments on commit 3f6cb5a

Please sign in to comment.