General

Mathematical Starforce

Many of us looked at the KMS charts for starforce's superior item enhancement statistics and numbers.
Now that it's all been changed to an extent I yearn for a person to figure out the same things.
We have success rate, cost per attempt, boom rate and degrade rate.

How would one go about calculating the average cost to achieve a certain star, as well as average boomed items at certain star check points?
EDIT: Some partial aid for lazy pink beany baby butts.
[url=http://imgur.com/lTEoypy]Cropped Percentages and cost, side by side.[/url]
[url=http://oi62.tinypic.com/2ywbalj.jpg]@hyperfire7 's chart, shows cost to reach a star.[/url]
Assume 0 cost tyrant

December 3, 2014

20 Comments • Newest first

Randomcity2

Average total cost from zero to xx stars for tyrants plus cost from one to next star on the right:
1 Stars ~ 111,781,089 mesos
2 Stars ~ 334,747,583 mesos - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[1>2 ~ 223125571 mesos]
3 Stars ~ 699,998,999 mesos - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[2>3 ~ 362128766 mesos]
4 Stars ~ 1,272,053,487 mesos - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [3>4 ~ 568414228 mesos]
5 Stars ~ 2,049,710,610 mesos - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [4>5 ~ 787924106 mesos]
6 Stars ~ 3,090,710,354 mesos | destroyed: ~ 0.043 - - - - - - - - [5>6 ~ 1053000317 mesos | destroyed: ~0.045]
7 Stars ~ 4,537,479,544 mesos | destroyed: ~ 0.19 - - - - - - - - - - [6>7 ~ 1452862717 mesos | destroyed: ~0.14]
8 Stars ~ 6,608,690,017 mesos | destroyed: ~ 0.47 - - - - - - - - - - [7>8 ~ 2078473126 mesos | destroyed: ~0.29]
9 Stars ~ 9,797,153,062 mesos | destroyed: ~ 0.99 - - - - - - - - - - [8>9 ~3170482843 mesos | destroyed: ~0.52]
10 Stars ~ 15,887,073,168 mesos | destroyed: ~ 2.08 - - - - - - - -[9>10 ~6049610374 mesos | destroyed: ~1.07]
11 Stars ~ 29,233,101,758 mesos | destroyed: ~ 4.52 - - - - - - [10>11 ~13287226117 mesos | destroyed: ~2.45]
12 Stars ~ 58,021,875,793 mesos | destroyed: ~ 9.88 - - - - - -[11>12 ~28747478307 mesos | destroyed: ~5.33 ]

13 Stars ~ 1,383,110,566,683 mesos | destoyed: ~ 257.28
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [12>13 ~1,330,006,796,966 mesos | destoyed: ~248.32]

14 Stars ~ 71,100,015,402,344 mesos | destroyed: ~ 13,263.99
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[13>14 ~70,442,661,707,581 mesos | destoyed: ~13142.26]

15 Stars ~ 6,888,872,904,106,804 mesos | destroyed: ~ 1,285,023.37 | ~123,385,303 upgrade attempts
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [14>15 ~6,811,821,275,900,769 mesos | destroyed: ~1,270,649.37]

using this c++ code:
#include <iostream>
#include <iomanip>
#include <random>

int main()
{ const int equipNum=100000; //number of equips simulated
int numTries[equipNum], numDestroy[equipNum];
int successRate[]={50,50,45,40,40,40,40,40,40,37,35,35,3,2,1}, destroyRate[]={0,0,0,0,0,3,5,7,10,15,20,25,50,50,50};
int consecutiveFails=0,currentStars=-1,previousStars=0,desiredStars=0,a=-1;
double averageNumTries=0,averageNumDestroy=0,averagecost=0;

std:efault_random_engine engine;
std::uniform_real_distribution<double> gen(0.0, 1.0);
while(desiredStars>15 || desiredStars<1){
std::cout << "Please enter the desired number of stars (up to 15): ";
std::cin >> desiredStars;
}
while(a<0||a>desiredStars){
std::cout << "Please enter the current number of stars (up to 14): ";
std::cin >> a;
}

currentStars=a;
for(int i=0;i<equipNum;i++){numTries[i]=0;numDestroy[i]=0;}
for(int i=0;i<equipNum;i++){

while(currentStars<desiredStars){
if(consecutiveFails==2&&previousStars!=0){ //Chance Time!
consecutiveFails=0;
currentStars++;
}
else if(gen(engine)*100<successRate[currentStars]){ //Pass
previousStars=currentStars;
consecutiveFails=0;
currentStars++;
}
else if(gen(engine)*100<destroyRate[currentStars]){ // Fail(Destroy)
currentStars=0;
consecutiveFails=0;
numDestroy[i]++;
}
else{ // Fail(Drop)
if(currentStars>0){consecutiveFails++;currentStars--;}
}
numTries[i]++;
}
currentStars=a;
}

for(int i=0;i<equipNum;i++){averageNumTries+=numTries[i];averageNumDestroy+=numDestroy[i];}
averageNumTries/=equipNum;
averageNumDestroy/=equipNum;
averagecost = averageNumTries * 55832200;

std::cout << "Average Total Cost to go from " << a << " stars to " << desiredStars << ": " << std::setprecision(18) << std::setw(24) << averagecost << " mesos" << endl;
std::cout << "Average Number of tries to go from " << a << " stars to " << desiredStars << ": " << std::setprecision(10) << std::setw(24) << averageNumTries << endl;
std::cout << "Average Number of times destroyed: " << std::setprecision(10) << std::setw(24) << averageNumDestroy;
std::cin >> a;
return 0;
}

Reply February 8, 2015 - edited
loxiona

My own script written in python
trials: 10000

star # : total cost average (marginal cost average (simulated separately))
star 1 : 112.87m
star 2 : 335.24m (+226.42)
star 3 : 696.94m (+363.07)
star 4 : 1266.22m (+581.25)
star 5 : 2072.98m (+802.04)
star 6 : 3167.73m (+1084.92)
star 7 : 4822.18m (+1644.70)
star 8 : 7364.27m (+2616.51)
star 9 : 11753.92m (+4589.88)
star 10 : 21155.26m (+9509.62)
star 11 : 43768.76m (+22501.96)

marginal cost average is the cost to go from the previous star to the next star ex: Going from 1 star to 2 star is 226m~
total cost average is the cost to go from no stars to that star.

My numbers are pretty much the same to what @lazypando is getting for the first 5. Not quite getting what @hyperfire7 has though.

Reply December 4, 2014 - edited
StolenProperty

I've whipped up a quick simulation that takes the cost of the item into account as well for Superior Items. The code's available [url=http://ideone.com/66Fo0A]here[/url], if anyone's interested. Hopefully I didn't screw anything up, since it's almost 5am here. I've made the assumption that the probability of failure and the probability of an item being destroyed are independent.

Ideone might not let you run absurdly large amounts of test cases, as they have a 5 second execution limit on programs. You can try registering an account, which brings your execution time up. If that still doesn't work, just download the code and run in Netbeans or something.

Standard input takes in 4 values:
1. the amount of test cases to run
2. the initial amount of stars on your equipment
3. the final amount of stars on your equipment
4. cost of the equipment (assuming you're always buying at the same cost)

Sample Input:
1000 0 13 2000000000
1. Run 1000 test cases
2. Start at 0 stars
3. Go up to 13 stars
4. The cost of the item is 2000000000 (2b)

It gives you the average cost (including repurchasing equipment) and the average amount of times the item was destroyed.

To get to 13 stars, it costs ~1,861,168,868,874 (assuming the item costs 2b) and the item gets destroyed ~255 times.

Reply December 3, 2014 - edited
duriel123

Well, I figured out a method to theoretically compute the probability distribution function for the number of successes given k enhancements, but its a real pain to actually plug the numbers in. If I put a huge ass function here would anyone be willing to do the gruntwork and plug in the numbers?

Reply December 3, 2014 - edited
hyperfire7

Ok here is the revised one. http://oi62.tinypic.com/2ywbalj.jpg
It STILL doesn't apply the cost of replacing the superior item when it booms (since price of tyrant equips differ by which tyrant item it is, by server, and by time).

Reply December 3, 2014 - edited
lazypando

ran simulations (1000 runs per star)
code here: http://pastebin.com/SRFUyLBy

for tyrants:
1st star - 111,664,400 mesos
2nd star - 223,328,800 mesos
3rd star - 368,827,513 mesos
4th star - 591,486,326 mesos
5th star - 774,336,781 mesos

numbers are averages over 1000 runs, not exact
i'd say give or take 10%

too lazy to do past 5 star because how would you value a destroyed item?

disclaimer: all of this could be wrong though. literally spent 5minutes on the code

Reply December 3, 2014 - edited
johnadrianli

[quote=cb000]I wrote a script to simulate Star Force and am running the simulations right now. The simulation for Tyrants will take a while, though.[/quote]

OP please deliver

Reply December 3, 2014 - edited
cb000

I wrote a script to simulate Star Force and am running the simulations right now. The simulation for Tyrants will take a while, though.

Reply December 3, 2014 - edited
Rationalism

I see you got your suit.

Reply December 3, 2014 - edited
Pufin

Dammit you got my hopes up. I'm expecting the 12 bil to go up exponentially

Reply December 3, 2014 - edited
epikkhighh

[quote=hyperfire7]Oh the star decreases if you fail?
Damn nvm.[/quote]

yes, for superior. 100% chance

Reply December 3, 2014 - edited
hyperfire7

[quote=Snowman]1st star cost: 111m
1=>2 star attempt: oh gg you failed, 0 stars again. 55m
1st star redo: 111m
2nd star attempt: hooray! 2 stars! 55m
That's 333m ish unless I'm terribly mistaken..
I'm rather young and look up to others' math knowledge, so please correct me if I did make a mistake
toomanyedits: @above, Yes but for consistency's sake let's use Starforce values as AEE values vary per world.[/quote]
Oh the star decreases if you fail?
Damn nvm.

Reply December 3, 2014 - edited
Snowman

[quote=hyperfire7]Yes.
However, the chart doesn't factor the # of times you'll have to repurchase a clean version of the equipment to apply the equipment trace should it get destroyed. So expect the average total cost to rise significantly after the 9th star.[/quote]

1st star cost: 111m
1=>2 star attempt: oh gg you failed, 0 stars again. 55m
1st star redo: 111m
2nd star attempt: hooray! 2 stars! 55m
That's 333m ish unless I'm terribly mistaken..
I'm rather young and look up to others' math knowledge, so please correct me if I did make a mistake
toomanyedits: @above, Yes but for consistency's sake let's use Starforce values as AEE values vary per world.

Reply December 3, 2014 - edited
epikkhighh

cant you just aee the first star? since the first one is 100%?

Reply December 3, 2014 - edited
hyperfire7

[quote=Snowman]Does this chart take into account the average amount of times you have to repeat a certain enhancement after you downgrade?
12 billion seems like a dream. [/quote]
Yes.
However, the chart doesn't factor the # of times you'll have to repurchase a clean version of the equipment to apply the equipment trace should it get destroyed. So expect the average total cost to rise significantly after the 9th star.

Reply December 3, 2014 - edited
Snowman

[quote=hyperfire7]http://oi60.tinypic.com/a0e39s.jpg
There you go.[/quote]

Does this chart take into account the average amount of times you have to repeat a certain enhancement after you downgrade?
12 billion seems like a dream.
EDIT: I feel these numbers will help greatly the more I stare into the grid-ed screen. Thanks!

Reply December 3, 2014 - edited
hyperfire7

Nvm the chart was bogus.

Reply December 3, 2014 - edited
Iamshorttt

I'll calculate it as soon as I get out of Hene...

Reply December 3, 2014 - edited
jonathansayshi

I'd say, don't even bother enhancing Tyrants with Star Force, unless you're trying to get to the 4th star, 5th if you're willing to risk that 3% boom chance. It's more cost efficient to enhance with the old method (Superior Protection Scrolls from 5-7, then No Booms from 8-15), than using the Star Force method, since you can't protect your Tyrant, and although you're provided an Equipment Trace, you still need a brand new Tyrant, and that depends on the cost of each Tyrant in your server.

Reply December 3, 2014 - edited
CherryTigers

If anyone can calculate this for my lazy pink bean butt, I'll gladly give you... a hi-five.

Reply December 3, 2014 - edited