-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
64 lines (45 loc) · 1.56 KB
/
__init__.py
File metadata and controls
64 lines (45 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import os
import sys
from gymnasium.envs.registration import register
__version__ = "1.10.1"
try:
from farama_notifications import notifications
if "MixTrafficSimulation" in notifications and __version__ in notifications["gymnasium"]:
print(notifications["MixTrafficSimulation"][__version__], file=sys.stderr)
except Exception: # nosec
pass
# Hide pygame support prompt
os.environ["PYGAME_HIDE_SUPPORT_PROMPT"] = "1"
def _register_highway_envs():
"""Import the envs module so that envs register themselves."""
from MixTrafficSimulation.envs.common.abstract import MultiAgentWrapper
register(
id="exit-v0",
entry_point="MixTrafficSimulation.envs.exit_env:ExitEnv",
)
register(
id="highway-v0",
entry_point="MixTrafficSimulation.envs.highway_env:HighwayEnv",
)
register(
id="intersection-v1",
entry_point="MixTrafficSimulation.envs.intersection_env:ContinuousIntersectionEnv",
)
register(
id="intersection-multi-agent-v1",
entry_point="MixTrafficSimulation.envs.intersection_env:MultiAgentIntersectionEnv",
additional_wrappers=(MultiAgentWrapper.wrapper_spec(),),
)
register(
id="merge-v0",
entry_point="MixTrafficSimulation.envs.merge_env:MergeEnv",
)
register(
id="roundabout-v0",
entry_point="MixTrafficSimulation.envs.roundabout_env:RoundaboutEnv",
)
register(
id="midblock",
entry_point="MixTrafficSimulation.envs.midblock_env:MidblockEnv",
)
_register_highway_envs()