How are the glyph hack bonuses calculated?

Did anyone come across a formula for the calculation of the glyph hacks? There seem to be many questions and attempts at it but I couldn't find any definite answer.


Solution 1:

The formulas in this post on glyph hacking are based on extensive field testing.

Relevant part from the post:


+------------+--------------------+------------+
| Portal lvl | Perfect hack bonus | Time limit |
+------------+--------------------+------------+
|          1 |               +28% |        20s |
|          2 |               +40% |        20s |
|          3 |               +55% |        20s |
|          4 |               +55% |        19s |
|          5 |               +55% |        18s |
|          6 |               +80% |        17s |
|          7 |               +80% |        16s |
|          8 |              +112% |        15s |
+------------+--------------------+------------+

Hack bonus:

Bhack = 10 × Gcorrect + P × Bperfect

Speed bonus:

Bspeed = P × ⌊100 × Tleft ÷ Tlimit

AP:

APbase = 50 × Gcorrect

APbonus = 20 × P × 20.5×Gcorrect

AP = APbase + APbonus + Bspeed

where:

  • P is 1 if all glyphs were drawn correctly and 0 otherwise (P = ⌊Gcorrect ÷ Gtotal⌋),
  • Bhack is the hacking bonus,
  • Gcorrect is the number of glyphs you got correct,
  • Gtotal is the total number of glyphs in the sequence,
  • Bperfect is the perfect hack bonus corresponding to the number of glyphs in the sequence, as shown in the table above,
  • Bspeed is the speed bonus,
  • Tleft is the time remaining on the clock,
  • Tlimit is the total time you were given to draw the sequence, as shown in the table above,
  • APbase is the amount of AP earned for correctly-drawn glyphs,
  • APbonus is bonus AP earned for drawing all glyphs correctly,
  • AP is the total amount of AP earned from the glyph hack. (Note: Does not include AP from hacking enemy portals.)

Example: Suppose you perform a perfect glyph hack on a L7 portal with 5 seconds left. Your hacking bonus would be 10% × 4 + 1 × 80% = 120% (4 correct glyphs and perfect hack bonus). Your speed bonus would be 1 × ⌊100 × 5 ÷ 16⌋ = 31% (5 out of 16 seconds left). Finally, you would earn 8 glyph hacking points and 50 × 4 + 20 × 1 × 20.5×4 + 31 = 311 AP.