Jump to content

Compiling a list of known gameplay formulas


DeathsSpook

Recommended Posts

I'm starting a list of known game play formulas, and including spaces for unknown details. I want to compile them so that those who like numbers can play around with the formulas. A LOT of these are incomplete, and so I'm looking for corrections to edit this post with. I'll cite sources on everything I'm reasonably certain of, and mark parts that I'm speculating on. If you have any additions or corrections, please post.

 

Damage (source)

Damage = round((L*B*S*T*V*C)/60)

 

Level of the attacking Pokemon is an integer from 1-100

Base Power is a move specific integer 

Same Type modifier is 1.5 if the move used does not match the user's type. Otherwise, S=1.

Type Effectiveness modifier is calculated based on the defending Pokemon's type and attacker's attack's type:

  • T=0 if the defender is immune to the attack
  • T=0.25 if the defender has two types, both of which resist the attack
  • T=0.5 if the defender has only one type that resists the attack and no types weak to it
  • T=1 if the defender has no types that are weak to resistant against the attack OR one type that resists the attack and one that is weak to it.
  • T=2 if the defender has only one type that is weak to the attack and no types that resist it
  • T=4 if the defender has two types, both of which are weak to the attack

Variant modifier equals 1.25 if the attacker is a Dark Variant and the defender is NOT a Metallic Variant and equals 0.75 if the attacker is NOT a Dark Variant and the defender is a Metallic variant. Otherwise V = 1. Yes, this is one modifier, and means that Dark and Metallic cancel each other out. Source is here.

Critical modifier = 1.5 if the attack is a critical hit. Otherwise, C = 1.


 

Important Calculations for sidequests with level 100 pokemon

Spoiler

Note that we can do some algebra to get various minimum BPs to exceed key damage marks, assuming no critical hits and that every attacker is level 100:

 

D ≤ (100*B*S*T*V)/60 => B ≥ (3/5)*D/(S*T*V)

 

Level 100 Dark vs Shiny and Level 100 Dark vs Metallic of the same species require the same minimum BP to KO

 

B ≥ (3/5)/(S*T)*500/(1.25) = B ≥ (3/5)/(S*T)*400

 

Dark Variant's neutral STAB attack KO a Level 100 non Metallic and non Shiny Pokemon:

B ≥ (3/5)*400/(1.5*1.25) = 128.

 

Dark Variant's neutral STAB attack KO a Level 100 Metallic or Shiny Pokemon:

B ≥ (3/5)*400/(1.5) = 160.

 

For all practical purposes, this is impossible. 

 

Dark Variant's supereffective STAB attack KO a Level 100 Metallic or Shiny Pokemon:

B ≥ (3/5)*400/(1.5*2) = 80.

 

If you're only taking Dark variants into sidequests, any STAB attack that has less than 80 BP is not worth it at all. 

 

Dark Variant's super effective coverage attack KO a Level 100 Metallic or Shiny Pokemon:

 

B ≥ (3/5)*400/(2) = 120

 

Dark Variant's super effective coverage attack KO a Level 100 non Metallic and non Shiny Pokemon:

 

B ≥ (3/5)*400/(2*1.25) = 96. 

 

If you're only taking Dark variants into sidequests, any coverage attack that has less than 120 BP is not super worth it. 

 

Ranking Points (source, along with a bunch of others, but something seems wrong)

 

Note that I modified it to clarify what "Average Experience" means

 

Ranking Points = (t * √(u/n) * Log(b)) / 1000

 

t = Total Experience of all of your Pokemon, summed together

n = Your total number of Pokemon

u = Your total number of unique Pokemon. Note that variants of the same species count as different pokemon, e.g. Dark Mawile, Shiny Mawile, and Mawile are three unique pokemon. 
b = (Battle Count)/ (Wins). 

Help: This looks like it rewards losing, which seems like a bizarre choice. I also don't know what the base of the logarithm is. I'm currently assuming 10.

 

 

Pokemon encounter probabilities (source)

P(encounter any Pokemon) = 1/3. (Note: this was obtained indirectly: I divided encounter step probabilities by every step probabilities and kept getting roughly the same answers: either about 2.98 or exactly 3. Then, I assumed that the developer(s) used a rounder number).

More thorough Probability breakdowns can be found here. It doesn't seem like Pokemon variants or classes are rolled independently.

Help: I suspect that P(catch a particular possible Pokemon species of a class and variant| encounter any Pokemon species of that class and variant) = 1/(Number of possible pokemon species in that class)

 

Pokemon catching probabilities

 

(None found. They definitely exist, but I can't figure out where)

Help: I am pretty sure that the functional relationship is almost strictly level and HP based until you get to the fact that you can only catch UBs with certain balls, but need specifics.

 

Pokemon Exp. Requirements (source)

 

Level Up 1 level: 500 exp for each level until 100. 

Level 

  • If total experience < 50000: floor((Total experience)/500) 
  • If total experience ≥ 50000: 100

 

Battle Goodies: Experience and money

 

When you win any battle, you automatically receive the following rewards:

 

E = round(500*O/Y) (source)

M = round(500*X*O/Y) (source)

 

Experience that every one of your pokemon gains from a battle you have won.

Money that you gain as a result of winning the battle. 

Opponent's Pokemons' levels all summed together

Your participating Pokemons' level all summed together: "participating" means "sent out", not "in your party." For example, if you win a battle where you send out only a level 6 pokemon, Y = 6 even if your party has 5 level 100 pokemon that were never sent out.

Xtra random variable. X has the following probability mass function:

  • P(X = 0.5) = 500/1000 = 1/2 = 0.5
  • P(X = 1.2) = 300/1000 = 3/10 = 0.3
  • P(X = 1.5) = 150/1000 = 3/20 = 0.15
  • P(X = 2) = 45/1000 = 9/200 = 0.045
  • P(X = 4) = 4/1000 = 1/250 = 0.004
  • P(X = 7.5) = 1/1000 = 0.001
     
  • NOTE: the expected value of X = 0.9485. Over many battles, you can expect make a little less money than your pokemon make experience. However, X is extremely skewed, so this would require many battles to average out

 

Friendliness

 

Friendliness comes after every battle. For each battle you win, your pokemon get 1 or 2 friendliness with probability 50% each. (source)


The probability that it takes exactly k battles to get at least X happiness is: (source

 

0, if k < X/2 OR k > X;

(1/2)^(X/2) if k = X/2 ; 

(1/2)^k*(2*((k-1) choose (X-k))+((k-1) choose (X-k-1)) if k-1 ≥ X/2 AND k-1 < X

(1/2)^X if k = X. 

 

 

METHOD TO NAIL EXPERIENCE POINTS WHEN 1225 ≤ Your remaining Experience Points ≤ 2484. (source)

 

Spoiler

If your desired target EXP is less than 1225, this method will not help you.

 

For a target level 100 pokemon, you can get 35 experience if you have them kill exactly 1 level 7 pokemon. You can also fulfill this by having 6 level 100 pokemon kill exactly 6 level 7 pokemon in a single battle (source) 

 

You can get 5 level 100 pokemon exactly 36 experience if you send out exactly 5 level 100 Pokemon to kill exactly 6 level 6 Pokemon in a single battle.  

 

For any experience you want to get under this method, E = 1260I+R, where I is a positive integer and R is an integer between 0 and 1259, inclusive.

 

Equivalently, E = 1260Z+r, where Z is a nonnegative integer and r is between 1225 and 2484, inclusive. To get a positive number of battles while minimizing how many battles you want to do under this paradigm, you want Z = 0 so that E = r.  Therefore, you want your experience left to nail whatever number to be between 1225 and 2484. Battle until you reach this point. DO NOT OVERSHOOT.

 

We use the notation y %% x to mean remainder when you divide an integer y by a positive whole number x. For example, 9 %% 5 = 4, and 4 %% 2  = 0

 

Calculate r %% 35 = a. If r %% 36 = 0, b = 36. Otherwise, b = r %% 36.

 

With our restrictions on r, the Chinese Remainder Theorem ends up telling us that a*36+(36-b)*35 = r.

 

Therefore, you want to fight (36-b) level 7 wild pokemon with your target level 100 and a trainers with 6 level 6 Pokemon using 5 level 100s including your target level 100. 

 

WISHLIST OF IMPORTANT FORMULAS

 

  • A confirmation of or a correction to the Ranking Points formula, which seems to reward losing
  • Probabilities of catching a Pokemon, based on ball modifiers, HP, level, status conditions(?), etc
  • How encounter probabilities are decided. There are a couple of separate possibilities, IMHO. I will use the term "variant-rarity" as a noun meaning "the co-occurrence of a variant and rarity": e.g. "Shiny-rare is a variant-rarity." For all examples, I will use a theoretical route with Common Starly and Swablu, Rare Fennekin and Staravia, Legendary Rayquaza, and UB Kartana, assuming the player has all badges.
    • Does RNG decide if an encounter happens at all and THEN what type of encounter that is, or does it roll to decide between types of encounters and no encounter in one go.  The former would be "First check if an encounter happens this step. IF an encounter happens, decide the variant-rarity". The latter would be "For each variant-rarity, check if it occurs at this step. If none of them occur, then no encounter occurs." (I suspect the former is the case: the probability of an encounter happening at all divides out a bit too cleanly from the probabilities of encountering a specific variant-rarity and of encountering a specific variant-rarity given an encounter occurs at all.)
    • Are variant-legends and variant-UBs pooled together with the corresponding variant-rare pool? EG, to get a Shiny Kartana, do I have to roll Shiny-Rare and then there's a 1/4 probability of getting it, or did I roll to get into a separate Shiny-UB pool and then Kartana appears because it's my only option? (The same question as well, but for Rayquaza and Shiny-Legend pool)

 

Other suggestions, as they come

 

 

Edited by DeathsSpook
  • Thanks 3
Link to comment
Share on other sites

On 4/5/2022 at 2:55 PM, DeathsSpook said:

M = 0.75 if the defender is a Metallic Variant Pokemon. Otherwise, M = 1. (NB: This means that a Dark Variant attacking a Metallic Variant only does 93.75% of the damage that a Normal Variant attacking a Normal Variant would do, all else being equal)

 

This isn't true. The attack will just do 100% damage, as if neither Pokemon had a variant.

 

On 4/5/2022 at 2:55 PM, DeathsSpook said:

P(encounter any Pokemon) = 1/3. (Note: this was obtained indirectly: I divided encounter step probabilities by every step probabilities and kept getting roughly the same answers: either about 2.98 or exactly 3. Then, I assumed that the developer(s) used a rounder number).

Please could you elaborate what you mean by this? Does it mean you take 3 steps in grass per encounter? From my experience the encounters use a timer - after seeing a normal common Pokemon you have about 1.1 seconds to battle it before the game gives you another encounter. Rare and legendary Pokemon have a longer timer. I think variants of common Pokemon also have a slightly longer timer, so you don't miss them. If it does use a step counter (which sounds more reasonable!!) instead of a timer then it's still different for different rarity tiers

 

But great post otherwise, it's cool to see stuff like this

Link to comment
Share on other sites

19 hours ago, billabob said:
Quote

This isn't true. The attack will just do 100% damage, as if neither Pokemon had a variant.

 

1.25*0.75 = 5/4*3/4 = 15/16 = .9375. It's close to full damage, but not quite.

19 hours ago, billabob said:

Please could you elaborate what you mean by this? Does it mean you take 3 steps in grass per encounter? From my experience the encounters use a timer - after seeing a normal common Pokemon you have about 1.1 seconds to battle it before the game gives you another encounter. Rare and legendary Pokemon have a longer timer. I think variants of common Pokemon also have a slightly longer timer, so you don't miss them. If it does use a step counter (which sounds more reasonable!!) instead of a timer then it's still different for different rarity tiers

 

But great post otherwise, it's cool to see stuff like this

 

I'm pretty sure it's a step timer, because if you encounter a pokemon and then don't move, it stays put. 

Link to comment
Share on other sites

10 hours ago, DeathsSpook said:

1.25*0.75 = 5/4*3/4 = 15/16 = .9375. It's close to full damage, but not quite.

 

I'm pretty sure it's a step timer, because if you encounter a pokemon and then don't move, it stays put. 

That's not what I mean. If you try battling a metallic Pokemon with a dark right now you'll see it. The multiplier becomes 1x. I assume this is because .25 is added and subtracted from a multiplier variable rather than the game actually doing * 1.25 and * 0.75.

 

My dark Furfrou deals 438 (actually 437.5 rounded) damage with Last Resort. 437.5 * 0.75 is 328.125, but let's see how much damage it deals to a metallic Pokemon in the sidequests:

 

Your Dark Furfrou (Heart) attacked Metallic Eevee with Last Resort and did 350 HP damage.

 

And indeed 437.5 * 0.8 is 350. As for the step counter I think you're right. But there is no randomness involved in the stepping, you'll always get the same time between encounters (it just gives you longer to notice a rare Pokemon)

Link to comment
Share on other sites

On 4/8/2022 at 8:30 PM, billabob said:

That's not what I mean. If you try battling a metallic Pokemon with a dark right now you'll see it. The multiplier becomes 1x. I assume this is because .25 is added and subtracted from a multiplier variable rather than the game actually doing * 1.25 and * 0.75.

 

My dark Furfrou deals 438 (actually 437.5 rounded) damage with Last Resort. 437.5 * 0.75 is 328.125, but let's see how much damage it deals to a metallic Pokemon in the sidequests:

 

Your Dark Furfrou (Heart) attacked Metallic Eevee with Last Resort and did 350 HP damage.

 

And indeed 437.5 * 0.8 is 350. As for the step counter I think you're right. But there is no randomness involved in the stepping, you'll always get the same time between encounters (it just gives you longer to notice a rare Pokemon)

Huh. I don't have time for the math to confirm this right now, but I will soon. If it checks out, I'll update the post.

 

EDIT: Confirmed. My Dark Scrafty using Grass Knot does 417 damage on a pokemon it's super effective on. If both the Dark and Metallic advantages were active, it should have done 313 damage on a Metallic it's super effective on, but it did 333 damage instead, which means that Dark and Metallic cancel each other out. Updating. 

Edited by DeathsSpook
  • Love-dis 1
Link to comment
Share on other sites

  • 2 weeks later...
On 25/4/2022 at 17:30, DeathsSpook said:

Do you have a source for this?

I don't have any official statements or something like that but it's quite easy to prove.

 

Here are some screenshots that match what I say:

lvl 8 - 4000exp (4000/500 = 8‎)

lvl 6 - 3000exp (3000/500 = 6‎)

4zgGOM5.png

 

If I do a battle and get +500exp I get 1 lvl more:

7BF4O8B.png

 

 

Las screenshot is from a lvl 6 pokemon. Let's try with a lvl 13:

 

Before battle (lvl 13 with 6682exp):

ceoX2cr.png

 

 

After battle (lvl 14 with 7063exp):

WJr4IXr.png

 

More examples bellow:

- lvl 100 = 50000 exp. 50000‎/500 = 100

- lvl 92 = 46357 exp. 46357/500 = 92.714 (Ignoring decimals)

- lvl 87 = 43919 exp. 43919/500 = 87.838 (Ignoring decimals)

- lvl 86 = 43260 exp. 43260/500 = 86.52 (Ignoring decimals)

- lvl 82 = 41490 exp. 41490/500 = 82.98 (Ignoring decimals)

- lvl 77 = 38978 exp. 38978/500 = 77.956 (Ignoring decimals)

K9iv0B8.png

 

You can check all the pokemons you want and divide the exp they have by 500. The result will be their current lvl.

 

I hope this is enough to prove it.

 

Edit: I think I fixed it now. Either way, I leave the imgur album here in case the images break again: https://imgur.com/a/ocoU0bp

Edited by texto-de-ejemplo
Link to comment
Share on other sites

 

1 hour ago, texto-de-ejemplo said:

I don't have any official statements or something like that but it's quite easy to prove.

 

Here are some screenshots that match what I say:

lvl 8 - 4000exp (4000/500 = 8‎)

lvl 6 - 3000exp (3000/500 = 6‎)

 h8OyKGg.png

 

If I do a battle and get +500exp I get 1 lvl more:

VrGYsPH.png

 

 

Las screenshot is from a lvl 6 pokemon. Let's try with a lvl 12:

 

Before battle (lvl 12 with 6182exp):

K9lGG3T.png

 

 

 

After battle (lvl 13 with 6682exp):

F28wFDE.png

 

More examples bellow:

- lvl 100 = 50000 exp. 50000‎/500 = 100

- lvl 92 = 46357 exp. 46357/500 = 92.714 (Ignoring decimals)

- lvl 87 = 43919 exp. 43919/500 = 87.838 (Ignoring decimals)

- lvl 86 = 43260 exp. 43260/500 = 86,52 (Ignoring decimals)

- lvl 82 = 41490 exp. 41490/500 = 82,98 (Ignoring decimals)

- lvl 77 = 38978 exp. 38978/500 = 77,956 (Ignoring decimals)

cd9jcsU.png

 

You can check all pokemons you want and divide the exp they have by 500. The result will be their current lvl.

 

I hope this is enough to prove it.

It would be, mostly, except none of your screenshots are showing up, at all. I'm pretty sure you're right, but I would like the actual screenshots to confirm.

Link to comment
Share on other sites

Can confirm it's 500 XP per level (wild Pokemon prove this easily because they'll always have a multiple of 500 as their XP.)

 

Money = ((sum(opponentsLvls) / sum(yourLvls)) * 500) * multiplier

 

Multiplier is a random number, chosen with this weighted distribution:

 

0.5x = 500/1000

1.2x = 300/1000

1.5x = 150/1000

2x = 45/1000

4x = 4/1000

7.5x = 1/1000

 

Sources:

https://discord.com/channels/143423644305981440/143423644305981440/708054412513509406

https://discord.com/channels/143423644305981440/143423644305981440/708053449484402770

Link to comment
Share on other sites

6 hours ago, billabob said:

Can confirm it's 500 XP per level (wild Pokemon prove this easily because they'll always have a multiple of 500 as their XP.)

 

Money = ((sum(opponentsLvls) / sum(yourLvls)) * 500) * multiplier

 

Multiplier is a random number, chosen with this weighted distribution:

 

0.5x = 500/1000

1.2x = 300/1000

1.5x = 150/1000

2x = 45/1000

4x = 4/1000

7.5x = 1/1000

 

Sources:

https://discord.com/channels/143423644305981440/143423644305981440/708054412513509406

https://discord.com/channels/143423644305981440/143423644305981440/708053449484402770

I'll post this later, but would you please edit to include screenshots of the discord as well? I want people looking at the sources to be able to trace it pretty easily, and not all of them are on the discord. 

 

(I'm aware that I'm being a little persnickety, but I want this thread to have the formulas in a way that's as beyond reproach as possible)

  • Love-dis 1
Link to comment
Share on other sites

Edit: here is the link in case images don't display properly: https://imgur.com/a/Qby6Bzd

 

Amount of exp per battle is the same as money without the multiplier part.

EXP = round((sum(opponentsLvls) / sum(yourLvls)) * 500)

 

Here are some screenshots that prove it:

 

lvl 100 vs lvl 13 -> (13/100)*500 = 65

MiopqAq.pngIrZLOod.png

 

lvl 200 (had to use 2 pokemons of lvl 100) vs various pokemons (259 lvls in total) -> ((57+48+49+50+55)/200)*500 = 647.5

wzxg0Al.png8JpzkoD.png

 

lvl 63 vs lvl 16 -> (16/63)*500 = 126,98

MLESP6P.pnguDKli9Y.png

 

lvl 50 vs lvl 17 -> (17/50)*500 = 170

8M7rplA.pngLVjJxAB.png

 

lvl 86 vs lvl 6 -> (6/86)*500 = 34,88

ZD3Iw5U.pngRuehxo4.png

 

Proof that the result is passed through round() and not ceil():

 

(65/16)*500 = 123.07

 

If the formula was EXP = ceil((sum(opponentsLvls) / sum(yourLvls)) * 500), the result would be 124 exp.

 

nEw2KG7.pngrOjPsnC.png

 

 

 

May be useful to know in case you want to know what lvl to fight to get certain amount of exp:

 

(exp_you_want/500)*sum(yourLvls) = sum(lvl of pokemon you have to fight)

 

NOTE:

-This may give a number bigger than 100. In that case you'll have to battle more than 1 pokemon. (If it's 250, you'll have to battle two lvl 100 and one lvl 50 pokemon)

 

-This may not give a whole number. In that case it's impossible to get that amount of exp with your current Lvl. This doesn't mean that it's impossible with any other lvl. Just try to solve the ecuation changing the yourLvls part and try to get a whole number.

Edited by texto-de-ejemplo
Link to comment
Share on other sites

18 hours ago, billabob said:

Yeah of course. That's a reasonable request.

 

6Zf7Y5M.png

iEF5VZ0.png

 

57 minutes ago, texto-de-ejemplo said:

Edit: here is the link in case images don't display properly: https://imgur.com/a/Qby6Bzd

 

Amount of exp per battle is the same as money without the multiplier part.

EXP = round((sum(opponentsLvls) / sum(yourLvls)) * 500)

 

Here are some screenshots that prove it:

 

lvl 100 vs lvl 13 -> (13/100)*500 = 65

MiopqAq.pngIrZLOod.png

 

lvl 200 (had to use 2 pokemons of lvl 100) vs various pokemons (259 lvls in total) -> ((57+48+49+50+55)/200)*500 = 647.5

wzxg0Al.png8JpzkoD.png

 

lvl 63 vs lvl 16 -> (16/63)*500 = 126,98

MLESP6P.pnguDKli9Y.png

 

lvl 50 vs lvl 17 -> (17/50)*500 = 170

8M7rplA.pngLVjJxAB.png

 

lvl 86 vs lvl 6 -> (6/86)*500 = 34,88

ZD3Iw5U.pngRuehxo4.png

 

Proof that the result is passed through round() and not ceil():

 

(65/16)*500 = 123.07

 

If the formula was EXP = ceil((sum(opponentsLvls) / sum(yourLvls)) * 500), the result would be 124 exp.

 

nEw2KG7.pngrOjPsnC.png

 

 

 

May be useful to know in case you want to know what lvl to fight to get certain amount of exp:

 

(exp_you_want/500)*sum(yourLvls) = sum(lvl of pokemon you have to fight)

 

NOTE:

-This may give a number bigger than 100. In that case you'll have to battle more than 1 pokemon. (If it's 250, you'll have to battle two lvl 100 and one lvl 50 pokemon)

 

-This may not give a whole number. In that case it's impossible to get that amount of exp with your current Lvl. This doesn't mean that it's impossible with any other lvl. Just try to solve the ecuation changing the yourLvls part and try to get a whole number.

 

Thank you both very much. Updated.

  • Love-dis 1
Link to comment
Share on other sites

On 4/28/2022 at 12:26 PM, texto-de-ejemplo said:

May be useful to know in case you want to know what lvl to fight to get certain amount of exp:

 

(exp_you_want/500)*sum(yourLvls) = sum(lvl of pokemon you have to fight)

 

NOTE:

-This may give a number bigger than 100. In that case you'll have to battle more than 1 pokemon. (If it's 250, you'll have to battle two lvl 100 and one lvl 50 pokemon)

 

-This may not give a whole number. In that case it's impossible to get that amount of exp with your current Lvl. This doesn't mean that it's impossible with any other lvl. Just try to solve the ecuation changing the yourLvls part and try to get a whole number.

 

This is actually EVER so slightly wrong. Basically, the rounding function makes this complicated.

 

I'm going to solve the inequalities necessary to REALLY nail the experience you get from a single battle here:

 

E = round(500*O/Y) <=>

500*O/Y - 0.5 ≤ E < 500*O/Y + 0.5 <=> 

(Y(E - 0.5))/500 < O ≤ (Y(E + 0.5))/500

 

First, because you're rounding after every single battle, you can only try to nail an exact number for the experience you want if you get the remainder you need down below a certain value. Let's say you want to earn a single level 100 pokemon to have exactly 69420 EXP (because duh). Currently, it has 50000 EXP exactly, so you need to earn 19420 EXP in a single battle. 

 

(100(19420 - 0.5))/500 < O ≤ (100(19420 + 0.5))/500

(19420 - 0.5)/5 < O ≤ (19420 + 0.5)/5 (Note: this means that, for a level 100 pokemon, you can ALWAYS earn any amount of experience points divisible by 5 EVENTUALLY)

(3884 - 0.1) < O ≤ (3884 + 0.1)

 

I could simplify further, but all you need is to find an integer that's between (3884 - 0.1) and (3884 + 0.1), and there's exactly one that fits the bill: 3884. However, this is blatantly impossible in a single battle: no battle with six pokemon in it, ever, has a combined level greater than 150*6 = 900. 

 

To try to figure out when to start fine tuning, note that the following is true:

 

E < 500*O/100 + 0.5 => E < 5O + 0.5

 

The maximum value for your opponent's levels in practical, on demand settings is 6*135 = 810 (any of the big boss team leader special battles other than Lysandre). Therefore, you should not even THINK of fine tuning, at all, unless:

 

E < 5(810)+0.5 => E ≤ 4050 (since E is an integer)

 

FURTHER, it's not really practical to assume that any arbitrary pokemon can solo one of the big boss team leader special battles. However, there ARE the Type[Blank] trainers that are specifically training accounts for any Pokemon type. They are designed so that O = 600. So therefore, you can reasonably be expected to be able to train one level 100 pokemon in chunks of:

 

E < 5(600)+0.5 = 3000.5 => E ≤ 3000

 

You should not even THINK of fine tuning for single EXPs unless your exp remaining is less than or equal to 3000. 

 

To train 1 level 100 pokemon:

 

E = round(500*O/100) = round(5O) = 5O

 

Therefore, if you're training ONE level 100 pokemon, you can only add experience points that are divisible by 5. The minimum number of experience points you can add to this is 5*6 (minimum wild pokemon battle) = 30. For certain reasons I'll get into later, the number of experience points you can get that really matters is when you fight a level 7 wild pokemon with one Level 100 Pokemon, which is 5*7 = 35

 

Because of this, I'm going to introduce the following notation: E %% n = The remainder when you divide an integer E by another integer n. If E is divisible by n, E %% n = 0

 

Observe that if you use 5 level 100 pokemon:

 

E = round(500*O/500) = O

 

Therefore, you can theoretically easily earn any arbitrary number of experience points between 6 (lowest wild type pokemon level) and 600 if you use 5 level 100 hundred pokemon in each battle. You can also easily earn 725 experience (the N battle) or 750 experience (any of the big bosses, again other than Lysandre), But this isn't quite practical for REALLY small numbers (can YOU send out 4 level 100 pokemon to die against a level 6 Corphish before killing it with another one?). If there exist training accounts that only have 6 level 6s (help: which HAVE to exist even if I don't know where, someone give me a link to one, please), then you can practically get 36 EXP per battle. 

 

One more ingredient we need to create a practical guide, here: we need a way to get a number of experience points relatively prime to 36. This is done most easily if O = 7 (attainable with a wild pokemon battle), so now we have a way to get 35 EXP per battle. 

 

For an arbitrary whole number x of integers n_iGCD(n_1, n_2, ..., n_x) is the largest integer that divides all the n_i (i.e. you can multiply the GCF by some integer f_i so that f_i * GCD = n_i for each n_i. Similarly, LCM(n_1, n_2, ..., n_x) is the smallest positive integer that all of the n_i divide evenly (i.e. you can multiply each of the n_i by some integer c_i so that  n_i*c_i = LCM for each n_i).

 

Observe the following:

 

GCD(35, 36) = 1

LCM(35, 36) = 35*36 = 1260

 

METHOD TO NAIL EXPERIENCE POINTS. (1225 ≤ Your remaining Experience Points ≤ 2484)

 

 

For any experience you want to get under this method, E = 1260I+R, where I is a positive integer and R is an integer between 0 and 1259, inclusive.

 

Equivalently, E = 1260Z+r, where Z is a nonnegative integer and r is between 1225 and 2484, inclusive. To get a positive number of battles while minimizing how many battles you want to do under this paradigm, you want Z = 0 so that E = r.  Therefore, you want your experience left to nail whatever number to be between 1225 and 2484. Battle until you reach this point. DO NOT OVERSHOOT.

 

Calculate r %% 35 = a. If r %% 36 = 0, let b = 36. Otherwise, b = r %% 36.

 

With our restrictions on r, the Chinese Remainder Theorem ends up telling us that a*36+(36-b)*35 = r.

 

 

Therefore, you want to fight (36-b) level 7 wild pokemon with your target level 100 and a trainers with 6 level 6 Pokemon using 5 level 100s including your target level 100. 
 

 

 

Edited by DeathsSpook
Link to comment
Share on other sites

NOTE: an alternative way to fulfill the battles with 35 experience is to fight a trainer with 6 level 7 pokemon using exactly 6 level 100 pokemon:

 

O = 6*7 = 42

L = 6*100 = 600

 

E = round(500*42/600) = round(5*42/6) = round(5*7) = 35

Edited by DeathsSpook
Link to comment
Share on other sites

I added a wish list to my top post: there are certain things related to wild encounters that I would quite like to know, because then I can generate a formula of "expected steps to get a particular pokemon of a particular variant" and "optimal strategies to catch Pokemon"

 

Also

 

Probability that you need at least k battles to take a pokemon from 0 happiness to at least X happiness

 

Transition matrix of target friendliness

 

Let a probability of happiness vector be an X+1 dimensional vector such that its ith value denotes the probability that a Pokemon's happiness is i-1. 

 

To transition happiness, we define an X+1 x X+1 dimensional transition matrix M s.t. for a probability of happiness vector v, Mv is the probability of happiness vector after one battle. 

 

If we’re talking about a state where we start with some probability vector of friendliness scores from 0, 1, 2, …, X, where the ith entry of the vector denotes the probability of that friendliness score exactly i-1 unless i = X+1, in which case it’s the probability that the score is at LEAST X, then the transition matrix M has the form:

 

M_{i+1,i} = 1/2, i < X

M_{i+2,i} = 1/2 i < X

M_{X+1,X} = 1

M_{X+1, X+1} = 1

M_{i,j} = 0 otherwise

 

 

Observe that M^k_{j,1} is the probability that a Pokemon starting at 0 friendliness ends up at friendliness j-1 after k iterations if j ≤ X. If j= X+1, it’s the probability that a Pokemon that is completely unfriendly gets to X+1 friendliness after at least k iterations.

 

M^k_{j,1} = 0 if j ≤ k or j ≥ 2k+2. (Excepting M^k_{X+1,1}).

 

Observe that if 2k+1 ≥ X-1, then M^k_{X+1,1} > 0. Observe also that if k ≥ X, then M^k_{X+1,1} = 1. In fact, M^k_{X+1,1} encodes the CDF of a Pokemon reaching friendliness at least X after k iterations. IE, M^k_{X+1,1} = P(Pokemon reaching friendliness at least X after at least k battles)

 

 

If 2k+1 ≥ X-1 AND k < X, then M^k_{X+1,1} = 1-sum_{j = k+1}^{X}(k choose j-(k+1))(1/2)^j

 

P(Pokemon reaching friendliness at least X after at least k battles) =

 

0 if k < X/2-1

1 if k ≥ X

1-sum_{j = k+1}^{X}(k choose j-(k+1))(1/2)^j if X/2-1 ≤ k < X

 

 

Applied to X = 219 (three hearts):

 

P(Pokemon reaching friendliness at least 219 after at least k battles) =

 

0 if k < 108.5

1 if k ≥ 219

1-sum_{j = k+1}^{219}(k choose j-(k+1))(1/2)^j if 109 ≤ k < 219

 

 

 

EDIT: I am like 90% sure I did the math here wrong somewhere. I will correct over the next couple of days

 

EDIT 2: Definitely did the math wrong. Revised math below. 

 

Observe that the probability that we get to at least X happiness in k battles exactly is P(happiness ≥ X after k battles AND happiness < X after the k-1 battles before). NOTE THAT THE LAST BATTLE IS THE ONLY PLACE WHERE ORDER MATTERS ONCE

 

Observe that these two event can co-occur in only mutually exclusive two scenarios: Either k-1 battles before gave exactly X-1 happiness, OR the k-1 battles before gave X-2 happiness AND the kth battle gave 2 more happiness. Therefore, since the kth battle is independent from the k-1 battles before it:

 

P(happiness ≥ X after k battles AND happiness < X after the k-1 battles before)

= P(happiness after k-1 battles = X-1) + P(happiness after k-1 battles = X-2)*P(kth battle gives two happiness)

 

N battles can only give exactly M happiness iff N ≥ M/2 AND N ≤ M. In this case, 2N-M battles would have to give 1 experience and M-N battles would have to given 2 experience. Therefore, there are N choose M-N ways for this set of outcomes to occur (saying there are N choose 2N-M is exactly equivalent). We can exclude the the k-1 = X possibility: we would not be able to get exactly X happiness in X+1 battles. Therefore, if k-1 ≥ M/2 AND k-1 < M:

 

P(it takes exactly k battles to get at least X happiness)

= P(happiness after k-1 battles = X-1) + P(happiness after k-1 battles = X-2)*P(kth battle gives two happiness)

=  ((k-1) choose (X-k)) *(1/2)^(k-1)+ ((k-1) choose (X-k-1)) *(1/2)^(k-1)*(1/2) 

= (1/2)^k*(2*((k-1) choose (X-k))+((k-1) choose (X-k-1))

 

If k = X/2 exactly, then every battle must be 2 happiness battle, which has a probability of occurring of (1/2)^(X/2). Analogously, if k = X exactly, every battle must be a 1 happiness battle, which has probability (1/2)^X

 

Therefore:

 

P(it takes exactly k battles to get at least X happiness) = 

 

0, if k < X/2 OR k > X;

(1/2)^(X/2) if k = X/2 ; 

(1/2)^k*(2*((k-1) choose (X-k))+((k-1) choose (X-k-1)) if k-1 ≥ X/2 AND k-1 < X

(1/2)^X if k = X. 

 

For 219 happiness (three hearts), this comes out to E[number of battles for 219 happiness] = ~146. Variance is ~16.32, and the PDF looks fairly normally distributed, so you can approximate this as a normal distribution with mean 145.888.. and sd ~ 4.04

 

For 254 happiness (four hearts), this comes out to E[number of battles for 254 happiness] = ~169. Variance is ~18.92, so again use the central limit theorem to approximate this as normal with mean 169.222... and sd ~ 4.35

Edited by DeathsSpook
  • Love-dis 1
Link to comment
Share on other sites

  • 2 weeks later...

Made some important edits to the friendship formula, in that it is now accurate whereas it was not before. 

 

Also, I will be very grateful to anybody who can give me formulae for catching probabilities, with citations. 

 

EDIT 2022-07-20: I'm compiling a list of questions here for some of the developers (I'm hoping @Patrick will answer even though they're probably super busy)

 

 

  1. With regards to the Ranking Points formula, the two questions I have are a) The current formula seems to reward number of battles but penalize the number of wins. Is that correct? Further, b) What is the base of the logarithm in the Ranking Points formula? The Ranking Points formula as I have it, after some algebra, is Ranking Points = (t * √(u/n) * Log(b)) / 1000, where:
    1. t = Total Experience of all of your Pokemon, summed together. 

    2. n = Your total number of Pokemon

    3. u = Your total number of unique Pokemon. Note that variants of the same species count as different pokemon, e.g. Dark Mawile, Shiny Mawile, and Mawile are three unique pokemon. 

    4. b = (Battle Count (presumably now only in the battle tower))/ (Wins). 

  2. How is the probability of catching a Pokemon calculated? I could not find Probabilities of catching a Pokemon at all. I'm assuming it's based on ball modifiers, HP, level, status conditions(?), and so forth, but I don't know what relationship any of these variables have to the final probability. 
  3. How are encounter probabilities decided? I see a couple of separate possibilities. For clarity, I will use the term "variant-rarity" as a noun meaning "the co-occurrence of a variant and rarity": e.g. "Shiny-rare is a variant-rarity." For all examples, I will use a theoretical route with Common Starly and Swablu, Rare Fennekin and Staravia, Legendary Rayquaza, and UB Kartana, assuming the player has all badges.
    • Does the RNG first decide if an encounter happens at all and THEN what type of encounter that is, or does it roll to decide between types of encounters and no encounter in one go?  The former would be "First check if an encounter happens this step. IF an encounter happens, decide the variant-rarity". The latter would be "For each variant-rarity, check if it occurs at this step. If none of them occur, then no encounter occurs." (I suspect the former is the case: the probability of an encounter happening at all divides out a bit too cleanly from the probabilities of encountering a specific variant-rarity and of encountering a specific variant-rarity given an encounter occurs at all.)
    • Are variants and rarities rolled separately or together? For example, does RNG decide first that I'm getting a shiny Pokemon, then a rare pokemon, or does it roll in one go and decide that I'm getting a Shiny-rare?
    • Are Pokemon appearances in a particular variant rarity uniformly distributed? EG, is my probability of getting a shiny Swablu given that rolled into the Shiny-common pool 1/2?
    • Are variant-legends and variant-UBs pooled together into a single variant-veryRare pool? EG, to get a Shiny Kartana, do I have to roll Shiny-veryRare and then there's a 1/2 probability of getting it, or did I roll to get into a separate Shiny-UB pool and then Kartana appears because it's my only option? 

 

 

Edited by DeathsSpook
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...