Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to customize a learning environment? #84

Open
hjh0119 opened this issue Jun 1, 2023 · 2 comments
Open

How to customize a learning environment? #84

hjh0119 opened this issue Jun 1, 2023 · 2 comments
Labels
more-information-needed More information is needed to proceed

Comments

@hjh0119
Copy link

hjh0119 commented Jun 1, 2023

I'm a MARL learner. I want to customize a MARL learning environment based on macad-gym. How should I proceed?

@praveen-palanisamy
Copy link
Owner

Hi @hjh0119 ,
You can customize the existing multi-agent environments or create your own!

  1. To customize existing environments, you can edit the environment configuration to change the environment or actor parameters. For example, to customize the UrbanSignalIntersection3Car environment you can edit/modify these configuration values:

    USI3C_CONFIGS = {
    "env": {
    "server_map": "/Game/Carla/Maps/Town03",
    "render": True,
    "render_x_res": 800,
    "render_y_res": 600,
    "x_res": 168,
    "y_res": 168,
    "framestack": 1,
    "discrete_actions": True,
    "squash_action_logits": False,
    "verbose": False,
    "use_depth_camera": False,
    "send_measurements": False,
    "enable_planner": True,
    "spectator_loc": [70, -125, 9],
    "sync_server": True,
    "fixed_delta_seconds": 0.05,
    },
    "actors": {
    "car1": {
    "type": "vehicle_4W",
    "enable_planner": True,
    "convert_images_to_video": False,
    "early_terminate_on_collision": True,
    "reward_function": "corl2017",
    "scenarios": "SUIC3_TOWN3_CAR1",
    "manual_control": False,
    "auto_control": True,
    "camera_type": "rgb",
    "collision_sensor": "on",
    "lane_sensor": "on",
    "log_images": False,
    "log_measurements": False,
    "render": False,
    "render_x_res": 800,
    "render_y_res": 600,
    "x_res": 168,
    "y_res": 168,
    "use_depth_camera": False,
    "send_measurements": False,
    },
    "car2": {
    "type": "vehicle_4W",
    "enable_planner": True,
    "convert_images_to_video": False,
    "early_terminate_on_collision": True,
    "reward_function": "corl2017",
    "scenarios": "SUIC3_TOWN3_CAR2",
    "manual_control": False,
    "auto_control": True,
    "camera_type": "rgb",
    "collision_sensor": "on",
    "lane_sensor": "on",
    "log_images": False,
    "log_measurements": False,
    "render": False,
    "render_x_res": 800,
    "render_y_res": 600,
    "x_res": 168,
    "y_res": 168,
    "use_depth_camera": False,
    "send_measurements": False,
    },
    "car3": {
    "type": "vehicle_4W",
    "enable_planner": True,
    "convert_images_to_video": False,
    "early_terminate_on_collision": True,
    "reward_function": "corl2017",
    "scenarios": "SUIC3_TOWN3_CAR3",
    "manual_control": False,
    "auto_control": True,
    "camera_type": "rgb",
    "collision_sensor": "on",
    "lane_sensor": "on",
    "log_images": False,
    "log_measurements": False,
    "render": False,
    "render_x_res": 800,
    "render_y_res": 600,
    "x_res": 168,
    "y_res": 168,
    "use_depth_camera": False,
    "send_measurements": False,
    },
    },
    }

  2. To create your own environments, you can follow this Wiki Page on Extending MACAD-Gym with new learning environments

@praveen-palanisamy
Copy link
Owner

Hi @hjh0119 , would you need any more help to proceed or do you have any follow-up questions?

@praveen-palanisamy praveen-palanisamy added the more-information-needed More information is needed to proceed label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-information-needed More information is needed to proceed
Projects
None yet
Development

No branches or pull requests

2 participants