GithubHelp home page GithubHelp logo

Comments (3)

Theohhhu avatar Theohhhu commented on May 27, 2024

It appears that the issue may be related to differences between versions of Ray/RLlib, which are not backward and forward compatible. I recommend transitioning to at least version 1.8, which is the foundation of MARLlib. Additionally, transferring an algorithm from our framework to yours might be a challenging task.

from marllib.

huigeopencv avatar huigeopencv commented on May 27, 2024

The version I am using is ray1.8.0. I guess it is because of my training environment problem and it should be incompatible. But I really don’t have a clue to DEBUG

from marllib.

Aequatio-Space avatar Aequatio-Space commented on May 27, 2024

Since you want to use the algorithm of MARLlib, I guess you may need to override the abstract class MultiAgentEnv provided by ray, or write a wrapper for the algorithm to work. Also, try to adhere implementation example from add_new_env.py, which will ensure interfaces are correctly matched.

class RLlibMAGym(MultiAgentEnv):
def __init__(self, env_config):
map = env_config["map_name"]
env_config.pop("map_name", None)
self.env = REGISTRY[map](**env_config)
# assume all agent same action/obs space
self.action_space = self.env.action_space[0]
self.observation_space = GymDict({"obs": Box(
low=0.0,
high=1.0,
shape=(self.env.observation_space[0].shape[0],),
dtype=np.dtype("float64"))})
self.agents = ["red_0", "blue_0"]
self.num_agents = len(self.agents)
env_config["map_name"] = map
self.env_config = env_config

from marllib.

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.