laurenth · 220 points · 80 comments · kemarin · Open original
Comments
5 preview comments · loading full thread
Log in to use comments
Log in to h4cker, then connect Hacker News to publish comments.
SCscottmsul4 jam yang lalu
Oh boy, this is a rabbit hole I've gone down pretty hard as well. I made a python script and a separate js app for running linear solvers on the upcycling problem. I really like the author's exposition for how to setup the solve matrix, as it's the first step when understanding the quality math.
Speaking very high level, probably the most interesting and counter-intuitive thing I learned from doing these projects is that adding just a touch of speed modules can go a long way, especially at the lower quality levels. Of course, if the only thing being optimized is legendary outputs per common input, then speed is always bad. But because an upcycler works much better when the buildings and modules are themselves legendary, usually the limiting factor is the (very expensive) crafting machines, rather than the amount of input lines. Adding a touch of speed can give way more throughput for the same number of legendary crafting machines, at the cost of some wasted inputs, which isn't a big deal when you can slap down a few more cheap miners.
Python script: https://github.com/scottmsul/FactorioQualityOptimizer
JS source: https://github.com/scottmsul/upcycle
JS app: https://scottmsul.github.io/upcycle
DADanielHB9 jam yang lalu
If anyone is interested I made a build that can make most items at the highest quality possible using a single assembler by switching the active recipe on the assembler. You just throw in the basic resources for the base items in the recipe and it just builds the whole thing at legendary quality.
https://www.reddit.com/r/FactorioBlueprints/comments/1gl5v50...
It takes a bit of setup for each item you want to make though and doesn't work if the process takes more than one fluid. The default in the blueprint is to make blue circuits.
Unfortunately factorio has this mechanic where if you switch the item an assembler is making it loses progress for productivity bonuses, so this setup is not really practical for many items. Plus it takes a lot of space. But it is fascinating to see it work.
MImichael-online2 jam yang lalu
> Factorio pretty much founded the factory video game genre
I feel very nerd sniped by this one! Factorio was heavily influenced by minecraft mods like industrialcraft2 which create factories inside of minecraft. Here's the factorio creator discussing it in 2013 https://forum.industrial-craft.net/thread/8845-factorio/
As usual, the ouroboros of culture continues, and now minecraft mods spend lots of time imitating factorio, as well as iterating from the same original seeds.
DJdjkorchi55 menit yang lalu
Computing an infinite sum of matrix powers seems a bit nasty, but actually reformulating the problem as a transfer matrix (where legendary -> legendary with probability 1) let's you express the state of the system after N loops simply as $A^N x_0 = x_n$. Then, A^N can be readily computed by diagonalizing the matrix so that $A = V diag(\lambda_1, ...) V^T$. The matrix exponential means that different eigenvalues decay at different rates. The largest should be lambda_1 = 1 which will survive in the infinite N limit, and tells you the steady state solution. This machinery is a bit more general than the expectation based equations that the author solves with Gaussian elimination, and is a nice application of SVD/matrix diagonalization.
FAfabian2k10 jam yang lalu
The difference between Washing and Upcycling is enormous. That does fit my observations, it's nice to see it quantified.
Another aspect that is nice to see quantified is how big the effect of better quality modules is. You likely underestimate that initially since it's not linear.
The Space Casino mentioned in the post is not possible anymore in Factorio 2.1. Which is experimental at the moment, but I'd assume will be released soon. And experimental Factorio tends to be as stable or more as the stable versions of other games.
Comments
5 preview comments · loading full threadLog in to h4cker, then connect Hacker News to publish comments.
Oh boy, this is a rabbit hole I've gone down pretty hard as well. I made a python script and a separate js app for running linear solvers on the upcycling problem. I really like the author's exposition for how to setup the solve matrix, as it's the first step when understanding the quality math. Speaking very high level, probably the most interesting and counter-intuitive thing I learned from doing these projects is that adding just a touch of speed modules can go a long way, especially at the lower quality levels. Of course, if the only thing being optimized is legendary outputs per common input, then speed is always bad. But because an upcycler works much better when the buildings and modules are themselves legendary, usually the limiting factor is the (very expensive) crafting machines, rather than the amount of input lines. Adding a touch of speed can give way more throughput for the same number of legendary crafting machines, at the cost of some wasted inputs, which isn't a big deal when you can slap down a few more cheap miners. Python script: https://github.com/scottmsul/FactorioQualityOptimizer JS source: https://github.com/scottmsul/upcycle JS app: https://scottmsul.github.io/upcycle
If anyone is interested I made a build that can make most items at the highest quality possible using a single assembler by switching the active recipe on the assembler. You just throw in the basic resources for the base items in the recipe and it just builds the whole thing at legendary quality. https://www.reddit.com/r/FactorioBlueprints/comments/1gl5v50... It takes a bit of setup for each item you want to make though and doesn't work if the process takes more than one fluid. The default in the blueprint is to make blue circuits. Unfortunately factorio has this mechanic where if you switch the item an assembler is making it loses progress for productivity bonuses, so this setup is not really practical for many items. Plus it takes a lot of space. But it is fascinating to see it work.
> Factorio pretty much founded the factory video game genre I feel very nerd sniped by this one! Factorio was heavily influenced by minecraft mods like industrialcraft2 which create factories inside of minecraft. Here's the factorio creator discussing it in 2013 https://forum.industrial-craft.net/thread/8845-factorio/ As usual, the ouroboros of culture continues, and now minecraft mods spend lots of time imitating factorio, as well as iterating from the same original seeds.
Computing an infinite sum of matrix powers seems a bit nasty, but actually reformulating the problem as a transfer matrix (where legendary -> legendary with probability 1) let's you express the state of the system after N loops simply as $A^N x_0 = x_n$. Then, A^N can be readily computed by diagonalizing the matrix so that $A = V diag(\lambda_1, ...) V^T$. The matrix exponential means that different eigenvalues decay at different rates. The largest should be lambda_1 = 1 which will survive in the infinite N limit, and tells you the steady state solution. This machinery is a bit more general than the expectation based equations that the author solves with Gaussian elimination, and is a nice application of SVD/matrix diagonalization.
The difference between Washing and Upcycling is enormous. That does fit my observations, it's nice to see it quantified. Another aspect that is nice to see quantified is how big the effect of better quality modules is. You likely underestimate that initially since it's not linear. The Space Casino mentioned in the post is not possible anymore in Factorio 2.1. Which is experimental at the moment, but I'd assume will be released soon. And experimental Factorio tends to be as stable or more as the stable versions of other games.