Two Way¶
A risk management task: the agent is driving on a two-way road with oncoming traffic. It must balance making progress by overtaking slower vehicles and ensuring safety. These conflicting objectives are implemented by a reward signal and a constraint signal, in the CMDP/BMDP framework.
Usage¶
env = gym.make("two-way-v0")
Default configuration¶
{
"observation": {
"type": "TimeToCollision",
"horizon": 5,
},
"action": {
"type": "DiscreteMetaAction",
},
"collision_reward": 0,
"left_lane_constraint": 1,
"left_lane_reward": 0.2,
"high_speed_reward": 0.8,
}
More specifically, it is defined in:
- classmethod TwoWayEnv.default_config() dict[source]
Default environment configuration.
Can be overloaded in environment implementations, or by calling configure(). :return: a configuration dict
API¶
- class highway_env.envs.two_way_env.TwoWayEnv(config: dict = None, render_mode: str | None = None)[source]¶
A risk management task: the agent is driving on a two-way lane with icoming traffic.
It must balance making progress by overtaking and ensuring safety.
These conflicting objectives are implemented by a reward signal and a constraint signal, in the CMDP/BMDP framework.