该仓库包含以下算法的分布式实现:
[1]深神经进化:遗传算法是培训深度神经网络的竞争替代方案
[2]改善通过寻求新颖的代理商进行深入强化学习的进化策略的探索
我们的代码基于Openai的代码,我们感谢谁。可以在此处找到来自OpenAI的原始代码和相关论文。该存储库已经过修改以同时运行ES和我们的算法,包括我们在本地和AWS上的深遗传算法(DeepGA)。
注意:类人动物实验取决于木叶家。请提供您自己的Mujoco许可证和二进制文件
描述这些论文的文章可以在此处找到
文件夹./visual_inspector包含葡萄藤的实现,即神经进化视觉检查器,这是一种用于神经进化的交互式数据可视化工具。有关运行和自定义可视化的进一步说明,请参阅该文件夹中的README.md 。可以在此处找到一篇描述此可视化工具的文章。
文件夹./gpu_implementation包含一个更有效地使用GPU的实现。有关更多说明,请参阅该文件夹中的README.md 。
克隆回购
git clone https://github.com/uber-common/deep-neuroevolution.git
创建Python3虚拟env
python3 -m venv env
. env/bin/activate
安装要求
pip install -r requirements.txt
如果您打算使用Mujoco Env,请确保遵循有关如何正确安装Mujoco的Readme
启动Redis
. scripts/local_run_redis.sh
启动样品ES实验
. scripts/local_run_exp.sh es configurations/frostbite_es.json # For the Atari game Frostbite
. scripts/local_run_exp.sh es configurations/humanoid.json # For the MuJoCo Humanoid-v1 environment
启动样品NS-ES实验
. scripts/local_run_exp.sh ns-es configurations/frostbite_nses.json
. scripts/local_run_exp.sh ns-es configurations/humanoid_nses.json
启动样品NSR-ES实验
. scripts/local_run_exp.sh nsr-es configurations/frostbite_nsres.json
. scripts/local_run_exp.sh nsr-es configurations/humanoid_nsres.json
启动样品GA实验
. scripts/local_run_exp.sh ga configurations/frostbite_ga.json # For the Atari game Frostbite
启动样本随机搜索实验
. scripts/local_run_exp.sh rs configurations/frostbite_ga.json # For the Atari game Frostbite
通过运行策略文件可视化结果
python -m scripts.viz 'FrostbiteNoFrameskip-v4' <YOUR_H5_FILE>
python -m scripts.viz 'Humanoid-v1' <YOUR_H5_FILE>
额外的文件夹包含https://arxiv.org/abs/1712.06560中使用的欺骗性陷阱域的人形运动的XML规范文件。在健身房中使用此XML文件来重新创建环境。
您还可以使用Docker和Docker-Compose在Docker容器中运行代码。
有关Docker的简介,请参见https://docs.docker.com/get-started/。
另请参见https://docs.docker.com/compose/overview/有关Docker-Compose的简介。
克隆回购并输入目录。
git clone https://github.com/uber-common/deep-neuroevolution.git
cd deep-neuroevolution
启动启动REDIS实例的容器,如果需要,请使用Sudo,另请参阅此页面。
sudo docker-compose up
在容器中打开第二个终端会话。
sudo docker exec -it deepneuro /bin/bash
如上所述开始您选择的实验。例如
cd ~/deep-neuroevolution/
. scripts/local_run_exp.sh es configurations/frostbite_es.json