{"id":20836728,"url":"https://github.com/tommay/pokemon-go","last_synced_at":"2025-05-08T02:47:11.229Z","repository":{"id":41880907,"uuid":"102885954","full_name":"tommay/pokemon-go","owner":"tommay","description":"Pokemon Go battle simulator and utilities to help assess counters, powerups, and movesets.","archived":false,"fork":false,"pushed_at":"2025-05-05T17:50:58.000Z","size":15664,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-05T18:59:50.778Z","etag":null,"topics":["battle","pokemon","pokemongo","simulator"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tommay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-08T17:13:01.000Z","updated_at":"2025-05-05T17:51:01.000Z","dependencies_parsed_at":"2023-02-18T20:01:03.565Z","dependency_job_id":"70cda9ec-e03a-49f4-9f81-820407cabfe8","html_url":"https://github.com/tommay/pokemon-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommay%2Fpokemon-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommay%2Fpokemon-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommay%2Fpokemon-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tommay%2Fpokemon-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tommay","download_url":"https://codeload.github.com/tommay/pokemon-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252989940,"owners_count":21836665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["battle","pokemon","pokemongo","simulator"],"created_at":"2024-11-18T00:31:46.572Z","updated_at":"2025-05-08T02:47:11.197Z","avatar_url":"https://github.com/tommay.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pokemon battle simulator\n\nThis is my own pokemon battle simulator.  Written in Haskell which I\nwish I'd learned a long time ago.\n\nThis README is just a brief overview.  But I'm trying to make it more\ncomprehensive because I'll probably need it.\n\nThe calculations and defender's move selection are based on (IIRC)\nSilph Road battle analysis posts.  Dodging is not supported.  I never\ndodge because a) I don't see well enough and b) dodging lowers DPS.\n\nI'm not sure how exceedingly accurate it is but I ve been using it to\nhelp choose raid counters for a long time now and I'm never\ndisappointed.  Since AFAIK the defender chooses its charge move\nsomewhat randomly its impossible to be accurate anyway.\n\nDamagage can be sorted by DPS (best for raids), TDO (if you're\nwonderintg what to use against Blissey), and a couple other options.\nIt can show breakpoints, alternative movesets, powerups, and rank\nmovesets for a given matchup.\n\nIt handles weather and raid bosses.\n\nMy own pokemon are kept in a yaml file (for easy editing) that is\nloaded on startup.  Each pokemon has name, species, level, IVs, and\nmoveset.  Level and IVs can be calculated from CP, HP, and appraisal.\nIf there are multiple possobilities for level and/or IVs, all\npossibilities are simulated and worst-case DPS/TDO values are used.\n\nThis program is surprisingly fast.  It can crank through thousands of\nsimulated battles per second, which is great for simulating\nalternative movesets and powerups.\n\nThere are a fair amount of other programs here too, for things like\nupdating the yaml file for new pokemon or after powerups.  There are\nalso some programs that plot DPS and TDO for varying IVs.  The main\ntakeaway from the plots is by far the most important IV, and that a\nbetter defense IV and/or powering up my actualy make a pookemon do\nworse depending on the matchup.\n\n# The my_pokemon.yaml file\n\nPokemon are stored in a file in yaml format which may be created and\nmodified with any text editor.  By default the file is called `my_pokemon.yaml`\nin the cirrent directory.\n\n## Specifiying the my_pokemon.yaml file\n\nThe `my_pokemon.yaml` filename may be specified explicitly with the\n`-f \u003cfilename\u003e` option.  This is especialy useful if you multiple\naccounts, each with its own file.  The `-f` option may also be given\nmultiple times and all files will be read as if they were\nconcatenated.\n\n## Contents of my_pokremon.yaml\n\n`my_pokemon.yaml` has one entry for each of each pokemon that you want\nto use for battle simulations.  An entry looks likes this:\n\n```\n- name: Mutie\n  species: mewtwo\n  cp: 3525\n  hp: 155\n  dust: 7000\n  quick: confusion\n  charge: focus blast\n  appraisal: wonder, hp, incredible\n  ivs:\n  - level: 33\n    attack: 13\n    defense: 11\n    stamina: 15\n```\n\nThe name is completely arbitrary but will generally be the name you've\ngiven the pokemon, or the default name which is just the species.\n\nFor simulations, only the `species` and `ivs` are actually used.  Note\nthat `ivs` also includes the level.\n\nIf the `ivs` can't be determined unambiguously, then mu;ltiple `ivs`\nblocks may be given.  All sets of `ivs` will be simulated and the\nworst-case results will be used.\n\n## Calculating the `ivs` wih the `ivs` utility\n\nYou can use an app like Poke Genie to calculate `ivs`.  Or you can do\nwhat I do and use the `ivs` utility.  Put the `name  `species`, `cp`,\n`hp`, and `appraisal` values in the file then run `ivs` like this:\n\n```\nivs [-n] \u003cyour_file.yaml\u003e \u003e \u003cnew_file.yaml\u003e\n```\n\nUse the `-n` switch if the pokemon has never been powered up.  This\nwill restrict the computed level(s) to whole numbers and exclude\nhalf-levels.\n\nThe possible `ivs` will be computed for all pokemon in the file and\nthe results written to the standard output.\n\nIf a pokemon's `ivs` were unknown then an `ivs` block will be created\nfor each possible combination.\n\nIf a pokemon's alrezdy had `ivs` then they are retained except that\ncombinations that aren't possible will be removed.  This is useful when\nyou power up a pokemon and update its `cp` and `hp`.  Running `ivs` will\nremove any ambiguous `ivs` that are no longer possible given the new\n`cp` and `hp`.\n\n### Specifying the `appraisal`\n\nThe `appraisal` looks like this:\n\n```\nwonder, hp, attack, incredible\n```\n\nIt consists of the team leader's overall evaluation, the list of best\nivs (one, two, or three of `hp`, `attack`, and `defense`), and the\nevaluation of the best ivs.  The evaluations depend on your team:\n\n#### Mystic:\n\n|Blanche's phrase includes|appraisal term|\n|-------------------------|--------------|\n|Your pokemon is a wonder!|wonder|\n|has certainly caught my attention|attention|\n|your pokemon is above average|above|\n|not likely to make much headway in battle|not likely|\n\n|Blanche's phrase includes|appraisal term|\n|-------------------------|--------------|\n|It's incredible!|incredible|\n|I am certainly impressed|impressed|\n|noticeably trending to the positive|trending|\n|not out of the norm|not out|\n\n#### Valor:\n\n|Candela's phrase includes|appraisal term|\n|-------------------------|--------------|\n|amazes me|amazes|\n|is a strong pokemon|strong|\n|is a decent pokemon|decent|\n|may not be great in battle|may not|\n\n|Candela's phrase includes|appraisal term|\n|-------------------------|--------------|\n|I'm blown away|blown|\n|It's got excellent stats|excellent|\n|Its stats indicate|indicate|\n|It's stats don't point to greatness|don't point|\n\nIf you're Instinct, you rock~ But you'll have to either use the Mystic\nor Valor terms or edit src/Appraisal.hs (and submit a pull request).\n\n## Examples\n\n### What are the best counters to blizzard Kyogre tier 5 raid boss?\n\n`-a`: simulate all pokemon species instead of `-f` to read pokemon\nfrom a file.\n\n`-g`: sort by DPS (glass cannon option)\n\n`-M`: show moveset\n\nPokemon are simulated at level 30 by default.\n\nThis is for default (extreme) weather with no weather-boosted moves.\n\n```\n$ counter -g -M -a kyogre:r5/b\n14.3   242  zapdos:30       charge beam  / thunderbolt    \n14.0   237  raikou:30       thunder shock/ thunderbolt    \n13.7   231  jolteon:30      thunder shock/ thunderbolt    \n13.4   226  sceptile:30     fury cutter  / leaf blade     \n12.8   216  rayquaza:30     dragon tail  / outrage        \n12.8   216  victreebel:30   razor leaf   / leaf blade     \n12.7   214  venusaur:30     vine whip    / frenzy plant   \n12.6   213  shiftry:30      razor leaf   / leaf blade     \n12.5   212  venusaur:30     razor leaf   / frenzy plant   \n12.2   207  electabuzz:30   thunder shock/ thunderbolt    \n12.2   206  breloom:30      bullet seed  / seed bomb      \n```\n\n### Where are their breakpoints?\n\nJust add `-B`:\n\n```\n$ ./counter -B -g -M -a kyogre:r5/b\n14.3   242  zapdos:30       charge beam  / thunderbolt    \n14.0   237  raikou:30       thunder shock/ thunderbolt    \n13.7   231  jolteon:30      thunder shock/ thunderbolt    \n13.4   226  sceptile:30     fury cutter  / leaf blade     \n12.8   216  rayquaza:30     dragon tail  / outrage        \n12.8   216  victreebel:30   razor leaf   / leaf blade     \n12.7   214  venusaur:30     vine whip    / frenzy plant   \n12.6   213  shiftry:30      razor leaf   / leaf blade     \n12.5   212  venusaur:30     razor leaf   / frenzy plant   \n  30   8\n  31   9\n12.2   207  electabuzz:30   thunder shock/ thunderbolt    \n```\n\nSo RL/FP Venusaur has a breakpoint at level 31, but the rest have reached\ntheir final breakpoiint by level 30.  Let's see where those breakpoints are\nalsoby using `-l 20`:\n\n```\n$ counter -l 20 -B -g -M -a kyogre:r5/b\n12.2   207  raikou:20       thunder shock/ thunderbolt    \n11.9   201  zapdos:20       charge beam  / thunderbolt    \n  20   6\n  28.5 7\n11.2   222  venusaur:20     vine whip    / frenzy plant   \n  20   4\n  26.5 5\n10.5   177  venusaur:20     razor leaf   / frenzy plant   \n  20   7\n  23.5 8\n  31   9\n10.5   176  sceptile:20     fury cutter  / leaf blade     \n  20   1\n  20.5 2\n10.3   164  victreebel:20   razor leaf   / solar beam     \n  20   7\n  21.5 8\n  28   9\n10.3   170  raikou:20       thunder shock/ wild charge    \n10.3   174  victreebel:20   razor leaf   / leaf blade     \n  20   7\n  21.5 8\n  28   9\n10.1   171  shiftry:20      razor leaf   / leaf blade     \n  20   7\n  23   8\n  30   9\n10.0   118  manectric:20    charge beam  / wild charge    \n  20   5\n  27   6\n 9.9   130  jolteon:20      thunder shock/ thunderbolt    \n  20   3\n  21.5 4\n```\n\n# Plotting\n\nThere are several useful plots that can be done to help evaluate which\npokemon to evolve and/or power up.  They can plot the DPS or TDO for a\ngroup of pokemon as a function of how much candy or stardust is spent\non them.\n\nIt often takes 125 candy to evolve a pokemon.  Would that candy (and\nstardust) stardust be better spent by powering up an already evolved\npokemon, perhaps one with lower IVs, instead?  And how far should you\npower up?  As always it depends on the matchups, so these plots\ncompare DPS or TDO vs. stardust or candy costs by simulating\nparticular matchups that you choose.  In the end it's really\nsubjective and depends on you candy and stardust budget but the plots\ncan help weed out the bad pokemon and perhaps also spot some\nsurprising stars.\n\n## Here's how it works:\n\nCreate a file with the type of pokemon being considered, say\nshiftry.yaml.  Make an entry for each shiftry, nuzleaf, and seedot\nyou're considering.  For the moveset, use the moveset you plan to have\non the fully evolved pokemon.  If the pokemon is already fully\nevolved, use its existing moveset and also consider making another\nentry with a different name and the ideal moveset.  Using square\nbrackets somewhere in the name will cause that pokeon to be plotted\nwith a dashed line, which is useful when using hypothetical pokemon\nwith an alternate moveet -- pokemon with solid lines repreent the\nmoveset you have, and pokemon with dashed lines are what you could get\nwith a TM.  Just remember not to get too excited if you see a dotted line\ngetting high samage -- you're going to have to TM it first.\n\nThen do\n\n```\nplotpowerups.sh -p -s -t -f shiftry.yaml raichu_alola:r3\n```\n\nIgnore any libGL error messages; I have no idea what that's all about.\n\nThe command arguments are:\n\n```-p``` run gnuplot to actually create a plot\n\n```-c``` plot candy cost on the X axis\n\n```-t``` plot TDO on the Y axis\n\n```-f \u003cfilename\u003e``` yaml file with the pokemon to plot\n\nThe final argument is the defending pokemon.  It can be of the usual form\n```species[:level[/attack/defense/stamina]][:fast_move][/charge_move]```\n\nAny unevolved pokemon are simulated as fully evolved.  For any pokemon\nthat needs to be evolved, the lowest candy cost will be the candy\nneeded to evolve, and will increase from there with power ups.  Fully\nevolved pokemon will start from a candy cost of zero.\n\nIf a pokemon has multiple evolutions, specify which one you want on\nthe command line:\n\n```-e \u003cspecies\u003e```\n\nWhat you'll invariably find is that powering up existing pokemon is\nalways much better in the short term because it won't take much candy\nto power them up to their next breakpoint(s) compared to evolving a\npokemon.  But a newly evolved pokemon may eventually surpass existing\npokemon if you spend enoough candy.\n\nThe power up breakpoints will be pretty obvious in the plot; they are\nthe large jumps in damage.  Between breakpoints, damage can increase\nslowly, stay fairly level, or even decrease as your pokemon's ```(base\ndefense + defense IV) * CPM``` increases and it gains energy more slowly.\n\nDamage can also be plotted vs. stardust cost by using ```-s``` instead\nof ```-c```.  Remember that evolving takes no stardust so all\npokemon's plots start at zero stardust but it's going to cost some\ncandy first to get there if the pokemon is not already fully evolved.\n\nDPS can be plotted instead of TDO by using ```-d``` instead of\n```-t```.  DPS can really jump around a lot, both up and down, with\npower ups.  You'll often find you get the best DPS by powering up only\nto level 30-something.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommay%2Fpokemon-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftommay%2Fpokemon-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftommay%2Fpokemon-go/lists"}