multiagent-particle-envs
multiagent-particle-envs copied to clipboard
Creating the boundary of the environment
We are trying to add boundaries to the environment, but when we check the code of the entity in core.py, there is only the size property, from our understanding, we can only create circle object. Are there any solutions to create other shape?
https://github.com/shariqiqbal2810/multiagent-particle-envs
Shariq has added walls in his version of MPE.
in environment.py there seem to be some chances to define range (low/high), please check. This is for action_spaces (forces)
u_action_space = spaces.Box(low=-agent.u_range, high=+agent.u_range, shape=(world.dim_p,), dtype=np.float32)
Furthurmore, for the environment shown while rendering, the below exists in rendering.py:
def set_bounds(self, left, right, bottom, top):
which is used in environment.py as below:
self.viewers[i].set_bounds(pos[0]-cam_range,pos[0]+cam_range,pos[1]-cam_range,pos[1]+cam_range)
but for setting a real boundary that confines agents during simulation, you should manipulate the done value returned by step function. Please refer to issue#10
We are trying to add boundaries to the environment, but when we check the code of the entity in core.py, there is only the size property, from our understanding, we can only create circle object. Are there any solutions to create other shape?
https://github.com/shariqiqbal2810/multiagent-particle-envs
Shariq has added walls in his version of MPE.
That's definitely great. Is there any way to make the walls visible to the agents, rather than being invisible entities that cannot be crossed?
@emanuelepesce did you manage to place the wall objects around the rendering window in order to limit the agents from running to infinity?
@Kimonili to limit the agents from running to infinity you can use the wall class defined by Shariq (multiagent) as suggested by @HassamSheikh .
I think you should open this issue on that repo rather than this.
On Fri, Oct 16, 2020 at 9:52 PM CHH3213 [email protected] wrote:
@emanuelepesce https://github.com/emanuelepesce when I use Shariq's MPE, it has an error: Traceback (most recent call last): File "train.py", line 264, in train(arglist) File "train.py", line 145, in train obs_n = env.reset() File "/home/caohuanhui/anaconda3/envs/py36/lib/python3.6/site-packages/gym/core.py", line 71, in reset raise NotImplementedError NotImplementedError how can I solve it?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openai/multiagent-particle-envs/issues/59#issuecomment-710724537, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSIP4MOZE76OD7XORYWVPDSLD2ETANCNFSM4JNGI5FA .
--
Regards Hassam Ullah Sheikh