一个python界面,用于训练强化学习机器人在pokemon决战中战斗。
poke-env的Python项目详细描述
pokemon决战Python环境
一个Python接口来创建与pokemon战斗的代理。poke-env
提供了一个易于使用的界面,用于创建基于规则的或训练强化学习机器人,以便在pokemon showdown上作战。在
入门
代理是从Player
继承的python类的实例。你的第一个探员可能是这样的:
classYourFirstAgent(Player):defchoose_move(self,battle):formoveinbattle.available_moves:ifmove.base_power>90:# A powerful move! Let's use itreturnself.create_order(move)# No available move? Let's switch then!forswitchinbattle.available_switches:ifswitch.current_hp_fraction>battle.active_pokemon.current_hp_fraction:# This other pokemon has more HP left... Let's switch it in?returnself.create_order(switch)# Not sure what to do?returnself.choose_random_move(battle)
要开始,请看一下our documentation!在
文档和示例
文档、详细示例和起始代码可以在on readthedocs中找到。在
安装
这个项目需要python>;=3.6和Pokemon Showdown服务器。在
^{pr2}$您可以使用smogon's server来尝试针对人类的代理,但是强烈建议使用开发服务器。特别是,this showdown fork针对性能进行了优化,并且可以在本地使用,而无需验证:
git clone https://github.com/hsahovic/Pokemon-Showdown.git
开发版本
您还可以安装最新的主版本:
git clone https://github.com/hsahovic/poke-env.git
依赖项和开发依赖项可以安装在:
pip install -r requirements.txt
pip install -r requirements-dev.txt
致谢
这个项目是来自Ecole Polytechnique的人工智能类的组项目的后续。在
您可以找到原始存储库here。它的部分灵感来自于showdown-battle-bot project。当然,没有Pokemon Showdown,这些都不可能实现。在
团队数据来自Smogon forums' RMT section。在
数据
数据文件是Pokemon Showdown的js
数据文件的改编版本。在
许可证
其他
- 项目
标签: