deep rts
1.0.0
DeepRTS 是一款用於強化學習研究的高效能即時策略遊戲。它是為了提高效能而用 C++ 編寫的,但提供了一個 python 接口,以便更好地與機器學習工具包互動。深度 RTS 可以每秒超過6,000,000步處理遊戲,渲染圖形時可以達到2,000,000步。與《星海爭霸》等其他解決方案相比,在配備 Nvidia RTX 2080 TI 的英特爾 i7-8700k 上運行的模擬時間快了 15 000%以上。
Deep RTS 的目標是透過減少運算時間,為 RTS AI 研究帶來更實惠、更永續的解決方案。
建議對環境的最新(通常也是最好)版本使用主分支。我非常感謝任何有關改善環境的意見。
在您的工作中使用此內容時,請使用以下引用!
@INPROCEEDINGS{8490409,
author={P. {Andersen} and M. {Goodwin} and O. {Granmo}},
booktitle={2018 IEEE Conference on Computational Intelligence and Games (CIG)},
title={Deep RTS: A Game Environment for Deep Reinforcement Learning in Real-Time Strategy Games},
year={2018},
volume={},
number={},
pages={1-8},
keywords={computer games;convolution;feedforward neural nets;learning (artificial intelligence);multi-agent systems;high-performance RTS game;artificial intelligence research;deep reinforcement learning;real-time strategy games;computer games;RTS AIs;Deep RTS game environment;StarCraft II;Deep Q-Network agent;cutting-edge artificial intelligence algorithms;Games;Learning (artificial intelligence);Machine learning;Planning;Ground penetrating radar;Geophysical measurement techniques;real-time strategy game;deep reinforcement learning;deep q-learning},
doi={10.1109/CIG.2018.8490409},
ISSN={2325-4270},
month={Aug},}
sudo pip3 install git+https://github.com/cair/DeepRTS.git
git clone https://github.com/cair/deep-rts.git
cd deep-rts
git submodule sync
git submodule update --init
sudo pip3 install .
10x10-2-FFA
15x15-2-FFA
21x21-2-FFA
31x31-2-FFA
31x31-4-FFA
31x31-6-FFA
深度 RTS 的特點是預先建立的迷你遊戲場景。這些迷你遊戲非常適合訓練代理執行特定任務,或測試不同問題設定中的演算法。使用場景的好處是,您可以使用每個標準根據任務的完成情況輸出獎勵/懲罰訊號的標準來簡單地設計獎勵函數。任務範例如下:
Deep RTS目前實現了以下場景
GoldCollectFifteen
GeneralAIOneVersusOne
import random
from DeepRTS . python import Config
from DeepRTS . python import scenario
if __name__ == "__main__" :
random_play = True
episodes = 100
for i in range ( episodes ):
env = scenario . GeneralAI_1v1 ( Config . Map . THIRTYONE )
state = env . reset ()
done = False
while not done :
env . game . set_player ( env . game . players [ 0 ])
action = random . randrange ( 15 )
next_state , reward , done , _ = env . step ( action )
state = next_state
if ( done ):
break
env . game . set_player ( env . game . players [ 1 ])
action = random . randrange ( 15 )
next_state , reward , done , _ = env . step ( action )
state = next_state