該倉庫包含以下算法的分佈式實現:
[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