Converting `highway-v0` to continuous control
See original GitHub issueHello! I’d like to know what is the best way to make a version of highway-v0
with continuous controls (steering and acceleration).
Looking at the source code, I reckon that the most straightforward way would be to implement a subclass of HighwayEnv
and override its step
method. It would then call
self.vehicle.act(
{"acceleration": action[0] * self.ACCELERATION_RANGE,
"steering": action[1] * self.STEERING_RANGE}
)
and then self.simulate()
with no arguments, bypassing the automatic steering and acceleration presets.
However, I’m not sure how to detect lane changes, which are necessary for calculating the reward. Any help would be appreciated, as there’s quite a bit of code to look at.
Great job with the simulations btw!
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
highway-env Documentation
A goal-conditioned continuous control task in which the ego-vehicle must park in a given space with the appropriate heading.
Read more >Safe and Efficient Reinforcement Learning for Behavioural ...
Optimistic Planning algorithm with Continuous actions ... perception systems and to act upon by control systems, and that they are ...
Read more >arXiv:2009.12213v1 [cs.MA] 25 Sep 2020
To this end, we first convert the would-be stochastic game problem into ... For example, an optimal control framework [1] is put forward...
Read more >How to convert a continuous time controller to a digital controller
Do zero-hold block enough to simulate desecrating continuous-time state-space model of controller? What I want to do is to convert my controller ......
Read more >用于强化学习的自动驾驶仿真场景highway-env(2): obs,action
在 continuous low-level control 的基础上,增加了一层 speed and steering ... import gym import highway_env env = gym.make("highway-v0") ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That looks great! I chose to use the target lane/velocity instead of the true state in the reward function so as to avoid skipping a reward because of a potential lag in the control response, but your changes make a lot of sense in the case of a Vehicle. I’m closing this issue but please, definitely feel free to open another one if you have more questions! ALSO: if you come up with a new interesting environment, please consider opening a pull request 😃 Edouard
Calling
Vehicle.create_random
totally works! This is what I’m doing now:I also had to update
_reward
, sinceVehicle
does not have some attributes thatMDPVehicle
has.Again, thanks a lot for your help!