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