Skip to content

Commit

Permalink
Fix definition of "intersection-multi-agent-v1" with MultiAgentWrapper (
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts authored Aug 9, 2024
2 parents 7415379 + 9f536aa commit 0686b06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 3 additions & 1 deletion highway_env/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
os.environ["PYGAME_HIDE_SUPPORT_PROMPT"] = "1"

from gymnasium.envs.registration import register
from highway_env.envs.common.abstract import MultiAgentWrapper


def register_highway_envs():
Expand Down Expand Up @@ -56,7 +57,8 @@ def register_highway_envs():

register(
id="intersection-multi-agent-v1",
entry_point="highway_env.envs:TupleMultiAgentIntersectionEnv",
entry_point="highway_env.envs:MultiAgentIntersectionEnv",
additional_wrappers=(MultiAgentWrapper.wrapper_spec(),),
)

# lane_keeping_env.py
Expand Down
5 changes: 1 addition & 4 deletions highway_env/envs/intersection_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np

from highway_env import utils
from highway_env.envs.common.abstract import AbstractEnv, MultiAgentWrapper
from highway_env.envs.common.abstract import AbstractEnv
from highway_env.road.lane import AbstractLane, CircularLane, LineType, StraightLane
from highway_env.road.regulation import RegulatedRoad
from highway_env.road.road import RoadNetwork
Expand Down Expand Up @@ -423,6 +423,3 @@ def default_config(cls) -> dict:
}
)
return config


TupleMultiAgentIntersectionEnv = MultiAgentWrapper(MultiAgentIntersectionEnv)

0 comments on commit 0686b06

Please sign in to comment.