toribash作为代理学习环境
torille的Python项目详细描述
托利叶
Toribash学习环境。额外的“L”让芬兰人更难忘(“Torille”=“to the marketplace”)。
Torille为学习代理提供了一个视频游戏Toribash的接口,这是一个类人格斗游戏。 Toribash为类似mujoco的类人控制提供了环境,特别是针对竞争性游戏。这使得 Torille适合自我游戏实验。
Torille提供了一个Python接口和一个带有各种任务的OpenAI健身房环境。以下白皮书包括使用torille进行的基线实验和基准测试:https://arxiv.org/abs/1807.10110
要求
在Windows10,Ubuntu16.04和MacOS10.13上运行。在python版本3.5和3.6上测试,可能在2.7上不起作用。
- numpy(Python)
- 文件锁(python)
- Wine(对于linux/macos。需要现代版本。在3.0.3上测试)
快速启动
如果您在Linux或MacOS上,请记住安装Wine。确保定义了wine
命令。
下面将下载带有精简版toribash的torille:
pip install torille
随机代理:
fromtorilleimportToribashControlfromtorille.utilsimportcreate_random_actions# Show gameplaytoribash=ToribashControl(draw_game=True)toribash.init()# Random agentwhile1:state,t=toribash.get_state()ift:breaktoribash.make_actions(create_random_actions())toribash.close()
OpenAI健身房环境:
importgymimporttorille.envsenv=gym.make("Toribash-DestroyUke-v0")# Show gameplayenv.set_draw_game(True)initial_state=env.reset()t=False# Random agentwhilenott:s,r,t,_=env.step(env.action_space.sample())env.close()
手动安装
您可以在不使用pypi/pip的情况下安装torille,方法如下:
- 安装Toribash
- 将
toribash-codes
的内容复制到toribash安装目录。覆盖文件- 注意:这将阻止将特定安装用作常规游戏。删除/重命名
profile.tbs
文件 恢复大部分更改并再次正常使用游戏。 - note2:从toribash 5.4/steam版本的toribash开始,设置文件存储在用户目录下
Saved Games/Toribash/custom.cfg
。toribash在默认情况下加载这个文件,如果找到它,可能会导致 在错误的设置下运行。
- 注意:这将阻止将特定安装用作常规游戏。删除/重命名
- 在创建
ToribashControl
对象(如果使用提供的python库)时,提供安装的toribash.exe
的路径
多人游戏
注意:多人游戏不能在linux wine上工作!
想在多人游戏中用你的特工对付人类玩家吗?检查manual remote control如何工作。
文档
examples
中的示例提供了如何使用torille的快速入门,还演示了如何应用设置或
录制回放。
有关参考资料,请参见:
有关疑难解答,请参见FAQ。
如果要修改torille或使用其他语言来控制toribash实例,请参见hacking和documentation on protocol。
存储库结构
./torille/
:学习环境(包括健身房环境)的python代码./torille/toribash
:这将包括从pypi安装的toribash游戏的剥离版本
./toribash-codes/
:toribash使此学习环境工作所需的文件./examples/
:关于如何使用这个库的python示例./docs/
:内部工作的详细文档./experiments/
:白皮书中用于运行实验的代码./images/
:包含此处使用的gif
相关工作和有用链接
- 选项/聊天规则:http://forum.toribash.com/showthread.php?t=317900
- lua函数:https://github.com/trittimo/ToriScriptAPI/blob/master/docs/toribash_docs.txt
- 车身部件列表:http://forum.toribash.com/showthread.php?t=9391
- 以前使用Toribash进行机器学习的实验:
- http://forum.toribash.com/showthread.php?t=170100
- http://forum.toribash.com/showthread.php?t=167355
- http://forum.toribash.com/showthread.php?t=25263
- https://www.researchgate.net/profile/Jonathan_Byrne/publication/228848637_Optimising_offensive_moves_in_toribash_using_a_genetic_algorithm/links/0046351420d5001396000000.pdf
引用
如果你觉得托利尔对你的工作有用的话,我们不介意被引用。这也有助于我们了解人们在做什么!
@article{kanervisto2018torille,
author = {Anssi Kanervisto and Ville Hautam{\"a}ki},
title = {ToriLLE: Learning Environment for Hand-to-Hand Combat},
year = {2018},
journal = {arXiv preprint arXiv:1807.10110},
}
特别感谢和感谢
- hampa和dranix在配置toribash和lua脚本方面提供了非常宝贵的帮助(也可以在第一时间开发游戏!)
- siim p_der(github上的用户“windo”)用于原始toribash-evolver代码
- 框(toribash用户)中的注释本项目的概念
许可证
Torille的原始代码是根据GNU GPL 3.0授权的。Toribash是Nabistudios的财产。pypi包中的toribash二进制文件是在主开发人员“hampa”的许可下共享的。