Skip to content

Repository files navigation

Pokemon Showdown Assistant

logo

Introduction

So I have been a huge pokemon fan for a long time and pokemon showdown is a platform for competitive pokemon battling by smogon which is the largest open source organization for projects dealing with the world of pokemon

So with this project i wanted to use technologies i always wanted to try to make a browser extension that can act as a assistant in-battle and during teambuilding phase

I also plan to use web automation and AI/Ml to create a bot that will play the game as a CPU AI

Understanding the files

PokemonShowdownAnalysis.ipynb

Before any sort of project it was essential to understand how the entire project works as well as the

dynamics of the game so this notebook extracts all possible data from smogon resources such as pokemon data , move data , battle records , image resources etc

  • Smogon University

    This section extracts data from smogon resources

  • Playing PokemonShowdown

    In this section , replays of previously played games are parsed and stored in json format . Each json file store the status of both teams as well as field along with the moves played at each turn

  • Bot

    This section holds the code for selenium to be able to play pokemonshowdown as a bot against real players . This is just to test how the code will interact with the controls of pokemonShowdown . More on this in analyser

Teambuilder Extension

Chrome Extension that will be used as an assistant in teambuilder Recommendation of possible additions to team is fast but the the evaluation of team can take time ( ~40 secs) , currently the only format supported is gen8ou but more formats can easily be added. Recommendations and evaluations are made not only by game mechanics but also taking into consideration team data from over 1000 matches played in the past week gif of extension

Server

This folder contains the container information as well source code for all the microservices involved as well as replica db servers to run on localhost for development purpose

To run the microservice at localhost along with a replica DB server :

  1. Switch into the src directory
  2. Run docker-compose up

To build and push to aws lambda

  1. configure aws cli aws configure
  2. give the deployment script permissions chmod u+x ./deploy.sh
  3. run the deployment script ./deploy.sh

Analyzer

This consists of a node environment where analysis of the pokemon showdown game mechanics take place with the help of various smogon npm packages

It uses the said packages to create functions that would provide the best action when given the state of a battle Once the AI is ready with strategies of the game , we will use selenium in this and start running the bot against real players , Elo rating will be used to judge bot difficulty

References

  1. you can check out the various projects by smogon here

  2. For emulating the aws lambda function on my pc , I have built the a docker image for the application using the uwsgi-nginx-flask. This allows more freedon of customization than lambci/lamda:python3.6 docker image which is an abstraction of the aws lambda environment though the latter gives a much more similar environment to aws lambda services

About

AI assistant\bot for pokemon showdown by smogon

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages