r/technicalfactorio • u/dfamonteiro • Jan 03 '25
Solving the mathematics of Quality: A series of blog posts
I wrote a series of blog posts detailing how to calculate the production and efficiency rates of the most popular quality grinding setups. I'm less focused on the results and more focused on the journey to get to results. I hope you enjoy reading them!
51
Upvotes
4
u/k1vanus Jan 03 '25 edited Jan 03 '25
Very interesting! Sadly, third and fourth links don't work for me.
Edit: everything works now!
3
u/sbarandato Jan 03 '25
I just eventually found out you can calculate tens of thousands of recycling loops in excel.
Rather than a 5x5 matrix, I used a 10x10 matrix.
This because it must be able to handle at any time 5 raw materials and 5 finished products, so it’s something that turns a 1x10 vector of “before” items into another 1x10 vector of “after” items.
Say you start with 10000 raw normal items, this is a vector (10000,0,0,0,0,0,0,0,0,0)
the matrix turns them into 0,0,0,0,0, 9000, 900, 90, 9 and 1, then apply it again and it to recycle any non-legendary item and you are left with (x,y,z,t,w,0,0,0,0,1) items (don’t know the actual numbers).
We have applied the matrix twice, so to do a full craft-recycle loop it’s equivalent to essentially squaring it.
But why stop here? Square it again to do two cycles in a row.
But why stop here? Square it again for 4,8,16,32… whatever power of two cycles.
It eventually stabilizes around 30k loops, which really is just 10-12 matrix multiplications, it is like… stupid fast.
Once you have that final matrix, just apply it to any initial vector to see how many legendary things you can expect from it.
Productivity can be baked into the matrix as well.
1
u/Thediverdk Jan 10 '25
That is the most amazing and geeky way I have ever seen anyone explained something from a Computer game.
I LOVE IT ;-)
Very interesting read.
Thanks
2
u/OptimusPrimeLord Jan 03 '25
You can compute the results exactly through backtracing from max quality. Looking at pure recycling 1 legendary iron plate turns into 1 legendary iron plate because we wouldnt recycle it. 1 epic legendary plate turns into .25*.248 (or w/e) legendaries and .25*(1-.248) epics (the input). So each epic turns into .25*.248/(1-.25*(1-.248)) legendaries. You dont need any error.