Giter Site home page Giter Site logo

Comments (9)

AizazSharif avatar AizazSharif commented on June 1, 2024 1

Hi @praveen-palanisamy,
Thanks for the help. I will go through the instructions and will update here soon. I asked about the Adversarial example since it's mentioned in the naming convention by the name 'Advrs'.

In urban driving through a signalized intersection scenario I wanted to ask if the multi-agents training are done through shared policy or separate. I am interested in working on separate policy training.

from macad-gym.

praveen-palanisamy avatar praveen-palanisamy commented on June 1, 2024 1

Yes, you could use separate policies for each of the agents.

An example where different policy parameters are used for each Car actor is available in the MACAD-Agents repository. It's implemented using Ray and specifically, the following lines shows how you could use different policy parameters for each of the agents:

https://github.com/praveen-palanisamy/macad-agents/blob/c7e48dd3dd1b9ce10dd5d52fc940300e3e328d67/src/macad_agents/rllib/impala_agent_independent.py#L312-L319

                "multiagent": {
                    "policy_graphs": {
                        id: default_policy()
                        for id in env_actor_configs["actors"].keys()
                    },
                    "policy_mapping_fn":
                    tune.function(lambda agent_id: agent_id),
                },

You can also use a custom/different Deep RL algorithm for each or the agents to train the policy.

from macad-gym.

AizazSharif avatar AizazSharif commented on June 1, 2024 1

This is great thanks a lot for the help @praveen-palanisamy. Hopefully, I am able to do this before I create a feature pull request.

from macad-gym.

praveen-palanisamy avatar praveen-palanisamy commented on June 1, 2024 1

Hey @AizazSharif ,
The Agent code which include the Deep RL policy implementation is kept out of the learning environment code MACAD-Gym to allow for modularity and plug-and-play with other RL libraries or RL environments. As you figured, sample Agent training scripts are provided in the MACAD-Agents repository.
MACAD-Agents works with MACAD-Gym and you can change the Deep RL Agent algorithms or policy definitions in MACAD-Agents repository.
Hope that helps.

from macad-gym.

praveen-palanisamy avatar praveen-palanisamy commented on June 1, 2024

Hi @AizazSharif ,

An adversarial scenario was not explicitly evaluated/studied in the paper but it is easy to add one to MACAD-Gym.

  1. Sample guide to create and new learning environment or scenario. This gives you the list of changes to create your own custom MACAD-Gym environment with a custom scenario.
  2. Specifically for the adversarial multi-agent environment you are interested in, you can re-use this urban driving through a signalized intersection scenario where 3 cars are crossing the intersection. To make the Actor car2 behave adversarially to the car1 Actor for example, you could change the following reward function spec for car2:

    to use your own custom reward function or simply create a negative version (mini-max's counter part) of car1's reward function.

For your reference, the Reward functions are implemented in reward.py.

I will be happy to help you if you need any further assistance in putting this together as a pull request.

from macad-gym.

AizazSharif avatar AizazSharif commented on June 1, 2024

Hi @praveen-palanisamy ,
I was going through the framework and was wondering how to change Deep RL policies within Macad-gym. It's visible in macad-agents (Impala, PPO) but I was unable to find it in macad-gym environments to add my own.

Any information would be helpful.
Thanks

from macad-gym.

AizazSharif avatar AizazSharif commented on June 1, 2024

Thanks for the reply @praveen-palanisamy.
I am facing trouble while using Macad-agent impala examples. Even if I lower the resources the code runs but the cars don't move at all in default settings and without any training or crash Carla restarts the environment. Whereas in macad-gym, the agents make actions, and also we can have 2nd window which shows the agent's POV from the front.

If you have any suggestions or pointer regarding this issue it will be really helpful.

Thanks.

from macad-gym.

praveen-palanisamy avatar praveen-palanisamy commented on June 1, 2024

Okay so that does sound to be specific to the the Impala Agent which has it's own resource requirements on top of the environment/CARLA. Since this is a different issue, can you open one on the MACAD-Agents repository to keep things organized?

from macad-gym.

praveen-palanisamy avatar praveen-palanisamy commented on June 1, 2024

@AizazSharif : If you need further assistance on the original topic (Help in creating Adversarial Environments), we can continue it as an Idea Discussion.

from macad-gym.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.