Inspiration

As lovers of the pokemon games, we thought of recreating the old pokemon battles in a simulator as a project.

What it does

The project allows the user to simulate a pokemon trainer battle, playing against the custom AI. You can select your pokemon team as well as the AI pokemon team and play using each pokemon's moveset. The pokemons and their moves are imported from bublbapedia and pokemon db which collates the vast majority of all the pokemon from the various games.

How we built it

We split the task into the GUI and the AI, the AI code was written by assigning a score to each possible move, with the score changing based on the environment conditions. This involved comparing all the possible moves and checking the specific conditions where the move would more or less beneficial. The AI then picks a move to use based off the score and a random element, assuring that the AI does not always use the same moves, even it is optimal to do so. For the GUI, we tried to code using pygame, but we ran into multiple challenges and so decided to switch to tkinter. Using this, we made tabs such as battle logs which make up the majority of the GUI.

Challenges we ran into

Text editing - building a json file based on a preset dictionary The AI logic - It was mostly straight forward but organisational challenges resulted in a lot of rewriting the code meaning we lost some functionality to time. Time Management and Feature Creep was the biggest factor, Originally we wanted a fully complete Gen 9 system but as it stands now we are yet to implement some moves such as entry hazards and weather alongside data on the pokemon such as abilities and items

Accomplishments that we're proud of

Given the timeframe and our ambitious goals, We are very pleased to have a working prototype. In particular we managed to use R to create a near fully comphrensive move and pokemon database for future improvements.

What we learned

To quote Dennis - "DON'T USE PYGAME" Across the team we had a varity of different skill levels and approaches when it comes to python but being able to see how we coded each part and then needed to combine our two wildly different

What's next for Gen 9 Pokemon Battle Simulator

In the distant future ( after exams ) we want to expand functionality. This will include but not limited to: -Pokemon Abilities -Pokemon Items -Switch AI implementation -Gen Specific Mechanics -Support for more Generations

and maybe in the future we may change the AI to be based on reinforcement learning...

Thank you for checking us out! in the words of Nat - "Shack"

Built With

Share this project:

Updates