Upload Labs

Upload Labs

Not enough ratings
Optimized Hack
By Cain
Hack Optimization
   
Award
Favorite
Favorited
Unfavorite
Introduction
After hours of collecting data analysign it and trying to come up with a working system, it’s finally done.
Why Infection?
I chose Infection because it’s reliable, i didn't test payload as extensively but it does not provide the reliability that Infection Damage does, it depends solely on critical damage and those are few and far between.

Execute Injection node, is a must if the vulnerability is greater than 2×.

For Anonymous (the one that gives Experience) and Corporations, no hack nodes are used besides the vulnerability one.

For Banks and Government, Ghost becomes useful since both Firewall and Breached stats share the same value.

My setup for reference:
Upgrades
There are a few upgrades that directly affect how far you can go:

Sneak Attack
Infection Specialist
Infection Damage
Breach Speed

Sneak Attack increases the time you have to overcome defenses, which massively boosts your win rate. Since each higher level gives 4× more rewards, it’s very powerfull.
Infection Specialist is essential, it gives a large damage boost for a low cost.

About Spoil Upgrade
In my testing, Spoil increased gains by about 4×, which is the same benefit as reaching the next threat level. Since spending those points may help you beat the next level anyway, the impact isn’t huge. I personally like buying it, but it’s optional.

Infection Damage vs Breach Speed

These upgrades are described as:

Infection Damage, Increases Infection Damage by 10%
Breach Speed, Increases Breach Speed by 4%

I tested both by investing all points into one at a time (with the same hack interface level) and found:

Damage scales linearly
Speed scales quadratically

Investing fully into damage gives an early advantage, higher DPS until around the 12th upgrade.
At the 13th speed upgrade, Speed-based DPS surpasses Damage-based DPS. Based on the description and the data this were the formulas i found:

Base damage = d = constant

Time per attack: St(x) = 1 / (1 + 0.04x)^2


Damage formula (DPS): D(x) = d * (1 + 0.1x)


Speed formula (DPS): S(x) = d * (1 + 0.04x)^2


So, to have DPS with both speed upgrades and damage upgrades a function with two variables is needed:

Variable Damage per second
F(x,y) = D(y)/St(x)
F(x,y) = (1 + 0.1y) * (1 + 0.04x)^2

But to make things easier N is the total number of points we are able to spend in this two upgrades, not counting Sneak Attack, Infection Specialist, or Spoil.

y = N - x

Now we have only one variable "x" and the function becomes:

F(x) = (1 + 0.1(N − x)) * (1 + 0.04x)^2

Optimizing

To find the best distribution of points, take the derivative and set it to zero:

F'(x) = 0.00048x² + (0.0128 − 0.00032N)x + (0.02 − 0.008N)

So we solve:

0.00048x² + (0.0128 − 0.00032N)x + (0.02 − 0.008N) = 0

Use the quadratic formula to find the two roots. Take the positive root as your candidate for the Speed upgrade.

Since the result may be a decimal, test both the rounded-up and rounded-down values to confirm which gives the better DPS. Then again: y = N − x

And you get your optimal numbers.
x = points spent on speed upgrades
y = points spent on damage upgrades

But doing this over and over is a hassle so i made a code that makes those exact things, to use it paste de code in any C++ coding enviroment compile and execute, then, follow what the program asks for and it will give you the answer. The program must be executed everytime you want a new answer because i haven't learned how to make it different if someone wants to edit the code and make it better feel free to do it, if you do please comment on this guide your code or a link to it so everyone can benefit from it!

#include <iostream> #include <cmath> #include <vector> #include <algorithm> using namespace std; double F(int x, int N) { int y = N - x; return (1.0 + 0.1 * y) * pow((1.0 + 0.04 * x), 2); } pair<int,int> optimal_allocation(int N){ double a = 0.00048; double b = 0.0128 - 0.00032 * N; double c = 0.02 - 0.008 * N; vector<double> roots; double disc = (b*b) - (4*a*c); if (disc >= 0) { double sqrtD = sqrt(disc); double r1 = (-b + sqrtD) / (2 * a); double r2 = (-b - sqrtD) / (2 * a); if (0 <= r1 && r1 <= N) roots.push_back(r1); if (0 <= r2 && r2 <= N) roots.push_back(r2); } if (roots.empty()) { roots.push_back(0); roots.push_back(N); } vector<int> candidates; for (double r : roots) { int f = floor(r); int c = ceil(r); for (int k : {f, c}) { if (0 <= k && k <= N) candidates.push_back(k); } } double bestValue = 0; int bestX = 0; for (int x : candidates) { double value = F(x, N); if (value > bestValue) { bestValue = value; bestX = x; } } return {bestX, N - bestX}; } int main() { int N; cout << "Type the total number of points to distribute: "; cin >> N; auto [x, y] = optimal_allocation(N); cout << "\nOptimal Distribution for " << N << " points:" << endl; cout << " - Speed: " << x << endl; cout << " - Damage: " << y << endl; return 0; }
5 Comments
Dangercrow 18 Dec @ 2:27pm 
> if someone wants to edit the code and make it better feel free to do it, if you do please comment on this guide your code or a link to it so everyone can benefit from it!

Used AI to convert this to JS and hosted it in my Github:
https://dangercrow.github.io/upload_labs

It updates dynamically as you change the value.
I tried to also showcase where the next points would go.
Note in time it converges to a 2:1 ratio.
Reformatio 17 Dec @ 6:40am 
What to do before Execute Injection?
iqblank 10 Dec @ 5:49pm 
Wow, that's very helpful. I've tried it with the C++ Online Compiler and it works. Can you do an analysis if we use the payload damage method?
goldn 9 Dec @ 2:39am 
very good one ! thanks for the code
AthrendFyre 5 Dec @ 1:45pm 
Way too much work, just Hack -> Execute & Launch -> Ghost -> Crit -> Crit -> Crit -> Crit -> Breach