What Makes Some Wild Pokemon Aggressive?

Since the introduction of Raids in July, many of our travelers have reported that some Pokemon are seemingly more “aggressive” in wild encounters.  (We’re looking at you, Tyranitar).

The Silph Research Group has taken a deeper look into the mechanics of Pokemon encounters – across Raids, Incense, Lures, and those in the wild – and identified the previously unconfirmed systems governing Pokemon behaviors!

In this article, we will articulate:

  1. How the timing between two actions of a Pokemon is governed by two different delays
  2. The probabilities of a Pokemon taking a given course of action (e.g. attacking, dodging)
  3. How lured, incensed, and Raid Pokemon differ from standard wild Pokemon encounters
  4. And how exactly Nanab Berries calm a Pokemon

Let’s dive in!

Pokemon Actions

We’ll begin with the easy stuff.  There are two actions that Pokemon can take during an encounter.

Attacking

The first is an action shared between all species, which we will call the attack action.  This action can be easily observed when the Pokemon visibly attacks the trainer with a unique animation. A white warning flash previously appeared around the screen’s edge but was recently removed. (It is unclear at this time whether it will be returned to Pokemon encounters.)  When a Pokemon is attacking, the Pokemon’s ring will disappear, and it will deflect any Pokeballs thrown for exactly two seconds.

Dodging

The second is an action that differs depending on the encountered species, which we will call the Dodge action.  The Pokemon can still be hit by pokeballs while dodging, but it will be more difficult to do so. Dodging takes one of five different forms:

1. Jumping: The Pokemon jumps upwards before returning to its initial position

2. Electric: The Pokemon moves to random locations on the screen either 4 or 5 times, before returning to its initial position

3. Flying: The Pokemon moves up or down and settles into a new resting position (until its next Dodge)

4. Psychic: The Pokemon moves left and right in a figure-8 pattern before returning to its initial position

5. Hovering: The Pokemon moves left or right and settles into a new resting position (until its next Dodge)

Action Timings and Probabilities

We now know how a wild Pokemon can act, but the following questions remain: when, and what actions will it take? And finally, how is this determined?

It turns out, there are specific, predictable moments throughout an encounter in which a Pokemon can take action. We will call these moments decision points.  At every decision point in an encounter, a Pokemon will randomly select one of three options: Attack, Dodge, or Idle.  When a Pokemon idles, it takes no action and simply stays where it is until the next decision point.

The chance that a Pokemon will attack or dodge is determined by its species’ individual constants defined in the game’s GAME_MASTER file.  Some examples of these values are:

Species Attack Chance Dodge Chance
Rattata 20% 30%
Pidgey 10% 15%
Sudowoodo 5% 0%
Beedrill 40% 20%


So, when do these decision points occur? This is where things start getting tricky.

Two separate rhythms dictate when decision points will occur.  Roughly speaking, the time between two successive actions (more precisely: their decision points) can be described by the formula

Animation Delay + N * Recurring Delay     with N=1,2,3,...

Let’s have a more detailed look into this:

Animation Delay

It appears that a Pokemon cannot start a new action during an ongoing attack or dodge. This delay in decision points is a period we define as the animation delay.

Two factors determine the animation delay–the action taken and the species’ constants in the GAME_MASTER file.

Action Animation Delay
Attack 2s
Jump¹ (√3 – 1) * jumpTimeS
Flying dodgeDurationS
Hovering² dodgeDurationS
Psychic dodgeDurationS
Electric³ (4 or 5) * dodgeDurationS

¹ The empirically determined factor of .7323 for Jump Animation Delay was approximated as √31
² Our data did not suggest that moving either left or right is more likely
³ Our data did not suggest that moving either 4 or 5 times is more likely

Some examples of these values are:

Species  jumpTimeS
Rattata 0.9
Pidgey 1.4
Tyranitar 1.2
Snorlax 1

 

Note that the above animation delay values do not necessarily coincide with the visual duration a player perceives while playing. Depending on the action, the latter is usually slightly longer.

The animation delay is only executed after a Pokemon has chosen to take an action at a decision point.  So what happens after an action’s animation delay is complete, or when a Pokemon decides not to take an action at a decision point?

Recurring Delay

When no action is chosen at a decision point or the animation delay completes, the second rhythm comes into play: the recurring delay.

This is the uniform, recurring time increment until the next decision point and is determined by the type of encounter entered. The recurring delay is not affected by the Pokemon’s species!

The types of encounters and the corresponding recurring delay are given by the following table:

 Encounter Type Recurring Delay
Wild Pokemon 1.6s¹
Lure & Incense Pokemon Random Uniform Distribution² from:
(2-√3) * jumpTimeS to 1.6s¹
Raid Boss Reward Encounter 0.6s

¹ Every species in the GAME_MASTER currently has a maxPokemonActionFrequencyS of 1.6. We believe this empirically observed value is based upon this GAME_MASTER value.
²  The recurring delay is determined once at the start of an encounter and remains constant throughout.

Nanab Berries

There is one additional factor beyond the encounter type that influences the recurring delayNanab Berries!  

When feeding a Pokemon a Nanab Berry, the recurring delay is multiplied by 20! The reciprocal value of this factor can also be found in the GAME_MASTER: itemEffectPercent = 0.05

Implications and Notes

  1. Aggressive PokemonWild Pokemon encountered in Raids, lures, and incense have long seemed more aggressive.  These “hyper-active” encounters are explained by their shorter recurring delay, which allows for attacks and dodges to occur more frequently.
  2. Throwing Strategy: After a wild Pokemon’s attack concludes, there is always a window of time equal to the encounter’s recurring delay during which the capture circle is re-enabled, but another action can not yet be performed.  Try timing your Pokeball so it lands during this window to ensure it is not dodged or knocked away!
  3. Nanab Implementation: Niantic could have implemented Nanab Berries in two different ways: increasing the length of the recurring delay, or decreasing the chance of an action at each decision point. With the former implementation, there is a relatively long period of time during which the Pokemon definitely cannot attack or dodge.  With the latter, there would have been a very low (though still nonzero) chance of an attack or dodge at almost any given moment.
  4. Nanab Mythbusting: Nanab Berries do not have lingering effects.  The recurring delay was measured before, during, and after the berry feeding, and the same value was found both before and after the effect was present.
  5. Visual Technicalities: It is interesting to note that the visual duration of a jump is longer than its animation delay value. However, due to the recurring delay afterwards the animation will never be interrupted. Notice that this is explicitly the case for lured and incensed Pokemon as well, even though their recurring delay has been empirically observed to be random. Even in case of the briefest delays, the sum of animation delayrecurring delay would be (3 – 1 + 2 – √3) * jumpTimeS =  jumpTimeS, which approaches the time a jump animation takes on screen.
  6. Weather Boosted: Since the implementation of weather mechanics, we have conducted preliminary analysis into whether the weather boost affects any timings involved in an encounter. At this time we do not believe that weather has any effect.

Methodology

The Silph Research Group analyzed screen recordings of wild encounters frame-by-frame to record accurate timings of attack and dodge onsets.

Using these timestamps, the intervals of time between the onset of each action and that of the next were found and partitioned into two sets–those that follow an attack and those that follow a dodge.  Within these sets, we find that interval lengths differ only by integer multiples of a specific value.  This value is the encounter’s recurring delay, and should be the same for each of the two sets.

For example, we may see intervals of {3.6s, 5.2s, 6.8s, … } after attack actions, and intervals of {2.3s, 3.9s, 7.1s, … } after dodge actions.  Notice that the values within each set differ by some multiple of 1.6s, and always by at least 1.6s.  Thus, the recurring delay is determined to be 1.6s.

Once the recurring delay has been found, subtracting this value from the minimal interval in the attack/dodge set yields the animation delay for the attack/dodge action.  In our example, subtracting 1.6s from the minimal interval length after an attack action, 3.6s, yields 2s. Note that this is exactly the time the catch circle of a Pokemon disappears when it attacks.  Subtracting 1.6s from the minimal interval length after a dodge, 2.3s, yields an animation delay of 0.7s.

Once both the recurring delay and the animation delay were discovered, all decision points in the recorded encounters could be counted and the number of attack and dodge actions taken was able to be verified as consistent with the attack and dodge probabilities found in the GAME_MASTER file.


NOTABLE RESEARCHERS

Many thanks to Silph Scientists PiFlavour and davidhappleton for both designing and managing this special project, each of whom spent many hours poring over screen captures frame by frame.