Comments (5)
Hi @AizazSharif ,
Good to hear about your continued interest and experiments on top of macad-gym.
You did the right thing w.r.t macad-gym i.e, setting "discrete_actions": False
to make the environment use continuous action space. Now w.r.t the agent's policy, the policy network needs to generate continuous-valued actions of appropriate shape.
For example, you would create a PPO/DDPG policy with policy network's output and shape as ~ Box(2)
instead of Discrete(9)
.
Where the Box(2)
refers to two continuous valued outputs (one for steering, another for throttle).
From the error logs, it looks like the DDPG's critic network's concat operation is failing to concat tensors of different rank: ValueError: Shape must be rank 4 but is rank 2 for 'car1/critic/concat' (op: 'ConcatV2') with input shapes: [?,84,84,3], [?,8]
This operation is defined in RLLib's DDPG (ddpg_policy.py
) which you need to configure to generate actions of appropriate shape and range (using the example above).
Hope that helps.
from macad-gym.
Thanks for the reply @praveen-palanisamy. I will look into it and let you know.
from macad-gym.
I also wanted to ask whether it is possible to have one agent with discrete and another with continuous actions in a same driving scenario? @praveen-palanisamy
As an example, one car is trained using PPO and another using DDPG.
from macad-gym.
Hi @AizazSharif ,
Missed your new question until now. Yes, you can use different algorithms per agent/car. The RLLib example agents in the MACAD-Agents repository is a good starting point for Multi-Agent autonomous driving setting.
You can refer to this sample for a generic, PPO, DQN sample using RLLib
from macad-gym.
Hi @praveen-palanisamy
Thanks for the reply. I have looked at these examples but they have the same type of action space agents in an environment. I couldn't find any example implementation where both discrete and continuous agents are running in a multi-agent setting.
from macad-gym.
Related Issues (20)
- Increasing number of steps per episode/ iteration HOT 3
- Multiprocess pickle Problem HOT 3
- How to set the spectator on the agent HOT 1
- Does macad-gym support multi-agent algos training? HOT 2
- Also stuck in env.reset() in example HOT 3
- How to create communicating environment?
- How to visualize the learning environment? HOT 2
- Support the library HOT 3
- `multi_view_render` will pop new display window on each frame with latest version of Pygame HOT 6
- The latest pull request is incomplete HOT 3
- gym version will affect the usage of ray[rllib] HOT 2
- PathTracker generate wrong route HOT 2
- when I use urban_signal_intersection_3c env ,happen error,please help me HOT 8
- How to customize a learning environment? HOT 2
- How do we port an existing multi-agent leanring algorithm such as IDDPG, IPPO? HOT 4
- Communication Mechanism
- v0.1.3 carla serve can't get connection HOT 1
- Implement of IMPALA Agent Examples HOT 2
- No support for other sensors? HOT 2
- 'NoneType' object has no attribute 'pid'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from macad-gym.