agi-brain / xuance Goto Github PK
View Code? Open in Web Editor NEWXuanCe: A Comprehensive and Unified Deep Reinforcement Learning Library
Home Page: https://xuance.readthedocs.io/
License: MIT License
XuanCe: A Comprehensive and Unified Deep Reinforcement Learning Library
Home Page: https://xuance.readthedocs.io/
License: MIT License
不好意思打扰了,我目前只在官方文档中找到了一些简短的教程。请问是否有关于自定义环境的更详细教程?另外,能否请教一下如何将自定义环境与算法绑定并运行?非常感谢!
https://xuance.readthedocs.io/zh/latest/documents/api/environments.html#/id2
希望增加对这些类型的支持。
现阶段一定要用这些类型的话,用pettingzoo环境可以吗?
FileNotFoundError: Could not find module 'E:\PycharmProjects\xuanpolicy-master\xuanpolicy\environment\magent2\magent.dll' (or one of its dependencies). Try using the full path with constructor syntax.
When I run a demo of Atari after correctly installing xuance, it raises an error:
raise error.NameNotFound( gym.error.NameNotFound: Environment Pong doesn't exist in namespace ALE.
In a multi-agent setting, when training e.g. MAPPO_Agents()
, then calling MAPPO_Agents.save_model(model_name='model.pth')
and finally loading the model MAPPO_Agents.load_model(path)
, how can I extract specific policies out of the model? e.g. when 3 agents were trained, "agent_1", "agent_2" and "agent_3", I would like to have the prediction only of a specific agent.
I didn't find out how to exactly do that and would be very thankful for any help.
@wenzhangliu 当我把magent2 adversarial_pursuit_v4环境改为battle_v4环境后 运行到第三轮会出现这个错误 请问该如何解决
您好,出现这个错误是因为当前版本没考虑到Windows系统下,magent2环境的动态链接库文件。您可以试着安装一下这个环境,再看是否还会出现该错误?
pip install magent2
我们后期会修补这个问题,感谢您的反馈!
Originally posted by @wenzhangliu in #7 (comment)
When install xuance via pip install xuance
from PyPI or pip install -e .
from github, it raises the following errors:
o: undefined reference to `opal_bitmap_t_class'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_info_set_value_enum'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_hash_table_get_first_key_uint32'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `mca_base_component_list_item_t_class'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_infosubscribe_change_info'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `orte_info_register_framework_params'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `mca_base_framework_open'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `orte_session_dir_cleanup'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_info_show_opal_version'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_datatype_add'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_class_finalize'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `mca_base_var_group_get_count'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_datatype_resize'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_hash_table_set_value_uint64'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `MPIR_being_debugged'
/home/wzliu/anaconda3/envs/xuance_py39/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `opal_list_t_class'
collect2: error: ld returned 1 exit status
failure.
removing: _configtest.c _configtest.o
error: Cannot link MPI programs. Check your configuration!!!
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mpi4py
Building wheel for pathtools (setup.py) ... done
Created wheel for pathtools: filename=pathtools-0.1.2-py3-none-any.whl size=8791 sha256=8dadb41a5d290b4f741fe5ecb16f6cb7b6d0cc7686410acdae435ce4c66f92b6
Stored in directory: /home/wzliu/.cache/pip/wheels/b7/0a/67/ada2a22079218c75a88361c0782855cc72aebc4d18d0289d05
Successfully built gym moviepy pathtools
Failed to build mpi4py
ERROR: Could not build wheels for mpi4py, which is required to install pyproject.toml-based projects
Hi,
I want to use the custom environment, I created a new environment following the steps in the document, the observation is defined as Dict type, but I got an error:
Traceback (most recent call last):
File "/data/projects/20240628/xuance/procthor_ppo.py", line 18, in <module>
runner = get_runner(method=parser.method,
File "/data/projects/20240628/xuance/xuance/common/common_tools.py", line 243, in get_runner
runner = REGISTRY_Runner[args.runner](args)
File "/data/projects/20240628/xuance/xuance/torch/runners/runner_drl.py", line 27, in __init__
self.agent = REGISTRY_Agents[self.config.agent](self.config, self.envs)
File "/data/projects/20240628/xuance/xuance/torch/agents/policy_gradient/ppoclip_agent.py", line 32, in __init__
self.policy = self._build_policy()
File "/data/projects/20240628/xuance/xuance/torch/agents/policy_gradient/ppoclip_agent.py", line 60, in _build_policy
representation = self._build_representation(self.config.representation, self.config)
File "/data/projects/20240628/xuance/xuance/torch/agents/agent.py", line 192, in _build_representation
representation = REGISTRY_Representation["Basic_MLP"](
File "/data/projects/20240628/xuance/xuance/torch/representations/mlp.py", line 41, in __init__
self.model = self._create_network()
File "/data/projects/20240628/xuance/xuance/torch/representations/mlp.py", line 47, in _create_network
mlp, input_shape = mlp_block(input_shape[0], h, self.normalize, self.activation, self.initialize,
KeyError: 0
The value of the input_shape is:{'rgb': (3, 480, 640), 'semantic': (3, 480, 640)}
and the error shows that the network can not parse input_shape correctly.
Can you help me to solve this problem?
Thanks
R了个T~
想基于这个框架加自己的算法具体需要修改哪些内容呢?
测试代码:
import xuance
runner = xuance.get_runner(method='dqn',
env='classic_control',
env_id='CartPole-v1',
is_test=False)
runner.run()
报错:
test_dqn.py:None (test_dqn.py)
test_dqn.py:6: in
runner.run()
xuance\torch\runners\runner_drl.py:93: in run
self.agent.save_model("final_train_model.pth")
xuance\torch\agents\agent.py:90: in save_model
self.learner.save_model(model_path)
xuance\torch\learners\learner.py:25: in save_model
torch.save(self.policy.state_dict(), model_path)
C:\Users\G11.conda\envs\xuance_env\lib\site-packages\torch\serialization.py:422: in save
with _open_zipfile_writer(f) as opened_zipfile:
C:\Users\G11.conda\envs\xuance_env\lib\site-packages\torch\serialization.py:309: in _open_zipfile_writer
return container(name_or_buffer)
C:\Users\G11.conda\envs\xuance_env\lib\site-packages\torch\serialization.py:287: in init
super(_open_zipfile_writer_file, self).init(torch._C.PyTorchFileWriter(str(name)))
E RuntimeError: Parent directory E:\JYC_CODE\强化学习\xuance./models/dqn does not exist.
collected 0 items / 1 error
是由于Windows系统下文件路径和Linux文件路径不一致导致的么?请问应该如何解决?谢谢~
目前在文档中看到本项目实现了非常丰富的智能体模型算法,以及不同类型Env的适配,但是好像具体的benchmark试验结果汇总比较有限,存在大量的结果缺失,例如Atari、MPE、MAgent等均无试验结果展示,仅有的Mujoco试验结果也不是很完整,仅包含DDPG、TD3、A2C、PPO四个算法,而且没有区分PyTorch、TF、MindSpore不同底层框架实现。
I am trying to run your examples of mpe_mappo and football_qmix but I am getting errors when purely running your examples.
For MAPPO MPE with simple_spread_v3:
File "venv_xuan/lib/python3.9/site-packages/xuance/torch/agents/agents_marl.py", line 45, in __init__ self.n_agents = config.n_agents AttributeError: 'Namespace' object has no attribute 'n_agents'
For QMIX GRF:
File "venv_xuan/lib/python3.9/site-packages/xuance/environment/__init__.py", line 29, in make_envs raise AttributeError(f"The vectorizer {config.vectorize} is not implemented.") AttributeError: The vectorizer Subproc_Football is not implemented.
I would highly appreciate your assistance! I have Python3.9 and gym 0.26.2.
刘老师您好,我是一名多智能体强化学习的初学者,在尝试运行您发布的xuance框架时,选择的是tensorflow+gpu,遇到了如下报错,
Traceback (most recent call last):
File "C:\Users\50\Desktop\MADRLTEST\main.py", line 5, in
is_test=False)
File "F:\anaconda\envs\xpolicy\lib\site-packages\xuanpolicy\common\common_tools.py", line 121, in get_runner
from xuanpolicy.tensorflow.runners import REGISTRY as run_REGISTRY
File "F:\anaconda\envs\xpolicy\lib\site-packages\xuanpolicy\tensorflow\runners_init_.py", line 1, in
from .runner_drl import Runner_DRL as DRL_runner
File "F:\anaconda\envs\xpolicy\lib\site-packages\xuanpolicy\tensorflow\runners\runner_drl.py", line 2, in
from xuanpolicy.tensorflow.agents import get_total_iters
File "F:\anaconda\envs\xpolicy\lib\site-packages\xuanpolicy\tensorflow\agents_init_.py", line 36, in
from .policy_gradient.pdqn_agent import PDQN_Agent
File "F:\anaconda\envs\xpolicy\lib\site-packages\xuanpolicy\tensorflow\agents\policy_gradient\pdqn_agent.py", line 6, in
class PDQN_Agent(Agent):
File "F:\anaconda\envs\xpolicy\lib\site-packages\xuanpolicy\tensorflow\agents\policy_gradient\pdqn_agent.py", line 12, in PDQN_Agent
device: str = 'cpu'):
NameError: name 'Toy_Env' is not defined
报错称这个toy_env没有得到定义,我不太清楚代码本身的含义,看到报错中的device: str = 'cpu'也尝试修改成了gpu,并没有起作用,请问我应该怎么修改代码?或者是否是我在环境安装的某个节点出现了问题?
恳请您百忙之中抽空查看我的问题,万分感谢!
i completely followed the installation, Step1-3, then pip install xuanpolicy[torch], but when i import xuanpolicy, it came to "from mpi4py import MPI " and error "ImportError: DLL load failed: 找不到指定的模块。", What's going on ?
在new_env_mas.py文件中,self.state_space = Box(low=0, high=1, shape=[self.dim_state, ], dtype=np.float32, seed=self.seed)这句代码是定义智能体的状态空间。但是这样的话每个智能体的观测就都是一样的对吧。假如我现在有两个智能体,观测是给定的两列数据,也就是每个智能体的观测都对应一列数据,那这样的话每个智能体的观测范围就是不一致的。比如:
obs_space1 = Box(low=self.data1.min(), high=self.data1.max(), shape=(self.dim_obs,), dtype=np.float32, seed=self.seed)
obs_space2 = Box(low=self.data2.min(), high=self.data2.max(), shape=(self.dim_obs,), dtype=np.float32, seed=self.seed)
那请问这样的智能体该如何在new_env_mas.py文件中定义观测空间呢?
Many thanks.
FileNotFoundError Traceback (most recent call last)
in <cell line: 1>()
----> 1 runner = xp.get_runner(method='maddpg',
2 env='mpe',
3 env_id='simple_spread',
4 is_test=False)
2 frames
/usr/local/lib/python3.10/dist-packages/xuanpolicy/common/common_tools.py in get_config(file_name)
22
23 def get_config(file_name):
---> 24 with open(file_name, "r") as f:
25 try:
26 config_dict = yaml.load(f, Loader=yaml.FullLoader)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.10/dist-packages/xuanpolicy/configs/maddpg/mpe/simple_spread.yaml'
python benchmark.py
Calculating device: cpu
Deep learning toolbox: PyTorch.
Algorithm: DQN
Environment: Atari
Scenario: Breakout-v4
A.L.E: Arcade Learning Environment (version 0.7.5+db37282)
[Powered by Stella]
/home/pillar/anaconda3/envs/xuance_env/lib/python3.7/site-packages/gym/utils/passive_env_checker.py:32: UserWarning: WARN: A Box observation space has an unconventional shape (neither an image, nor a 1D vector). We recommend flattening the observation to have only a 1D vector or use a custom policy to properly process the data. Actual observation shape: (210, 160)
"A Box observation space has an unconventional shape (neither an image, nor a 1D vector). "
请问什么版本才有breakoutv5, 当前版本运行会如下有报错
运行qmix_sc2.py时报错:
Traceback (most recent call last):
File "qmix_sc2.py", line 377, in
runner = Runner(args)
File "qmix_sc2.py", line 70, in init
self.envs = make_envs(args)
File "/home/ustc-lc1/miniconda3/envs/env_ywk/lib/python3.7/site-packages/xuance/environment/init.py", line 66, in make_envs
raise NotImplementedError
NotImplementedError
您好,这是版本不兼容的问题吗?
A.L.E: Arcade Learning Environment (version 0.8.1+53f58b7)
[Powered by Stella]
D:\Anaconda\envs\pycarla\lib\site-packages\gym\utils\passive_env_checker.py:32: UserWarning: WARN: A Box observation space has an unconventional shape (neither an image, nor a 1D vector). We recommend flattening the observation to have only a 1D vector or use a custom policy to properly process the data. Actual observation shape: (210, 160)
"A Box observation space has an unconventional shape (neither an image, nor a 1D vector). "
Traceback (most recent call last):
File "D:\CODE\TrafficBigData\ReinforcementLearning\xuance-master\test.py", line 7, in
is_test=False)
File "D:\CODE\TrafficBigData\ReinforcementLearning\xuance-master\xuance\common\common_tools.py", line 166, in get_runner
runner = run_REGISTRYargs[0].runner if type(args) == list else run_REGISTRYargs.runner
File "D:\CODE\TrafficBigData\ReinforcementLearning\xuance-master\xuance\torch\runners\runner_drl.py", line 21, in init
super(Runner_DRL, self).init(self.args)
File "D:\CODE\TrafficBigData\ReinforcementLearning\xuance-master\xuance\torch\runners\runner_basic.py", line 11, in init
self.envs = make_envs(args)
File "D:\CODE\TrafficBigData\ReinforcementLearning\xuance-master\xuance\environment_init_.py", line 68, in make_envs
return REGISTRY_VEC_ENV[config.vectorize]([thunk for _ in range(config.parallels)])
File "D:\CODE\TrafficBigData\ReinforcementLearning\xuance-master\xuance\environment\gym\gym_vec_env.py", line 233, in init
super(DummyVecEnv_Atari, self).init(env_fns)
File "D:\CODE\TrafficBigData\ReinforcementLearning\xuance-master\xuance\environment\gym\gym_vec_env.py", line 158, in init
self.envs = [fn() for fn in env_fns]
File "D:\CODE\TrafficBigData\ReinforcementLearning\xuance-master\xuance\environment\gym\gym_vec_env.py", line 158, in
self.envs = [fn() for fn in env_fns]
File "D:\CODE\TrafficBigData\ReinforcementLearning\xuance-master\xuance\environment_init.py", line 58, in _thunk
config.obs_type, config.frame_skip, config.num_stack, config.img_size, config.noop_max)
File "D:\CODE\TrafficBigData\ReinforcementLearning\xuance-master\xuance\environment\gym\gym_env.py", line 123, in init
self.max_episode_length = self.env._max_episode_steps
File "D:\Anaconda\envs\pycarla\lib\site-packages\gym\core.py", line 240, in getattr
raise AttributeError(f"accessing private attribute '{name}' is prohibited")
AttributeError: accessing private attribute '_max_episode_steps' is prohibited
老师好,首先向您的工作致以敬意!
当所有env都done时,会运行到这句代码:位于xuance/torch/runners/runner_pettingzoo.py文件的第219-220行,
if done_n[h][i_env].all():
mas_group.memory.finish_path(0.0, i_env)
这个被置为0.0的值会引发位于xuance/common/memory_tools_marl.py文件中,finish_path()
函数中该语句的报错:
vs = np.append(np.array(self.data['values'][i_env, path_slice]), [value], axis=0)
报错内容为:ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 3 dimension(s) and the array at index 1 has 1 dimension(s)
为了解决这个维数不匹配的问题,需要在vs = np.append(...)
语句之前添加:
if value == 0.0:
value = [[0.0]]
如此即可解决这个问题。
Hello, are you considering adding some communication based MARL algorithms to xuance? For example, CommNet, IC3Net, I2C, etc.
怎么才能调整两个不同智能体输出的动作范围,而且给两个智能体动作加不同大小的噪声
git show
Date: Sat Jun 8 23:49:32 2024 +0800
用pip install -e .安装后, 执行mappo_simple_spread.py报错如下
Traceback (most recent call last):
File "I:\workc\MyWorkSource\wk\study\xuance\examples\mappo\mappo_simple_spread.py", line 289, in
runner = Runner(args)
File "I:\workc\MyWorkSource\wk\study\xuance\examples\mappo\mappo_simple_spread.py", line 72, in init
self.agent_keys = self.args.agent_keys = self.envs.agent_keys[0]
AttributeError: 'DummyVecMultiAgentEnv' object has no attribute 'agent_keys'
查看DummyVecMultiAgentEnv源码没有agent_keys相关, 本人小白, 想学习mappo, 希望作者帮忙解决一下。
用pip install xuance安装后跑文档里的快速开始例子没有问题
import xuance
runner = xuance.get_runner(method='mappo',
env='mpe',
env_id='simple_spread_v3',
is_test=True)
runner.run()
里面用的vectorize='Dummy_Pettingzoo'; 不知和DummyVecMultiAgentEnv有什么区别?
Hello, I like this library quite a bit - it's been very useful so far. I've been aiming to produce a set of benchmark solutions to the MPE environments using it, but I've run into an issue with asymmetrical environments struggling to perform right under MPE. When testing Simple-Speaker-Listener, the listener moves to the center of the landmarks, rather than to the landmark indicated.
Compounding the strangeness is the fact that simple_reference is solved quite cleanly. I'm currently running on version 1.7, with the following training code:
import xuanpolicy as xp
import torch
# Reference, SSL, World_Comm
from pettingzoo.mpe import simple_reference_v3, simple_speaker_listener_v4, simple_world_comm_v3, simple_spread_v3, simple_push_v3
import imageio
from IPython import display
import types
import os
import numpy as np
from collections import defaultdict
device = 'cuda' if torch.cuda.is_available() else 'cpu'
env_type = simple_speaker_listener_v4
env = env_type.parallel_env(max_cycles=25, continuous_actions=True, render_mode="rgb_array")
asymmetric = True # We train one agent if symmetrical, multiple otherwise.
agent_name = 'maddpg' if not asymmetric else ['maddpg'] * len(env.observation_spaces)
env_class_name = env_type.__name__.split('.')[-1]
env_name = f"{'_'.join(env_class_name.split('_')[:-1])}"
cpath = f'/usr/local/lib/python3.10/dist-packages/xuanpolicy/configs/maddpg/mpe/{env_name}.yaml'
runner = xp.get_runner(agent_name=agent_name, env_name=f"mpe/{env_name}", is_test=False)
The configuration I'm using is as follows - it's identical to the config file used to train simple_reference successfully, save for the name of the environment.
agent: "MADDPG" # the learning algorithms_marl
env_name: "mpe"
env_id: "simple_speaker_listener_v4"
continuous_action: True
policy: "MADDPG_policy"
representation: "Basic_Identical"
vectorize: "Dummy_MAS"
runner: "MARL"
representation_hidden_size: [32, ] # the units for each hidden layer
actor_hidden_size: [256, ]
critic_hidden_size: [256, ]
activation: 'ReLU'
activation_action: 'sigmoid'
lr_a: 0.01 # learning rate for actor
lr_c: 0.001 # learning rate for critic
tau: 0.001 # soft update for target networks
sigma: 0.1 # random noise for continuous actions
clip_grad: 0.5
buffer_size: 200000
batch_size: 256
gamma: 0.95 # discount factor
training_steps: 30000
training_frequency: 1
n_tests: 5
test_period: 100
consider_terminal_states: False # if consider the terminal states when calculate target Q-values.
use_obsnorm: False
use_rewnorm: False
obsnorm_range: 5
rewnorm_range: 5
logdir: "./logs/maddpg/"
modeldir: "./models/maddpg/"
Is there something that I've configured incorrectly? Similar settings seemed to work in the original MADDPG paper.
Hi,
I just installed xuance and was trying foloowing example from the kickstart.
import xuance
runner = xuance.get_runner(method='maddpg',
env='mpe',
env_id='simple_spread_v3',
is_test=False)
runner.run()
However I get the following error in xuance/torch/init.py:1
from torch import Tensor
ImportError: cannot import name 'Tensor' from 'torch' (unknown location)
Do you know why I am having this error. Any help would be greatly appreciated.
Thanks,
Vanshaj
运行测试用例
import xuance
runner = xuance.get_runner(method='dqn',
env='classic_control',
env_id='CartPole-v1',
is_test=False)
runner.run()
正常完成训练,但将is_test
改为True
后运行,则报错:
Traceback (most recent call last):
File "E:\Reinforcement Learning\xuance\cartpole.py", line 7, in <module>
runner.run()
File "D:\Anaconda\envs\xuance\lib\site-packages\xuance\torch\runners\runner_drl.py", line 85, in run
self.agent.load_model(self.agent.model_dir_load, self.args.seed)
File "D:\Anaconda\envs\xuance\lib\site-packages\xuance\torch\agents\agent.py", line 93, in load_model
self.learner.load_model(path, seed)
File "D:\Anaconda\envs\xuance\lib\site-packages\xuance\torch\learners\learner.py", line 38, in load_model
model_path = os.path.join(path, model_names[-1])
IndexError: list index out of range
环境:windows 10,xuance 1.0.10,torch 1.13.0+cu117
辛苦各位解答!
Many thanks. I just found 'SubprocVecEnv_Pettingzoo', and there is no code referencing 'SubprocVecEnv_Pettingzoo'.
Building wheel for box2d-py (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
Using setuptools (version 68.0.0).
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\Box2D
copying library\Box2D\Box2D.py -> build\lib.win-amd64-cpython-310\Box2D
copying library\Box2D_init_.py -> build\lib.win-amd64-cpython-310\Box2D
creating build\lib.win-amd64-cpython-310\Box2D\b2
copying library\Box2D\b2_init_.py -> build\lib.win-amd64-cpython-310\Box2D\b2
running build_ext
building 'Box2D._Box2D' extension
swigging Box2D\Box2D.i to Box2D\Box2D_wrap.cpp
swig.exe -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library\Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D\Box2D_wrap.cpp Box2D\Box2D.i
error: command 'swig.exe' failed: None
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for box2d-py
Running setup.py clean for box2d-py
Failed to build box2d-py
ERROR: Could not build wheels for box2d-py, which is required to install pyproject.toml-based projects
大佬您好,
文档首页有个小错误,
Ce (策) means policy in Chinse.
应该修改成
Ce (策) means policy in Chinese.
谢谢
运行MAPPO_MPE示例代码时,simple_spread_v3.yaml文件中没有规定agent的数量
When I was using the MADDPG example, I had an error replacing MADDPG_Agents with QMIX_Agents
mixer = QMIX_mixer(config.dim_state[0], config.hidden_dim_mixing_net, config.hidden_dim_hyper_net,
TypeError: 'NoneType' object is not subscriptable
I would like to know how to correctly use QMIX algorithm, hope the author can give an example, thank you
Traceback (most recent call last):
File "D:/code/DRL/xuance-master-1/examples/qmix/qmix_rware.py", line 311, in
runner = Runner(args)
File "D:/code/DRL/xuance-master-1/examples/qmix/qmix_rware.py", line 70, in init
self.envs = make_envs(args)
File "D:\code\DRL\xuance-master-1\xuance\environment_init_.py", line 129, in make_envs
return REGISTRY_VEC_ENV[config.vectorize]([thunk for _ in range(config.parallels)])
File "D:\code\DRL\xuance-master-1\xuance\environment\robotic_warehouse\robotic_warehouse_vec_env.py", line 6, in init
super(DummyVecEnv_RoboticWarehouse, self).init(env_fns)
File "D:\code\DRL\xuance-master-1\xuance\environment\new_env_mas\new_vec_env_mas.py", line 147, in init
self.envs = [fn() for fn in env_fns]
File "D:\code\DRL\xuance-master-1\xuance\environment\new_env_mas\new_vec_env_mas.py", line 147, in
self.envs = [fn() for fn in env_fns]
File "D:\code\DRL\xuance-master-1\xuance\environment_init.py", line 78, in _thunk
env = RoboticWarehouseEnv(config, render_mode=config.render_mode)
File "D:\code\DRL\xuance-master-1\xuance\environment\robotic_warehouse\robotic_warehouse_env.py", line 9, in init
self.env = gym.make(ENV_IDs[args.env_id])
File "D:\anaconda3\envs\xuance_env\lib\site-packages\gym\envs\registration.py", line 640, in make
env = env_creator(**_kwargs)
File "D:\anaconda3\envs\xuance_env\lib\site-packages\rware\warehouse.py", line 247, in init
self._use_slow_obs()
File "D:\anaconda3\envs\xuance_env\lib\site-packages\rware\warehouse.py", line 359, in _use_slow_obs
for _ in range(self.n_agents)
File "D:\anaconda3\envs\xuance_env\lib\site-packages\rware\warehouse.py", line 359, in
for _ in range(self.n_agents)
File "D:\anaconda3\envs\xuance_env\lib\site-packages\gym\spaces\multi_binary.py", line 44, in init
assert (np.asarray(input_n) > 0).all() # n (counts) have to be positive
AssertionError
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.