A program to simulate Pokemon battles1
."-,.__
`. `. ,
.--' .._,'"-' `.
. .' `'
`. / ,'
` '--. ,-"'
`"` | \
-. \, |
`--Y.' ___.
\ L._, \
_., `. < <\ _
,' ' `, `. | \ ( `
../, `. ` | .\`. \ \_
,' ,.. . _.,' ||\l ) '".
, ,' \ ,'.-.`-._,' | . _._`.
,' / \ \ `' ' `--/ | \ / / ..\
.' / \ . |\__ - _ ,'` ` / / `.`.
| ' .. `-...-" | `-' / / . `.
| / |L__ | | / / `. `.
, / . . | | / / ` `
/ / ,. ,`._ `-_ | | _ ,-' / ` \
/ . \"`_/. `-_ \_,. ,' +-' `-' _, ..,-. \`.
. ' .-f ,' ` '. \__.---' _ .' ' \ \
' / `.' l .' / \.. ,_|/ `. ,'` L`
|' _.-""` `. \ _,' ` \ `.___`.'"`-. , | | | \
|| ,' `. `. ' _,...._ ` | `/ ' | ' .|
|| ,' `. ;.,.---' ,' `. `.. `-' .-' /_ .' ;_ ||
|| ' V / / ` | ` ,' ,' '. ! `. ||
||/ _,-------7 ' . | `-' l / `||
. | ,' .- ,' || | .-. `. .' ||
`' ,' `".' | | `. '. -.' `'
/ ,' | |,' \-.._,.'/'
. / . . \ .''
.`. | `. / :_,'.'
\ `...\ _ ,'-. .' /_.-'
`-.__ `, `' . _.>----''. _ __ /
.' /"' | "' '_
/_|.-'\ ,". '.'`__'-( \
/ ,"'"\,' `/ `-.|" mh
1 vs 1 Pokemon battle
javac *.java && java -ea PokemonBattle
1 vs 1 Pokemon battle with pre-selected pokemon
javac *.java && java -ea PokemonBattle charizard venusaur
1 vs 1 Pokemon battle simluated
javac *.java && java -ea PokemonBattle charizard venusaur skip
Trainer Battle
javac *.java && java -ea TrainerBattle
Elite Four Battle
javac *.java && java -ea EliteFour
- When prompted to select a Pokemon, use "custom" to be prompted to enter custom stats and attacks
- Use an underscore "_" in front of a Pokemon's name to maximize its stats.
- IVs will all be set to 31 (highest possible)
- EVs will be allotted depending on base stats. A Pokemon has 510 EVs to allocate between its 6 stats, but no single stat can receive more than 252.
- If base
SPEED
is above a threshold, then 252 EVs will go to the higher of the two attack stats, 252 EVs will be given toSPEED
, and the remaining 6 EVs will be given toHP
. - If base
SPEED
is below a threshold, then 252 EVs will go to the higher of the two attack stats, and 252 are distributed toHP
,DEFENCE
, &SPECIAL_DEFENCE
depending on the proportion that would best balance between them e.g. more EVs go toDEFENCE
if it is much lower thanHP
andSPECIAL_DEFENCE
. We technically could allocate 258 EVs between the three defensive stats, but to prevent one of the defensive stats from getting more than 252 EVs (which would happen in a severe imbalance), 6 EVs are given toSPEED
.
- If base
- Nature (which affects which stat has a 1.1 multiplier and which has a 0.9 multiplier) will be set depending on base stats. As a general rule, HP cannot be affected by nature.
- If base
SPEED
is above a threshold, attenuate the lower of the two attack stats and accentuateSPEED
. - If base
SPEED
is below a threshold, attenuate the lower of the two attack stats and accentuate the higher of the two attack stats.
- If base
- If a Pokemon has multiple attacks, it will automatically select the "best" attack against a given opponent.
- The difficulty for the TrainerAI is based on simulated battles that it runs between all the Pokemon. Pokemon that win more frequently appear when higher difficulty is chosen. If you select a difficulty above the maximum, The Pokemon Master will challenge you - this trainer always chooses the Pokemon that wins most frequently against your Pokemon.
- Each row in
wins.csv
contains the percentage of wins a Pokemon had against each opposing Pokemon (obtained from simulating 500 battles). For example, row 0 column 1 is the probability Venusaur beats Charizard. The element in index [i,j] is equal to 1 minus the element in [j,i] of the matrix because every loss for one Pokemon was a win for the other.
1) ASCII art by Maija Haavisto ↩