一个python界面,用于训练强化学习机器人在pokemon决战中战斗。

poke-env的Python项目详细描述


pokemon决战Python环境

PyPI version fury.ioPyPI pyversionsLicense: MITDocumentation Status

一个Python接口来创建与pokemon战斗的代理。poke-env提供了一个易于使用的界面,用于创建基于规则的或训练强化学习机器人,以便在pokemon showdown上作战。在

A simple agent in action

入门

代理是从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 Showdownjs数据文件的改编版本。在

许可证

License: MIT

其他

CircleCIcodecovCode style: black

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java将Map<String,String>传递给需要Map<String,Object>   java在循环中使用字符串而不是StringBuilder是否会造成内存损失?   jnlp如何更新java控制台JRE?   java更改、修改和重新打包CXFAPI源文件   JavaFXJava应用程序在Fedora上运行一段时间后关闭   使用来自不同类的方法的java   java如何通过ant脚本在linux中使用subst?   java在使用camunda modeler进行base64编码/解码时出错   获取java。netbeans、weblogic和fastswap设置为true时的lang.NoSuchMethodError   java如何提高FinalizerThread在GC中收集对象的优先级   java检测具有相同根的单词   netbeans crud应用程序中的java错误