Enhancing Factorio with SAT solvers
github.com
github.com
I have seen publications/work where the SAT solver was credited only as pysat, which is not a SAT solver :) Kinda cool and sad at the same time!
Another way to look at it is that you are the "giant" in the famous quote "If I have seen further than others, it is by standing on the shoulders of giants"
I.e. all the implementations speak the same language, but they operate and prioritize differently.
SAT solvers are NP-Hard, so there isn't a single SAT solver to rule them all. Which one you choose matters, same as with databases. CockroachDB, PostgreSQL and SQLite all speak SQL, but are not interchangeable. Same with SAT solvers.
I'd agree with OP; the SAT writers should get more credit. It's a hard problem, and I'd bet most of us are either incapable or unwilling to spend ages working on it (myself included, no shade intended). It's also vitally important. To my understanding, SAT solvers underly most package managers. It's how npm or pip or apt know what version to install for each package such that no version violates another packages constraints (if any, it's also where the "no valid version combinations exist" message comes from).
Now I have some reading material for when I'm bored. I'm curious how they handle it without a SAT solver.
I find this (extremely prevalent) perspective increasingly demoralising.
Why wouldn't he/she care?
There's an important distinction here between the use of the word "should" and "would". The user of course shouldn't be required to care, but making a decision on their behalf that they won't is fundamentally different.
This is of course largely driven by the sorry state of UX where the responsibility to integrate rich choice & flexibility into refined simple interfaces is shirked in favour of achieving the same simplicity via the lazier approach of design minimalism.
There are many many occasions where something is below the level of abstraction that you care about. Don't assume that because you care about a particular level of abstraction that everyone else should too.
Are you asking whether I know these things or whether I'd like to? Or whether I'd like the freedom to make choices about these questions -vs- each of them being chosen for me without opportunity for input or insight?
I don't think it's particularly controversial to say that, for most people, independent of their level of technical knowledge, the ideal is for answers to all of your questions to be available & accessible in some way, & for there to be choice in that market.
People can choose to take simple defaults without delving into the hows & whys but I can't see why those same people would object to others having choice & transparency around those defaults.
In summary: I don't know what point you're trying to make.
I'm pointing out that we all have a limited capacity to care at different levels of depth. And people might not want to care because they have other things they want to care about.
You don't care about the whole stack you use. Others don't either, you sound like you are chastising others for not caring.
You sound like you're reading things from my comments that suit your own rebuttal rather than what I've actually said.
From my first comment:
> The user of course shouldn't be required to care
from my second comment;
> People can choose to take simple defaults without delving into the hows & whys
I'm literally just arguing for choice, transparency & availability. I'm not proposing placing any further burdens on users regardless of what they want to care about.
and because this attitude has become so prevalent people now pile shoddy abstraction on top of shoddy abstraction without interest or ability to reason about what that does down the stack.
The lesson from this isn't "you don't need to care about how things work" but invest some time into going one or two levels deeper than you "need" to. If you have no idea how things work under the hood the moment things tend to break or leak you're going to end up clueless.
I don't think that the missing interest in either topics is particulary demoralizing.
But on a different note: it is demoralizing when you need to cooperate with that other world, when Paul needs to create that program in sap for the calculations and Joe does not care for the inner workings or Paul for the formulas. That makes communication so much harder.
This is essentially the problem: the driving of the world to extremes. Joe's & Paul's worlds are demarcated by the systems they operate in. Their knowledge is not only limited by their primary areas of interest but by what's made evident to them through their daily interactions.
As an individual Paul may have zero interest in "Joe's world" & Joe may individually have less than zero interest in what solvers are operating in Factorio, but those are individual stories, not generalities. When you're generalising about people you're looking at a spectrum of interest within which you need to acknowledge that (a) programmers are humans who use tools too: DX isn't the only area that needs to cater to programmers, they also use Spotify & banking apps & play games just like everyone else. And (b), similarly there's a million Joes out there who will never write a line of code but still possess a technical interest that goes beyond wilful ignorance.
* The SAT wrapper? * The SAT library? * The math library the SAT library depends upon? * The LibC? * The operating system? * The processor? * The lithography machine manufacturers? * The guys that provided the raw silicone?
Two framings to attempt to answer your question reasonably:
Framing 1: Should information on all the things you listed be available & accessible? In an ideal world, I think so.
Of course that doesn't translate to all of them being pushed into users faces while they attempt to play Factorio (they don't even know how to install python & haven't even unlocked balancers yet). It just means: can I find it on the internet. Right now, thankfully, I can for most of it (sadly silicon supply chain transparency isn't quite where it could be).
Framing 2: Should the above information be readily apparent: that's a question that's much more dependent on degrees of abstraction. In this case, the gp is offering feedback that the SAT libraries are at a level of abstraction that makes them relevant enough to someone running the python tool in their cli. I would tend to agree.
Why do you use Techbros as a derogative term here? How does it contribute to the discussion?
> I think it's a weird combination of gatekeeping and a superiority complex.
Why is it gatekeeping, if you ask for UIs that are not only optimized for the most novice user, but also for more advanced users? I'd say it is the other way around. People designing UIs that can only be used for the most easy tasks are gatekeeping. They are keeping out the power users or those who want to become a power user. I've often wondered whether the lack of a smooth path between tools for laymen and tools for professionals is the true reason why it is hard to use computers for more than content consumption.
The vast majority of Factorio players are not familiar with programming. A small but very vocal and very enthusiastic minority are though.
There's people reading Bell Labs technical papers from the 1950's as part of the process of playing an addictive video game.
It's a nice break from reading orbital mechanics textbooks as part of the process of playing another addictive video game.
Orbital mechanics => Kerbal Space Program
Same lane balancers and powers of two aren’t bad, but anything else usually requires loop backs so the network becomes cyclic.
Also every belt in Factorio is two independent lanes. Splitters will move items between belts but always preserve lanes. A 4-2 splitter should compress 4 left-only lanes across 4 belts to 2 belts of 2 left and 2 right lanes. The naive splitter setup wont do that.
I would say given how loved factorio is a reasonable position is to assume they’re not all entire idiots that can’t distinguish between fun and tedium and give it a try!
To compare:
* Satisfactory: the lowest stress, best guided, the prettiest and the easiest to analyse. A lot of the challenge involves figuring out how to best use 3D space. 1.0 is coming this year.
* Factorio: Biters provide a base level of threat making your factory breaking a potential problem. But you can switch it off. Much more complex tech tree and routing. But building railways is pretty tedious compared to Satisfactory (which is a pity when they're essential.)
* Oxygen Not Included: Everything you try to do has side effects. The game physics matters _a lot_. Mess up and everything dies. Easily the most stressful of the three. Has the shallowest tech tree of the lot, too.
All are good, although I cannot recommend Oxygen Not Included if you want to relax while playing.
(They’re handy for the stations where you’re loading the train, though.)
ONI is a thermodynamics simulator disguised as a colony simulator.
* Mindustry: Free casual episodic tower defense factory sim. Level based instead of infinite build, levels take about an hour.
* Dyson Sphere Program: Build factories that span start systems. Best looking game of the bunch, imho. Go from punching trees to a Kardashev type II/III civilization.
If you're into Factorio or Satisfactory, I highly recommend checking out Dyson Sphere Program.
I've never really understood why FPS games are considered 'dumb'. All video games leverage our innate capacities of entertainment to fix our attention on unreal worlds, often to distraction, even addiction. Given that, it's difficult to transpose ideas of high and low brow onto the medium. The whole enterprise is dumb by design.
It's fun for some.
But half the fun of the game is you can test in production because you’ll only cause downtime for yourself. I surveyed Reddit once and most people play with no or only minimal planning.
I've played Factorio, but only launched the rocket once and I think have about 100 hours in it. I never bothered with belt balancing, and simply had many rows of belts traveling east, with splitters moving things to columns of assemblers which then go to another belt to the east.
As I expanded the factory to build new products, I'd play whack-a-mole with fixing bottle necks in materials. Heck, I never even used trains or any sort of drone.
Have I just never built a factory big enough to need balancing? What does it really accomplish versus just overproducing source materials and allowing the factory to back up a little?
For mining outputs, it can also be nice to avoid the outpost getting slow/stuck (never able to fill a train) when ore runs out for the outer lanes of miners.
Anywhere else, balancers are unnecessary and just serve to obfuscate a lack of resources.
(But if you really want to play without any balancers at all, that's quite possible: the train problems can also be solved by letting trains leave on a schedule independent of cargo status. All remaining balancers, including those on mining outposts, can be replaced with priority splitters.)
Not in general, actually. If you standardize on N-wagon trains, and build assemblers (et al) in groups of N, each assembler can take inputs from one wagon in lockstep with N-1 other assemblers taking from the N-1 other wagons, and since productivity is deterministic[0], they'll also produce outputs in lockstep.
This means that as long as all your input trains are balanced (they should be, by being completely full), all your output trains will also be balanced. Science labs are same as any other machine, just without output, and trains feeding a logistics network can unload into active provider chests.
In practice I pretty much only use balancers for a: mining outposts, or b: random kludges, at least when and if I'm using trains as my main transport mechanism.
0: Ask me about quality once 2.0 drops; for now I just special-case uranium processing.
It should definitely be a even number so that if your machine layout doesn't work modulo 7 tiles (=1 wagon-length), you can group up pairs and use 14 tiles, but it might be helpful to use N=6 or N=12, and sometimes build modulo 21 tiles. (I haven't needed/tryed that so far, so I can't comment on how well it works.)
source: 3000 hours+ on the game :)
And personally, if you're a fan of puzzles and optimization, I think you'll love it. There's an amazing amount of gameplay for the price. Worst case, you're out $35 and supporting an amazing developer.
Broadly, the game is about building up systems. Even in a disorganised first playthrough, you'll naturally find 'systems' for solving things. (They'll just be hard to change, and hard to scale up, and hard to build upon).
Which is somewhat similar to how a someone who just learned to program might be able to complete a task, but probably in a way a more experienced dev wouldn't.
- I feel the same engagement as programming, but I don't have to be reliable or be told what to do: amazing.
- I feel the same engagement as programming, but I don't get anything out of doing it: this feels like work.
Easy example is level editors for video games. Rarely are those made by editing source code.
Other examples would be stuff like the kitchen designer in Ikea. Or, really, most any CAD tool.
In particular, I was wondering if this could be a fantastic application of VR/Apple's Vision headset -- a 3D IDE of some sort, where you could organize code spatially, or where the code is (are?) objects that you manipulate instead of plaintext.
That said, expanding a palette to "things" that are placed in a very physical way makes sense. I'd suggest not thinking of it in terms of IDE, though. It is very common in CAD and other "editor" environments. Has been, for a long time, even.
Apparently normal Factorio doesn't cause me enough suffering. I have to invent a problem to solve in the most absurdly complex way possible.
(Un)fortunately, wube has saved me from myself. They posted previews of new in game logic pieces that render most of what I was doing obsolete. I might pick it back up after the update, not sure yet.
(Hi probable coworker)
I would like to see if this can create a 12 to 12 universal+lane+throughput-unlimited balancer. Plus I've been wanting a 12 to 24, 12 to 36, and 12 to 48 lane balancer too because I'm a masochist :)
Got a discrete NP hard problem? A CSP solver will probably get that done.
A highfleet ship optimizer which chooses optimal module sets using ILP at
https://hfopt.jodavaho.io (try desktop site on mobile)
And a hunt showdown loadout A/B test package that lets you run stats queries on your game journal at (for now)
The source code is still here: https://github.com/kiegroup/optaplanner-quickstarts/tree/8.6...
And funny enough, ultimate Factorio tool is tool to make great cpus... ;)
I like your, what i presume is, "joke" animation at the end…
Perhaps Beneš network?
This allegedly creates odd-numbers like 7-to-7 balancers. But in my experience, i just grab a 8-to-8 balancer from my blueprints and ignore 1 input/output.
This post should be titled “I’m going to ruin Valentine’s Day for every Factorio player here with a non-Factorio partner”
I’ll see you all in a month, linking to my own post titled “How Factorio Ruined My Marriage”
In contrast, what is impressive amounts to nothing less than discovering a successor to the universal Turing machine. And you can do that with pen and paper instead of fancy technical equipment like a clunky and uncomfortable development environment that's concerned with manipulating virtual conveyor belts as one of its programming primitives.