Creating a bot to battle on showdown is a pain. You have to implement showdown's websocket protocol, parse messages and keep track of the state of everything that is happening.
With poke-env, all of the complicated stuff is taken care of. Creating a battling bot can be as simple as that:
class YourFirstAgent(Player):
----def choose_move(self, battle):
--------for move in battle.available_moves:
------------if move.base_power > 90:
----------------# A powerful move! Let's use it
----------------return self.create_order(move)
-----# No available move? Let's try to switch mons
--------for switch in battle.available_switches:
------------if switch.current_hp_fraction > battle.active_pokemon.current_hp_fraction:
----------------# This other pokemon has more HP left... Let's switch it in?
----------------return self.create_order(switch)
--------# Not sure what to do?
--------return self.choose_random_move(battle)
Interested in reinforcement learning? poke-env exposes an Open AI Gym API; you might also be interested by our example DQN agent.
Just want to create a simple bot and watch it play on the ladder? We have starter code to do just that.
We try to keep our documentation as complete and up-to-date as possible, and maintain a clear, simple and flexible API.
Interested? Getting started is a simple pip install poke-env away :)
We also maintain a showdown server fork optimized for training and testing bots without rate limiting. A random agent can play about 100 randombats games in ten seconds.
Click here to check out the project's documentation, including starting examples, server setup recommendation and API reference
Click here to take a look at the project's Github repo. Issues are welcome!
With poke-env, all of the complicated stuff is taken care of. Creating a battling bot can be as simple as that:
class YourFirstAgent(Player):
----def choose_move(self, battle):
--------for move in battle.available_moves:
------------if move.base_power > 90:
----------------# A powerful move! Let's use it
----------------return self.create_order(move)
-----# No available move? Let's try to switch mons
--------for switch in battle.available_switches:
------------if switch.current_hp_fraction > battle.active_pokemon.current_hp_fraction:
----------------# This other pokemon has more HP left... Let's switch it in?
----------------return self.create_order(switch)
--------# Not sure what to do?
--------return self.choose_random_move(battle)
Interested in reinforcement learning? poke-env exposes an Open AI Gym API; you might also be interested by our example DQN agent.
Just want to create a simple bot and watch it play on the ladder? We have starter code to do just that.
We try to keep our documentation as complete and up-to-date as possible, and maintain a clear, simple and flexible API.
Interested? Getting started is a simple pip install poke-env away :)
We also maintain a showdown server fork optimized for training and testing bots without rate limiting. A random agent can play about 100 randombats games in ten seconds.
Click here to check out the project's documentation, including starting examples, server setup recommendation and API reference
Click here to take a look at the project's Github repo. Issues are welcome!