Solving Factorio Quality(exyr.org)
274 points by laurenth 15 days ago | 107 comments
tl;dr: A Factorio player models the game's Quality upcycling loops using matrix math, representing item throughput as vectors and crafting/recycling/filtering steps as transition matrices, then solves the resulting equilibrium equations (Ax=b) via Gaussian elimination for exact rational results rather than iterative approximations. The approach handles "washing," crafting+recycling upcycles, and 15-dimensional asteroid reprocessing. The author implemented it as an interactive web calculator (factoqual.grebedoc.dev) using TypeScript, VanJS, and a rational-number library after initially prototyping in Rust.
HN Discussion:
  • ↑Fellow enthusiasts share their own similar solver/analysis projects for Factorio quality
  • ↑Confirms the article's quantitative findings about washing vs upcycling and module effects
  • ~Suggests alternative/better math approach using transfer matrix diagonalization instead of Gaussian elimination
  • ~Notes the article is outdated as Space Casino is removed in Factorio 2.1
  • •Offers minor presentation improvements like LaTeX \text{} formatting