Git Product home page Git Product logo

Comments (5)

maximecb avatar maximecb commented on June 23, 2024

Hi Suman,

The empty environment is implemented here: https://github.com/maximecb/gym-minigrid/blob/master/gym_minigrid/envs/empty.py

The rest of the logic you are looking for is in minigrid.py: https://github.com/maximecb/gym-minigrid/blob/master/gym_minigrid/minigrid.py

In particular, the process_vis function computes a visibility mask, the cells that are visible to the agent. It basically propagates visibility forward until a wall or closed door is hit.

For moving obstacles, if you just want one environment, I would suggest overriding the step function in your new environment class. Keep track of your moving object, and update its position using self.grid.set(i, j, object). Since the motion of your obstacle is random, you will likely want to use the self.env._rand_int() method. This will ensure that you always get the same behavior in your environment given the same seed.

Let me know if you have any other questions.

from minigrid.

Suman7495 avatar Suman7495 commented on June 23, 2024

Thank you for your perfect guidelines.

I was able to successfully add a new environment with Dynamic Obstacles. This environment will be used for research at TU Darmstadt testing novel RL algorithms for mobile robot navigation with dynamic obstacles. Here is the link to the branch. I have added a short description of the environment in the README under the section of "Dynamic obstacles environment".

It may be useful to merge this branch with the master for future robotics research.

Thank you.

from minigrid.

maximecb avatar maximecb commented on June 23, 2024

Well done! I would be happy to merge it if you create a pull request :)

from minigrid.

Suman7495 avatar Suman7495 commented on June 23, 2024

I will do it soon. I just found a small bug. I'll rectify it and get back to you.

from minigrid.

Suman7495 avatar Suman7495 commented on June 23, 2024

I have created the pull request :)

from minigrid.

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.