Closed nileshop22 closed 2 years ago
Are there any other ways to make these tasks Infinite Horizon? Or any idea to make a completely new Infinite Horizon Tasks.
If you want to forbid any kind of reset, including with another vehicle, then it means that
I'm not sure what other options you are thinking of...
How to implement discrete action space for Racetrack?
See the docs: https://highway-env.readthedocs.io/en/latest/actions/index.html
Thanks! I wanted to know how to implement discrete meta-actions for Racetrack, to me it seems it uses continuous actions.
You have to do the following:
env = gym.make("racetrack-v0")
env.configure({
"action": {
"type": "DiscreteMetaAction"
}
})
env.reset()
@eleurent Just a quick question, are all the environments here are stochastic? I wonder that it is the case though I haven't myself gone through the code. Will you please confirm. Thanks
No, most environments are deterministic, at least by default. The initial state however, is sampled typically from some distribution, which brings some randomness to the agent's experiences.
Actually, in some environments the behavioural parameters of vehicles in the scene are also randomly sampled at initialization. Since these are not observed directly but affect the transitions of these vehicles, this can be seen as a form of stochasticity (although better described as partial observability).
In most cases however, these behavioural parameters are simply initialized to a default value for every vehicle, and then everything is properly deterministic.
Hi, thanks a lot for the detailed and quick response! I'm thinking of adding some form of stochasticity, either by adding some friction or by any other means (maybe some real world stochasticity 🤔). What are your views on this? Also, how should I proceed to implement it. Thanks again.
For friction:
Other sources of stochasticity:
For instance, you could modify this line from the vehicle kinematics:
and add a random disturbance term, such as a linear friction term with a random coefficient:
alpha = self.road.np_random.uniform(low=0.2, high=0.3)
self.speed += self.action['acceleration'] * dt - alpha * self.speed * dt
Hi, My question was how can we make the environments Infinite Horizon.
Reply from @eleurent:
Further, in the Highway env, I removed the duration constrain here, and the environment resets only after collision. Though it is a Infinite-Horizon, but I am not sure if it's a good thing to try since after collision I will have to reset the environment.
Racetrack is also a good option to try out but here once again after collision we will have to reset the environment.
I have few other question:
Thanks! Looking forward to your reply @eleurent.