This is cool :) My only small gripe is that python-sat (i.e. pysat) is nice, but it kinda hides all the work that SAT solver writers (like me... :D) do. It gives a nice interface to access them all, but it also means that e.g. if something doesn't work, the user may not know who to contact as they may not be aware which SAT solver they are using. I guess it's the rule of something becoming so mainstream that the authors of the underlying technology fade away, and those doing the (actually really hard work!) of maintaining the common API are referenced only.
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!
But as an user, why would he/she care about how it works on the background, even if there is an issue? Surely the average Factorio player is perhaps familiar with programming, but isn't working over an abstraction exactly why solutions like these work?
> But as an user, why would he/she care about how it works
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.
Who wrote the network transport code that shepherded the bits from your post to the hacker news backend? What Ethernet devices did it transit and who wrote that code? What tradeoffs were made between hardware performance characteristics in the interrupt handlers in your network card? What about your keyboard? Did you choose cat 5 or cat 6 cables for this post to HN? Were those cables shielded?
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.
> Who wrote the network transport code that shepherded the bits from your post to the hacker news backend? What Ethernet devices did it transit and who wrote that code? What tradeoffs were made between hardware performance characteristics in the interrupt handlers in your network card? What about your keyboard? Did you choose cat 5 or cat 6 cables for this post to HN? Were those cables shielded?
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.
Anyone can learn these things (the workings of pysat) if they want to. Sometimes the inner workings and history of things is hidden as proprietary secrets, but usually that isn't the case and somebody who's curious can dig into how things work and who invented them.
This is very true in this case, but not in all cases, & I think the gp's point w.r.t. such things being (relatively) obscured applies universally. All systems stand to benefit from constructive feedback on things being clearer & more transparent.
You asked "why wouldn't they care?" I'd argue you don't care below some level of abstraction.
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.
> people might not want to care [...] 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.
>where something is below the level of abstraction that you 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 see this that critically. Joe Schmoe and Programmmer Paul live in two different worlds. Joe might be into finace where I don't care about how anything is calculated so long as the right amount is in my bank account by the end of the month. Maybe they use a fancy excel sheet or SAP-FI or whatever.
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.
> Joe Schmoe and Programmmer Paul live in two different worlds
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?
There's no hard line to be drawn anywhere - trying to shoehorn the argument into the metaphor of a line somewhere doesn't track.
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.
At least in the past some SAT solvers were vastly better on certain kinds of problems. E.g. cryptominisat had native handling of XOR clauses which no other solver did. By referencing pertinent details of your experimental setup you could save others who want to build upon your work a lot of time.
> Surely the average Factorio player is perhaps familiar with programming, but isn't working over an abstraction exactly why solutions like these work?
The vast majority of Factorio players are not familiar with programming. A small but very vocal and very enthusiastic minority are though.
In the same sense that SQL is a universal way of expressing a large set of problems.
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).
apt doesn't use a SAT solver; it has its own heuristics. (Seemingly it _can_ call out to an external one if you give the --solver argument, which in 20+ years of Debian I have never seen anyone use, and which I didn't know of before I made a search now to make sure.)
In a way, you and every other author who created a SAT solver being used by pysat ARE pysat! :)
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"
For anyone wondering what this does, it looks like it produces optimal configurations for belt balancers given a specified number of input and output belts. Belt balancers evenly distribute items between belts: https://wiki.factorio.com/Balancer_mechanics
Fun to see that that math (linked in that wiki) coincides with early 20th-century analog telephony problems—the problem of how to arrange electromechanical switches to support large numbers of simultaneous circuits, avoiding bottlenecks.
There's people reading Bell Labs technical papers from the 1950's as part of the process of playing an addictive video game.
Balancers are probably one of the most common but least understood parts of Factorio. Most players copy a blueprint book from the web, and don’t think about it. They are very tricky to build by hand without a deep understanding of belt mechanics and high attention to detail. Also without testing it’s easy to build one that looks correct but fails under certain conditions.
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.
You'd think that with as many hundreds of 4-4 balancers I've built, I'd remember the correct arrangement of splitters, but no, I somehow always flip the input or output splitters and end up with a subtly wrong balancer that I won't notice until a hundred hours and many dozens of copies later. I've totally given up and just resigned to using a blueprint book.
Oh yeah, splitters are the one thing I haven’t tried to build myself because they’re so tricky. I’ve done a ton with circuit networks and trains, but belt balancers are far less intuitive to work with.
One of the biggest reasons I’ve never dove into optimizing for factorio is the lack of tests. But then again if it had tests it’s probably feel too much like real work.
You can set up test suites in the editor put it’s a pain, because you have to build things like clocks and counters with in game mechanics or use mods.
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.
It’s built for engineers that are nerds at heart and love building because they love building. There are certainly engineers that love making engineer money, and there’s nothing wrong with that. But what one finds boring and tedious another may find pleasure in.
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!
Factorio, Satisfactory and Oxygen Not Included (very different games) all have this thing of building something while it's running, debugging and expanding it, and give you fairly meaningful rewards in terms of new challenges and removing tedium.
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.
* 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.
> * 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.
ONI is a thermodynamics simulator disguised as a colony simulator.
Building trains is my favorite part of Factorio :) Satisfactory trains are fun because of the 3D designs for the railway you can do (stations, bridges, etc.) I think Factorio 2.0 (with the new space age expansion) will fix all this. The most tedious parts of trains (odd curve/placement limitations) will be fixed, and we’ll get more features like bridges and schedule interrupts
For me the tedious part of trains is that you pretty much have to use blueprints, and preferably a blueprint book of intersections. And creating your own intersections is very easy to make mistakes. I love how flexible the system is, but I don't like when a game forces you to use out of game resources like third party blueprints.
One does not need to use third party blueprints for train intersections at all, and it is easy to make designs where the intersections are robust. Not necessarily the highest performance, or most compact layouts, but a little reasoning goes a long way.
(They’re handy for the stations where you’re loading the train, though.)
If you could actually build them effectively with a personal port it would be a lot less painful. As it is, slapping down a huge ghost rail isn’t as useful as it should be.
I'd say Satisfactory is primarily an exploration game, Factorio is about building, and ONI is about constantly living on the knife's edge of limited and rapidly dwindling resources. It's a brilliant, intricate design but yeah it's stressful.
I get that this is a humourous and offhanded comment, but it's the equivalent of saying that basketball is 'just bouncing a ball'. A surprising amount of complexity emerges from putting teams of humans into a competitive sandbox environment with conflicting goals to, in each example, 'put the ball in the other team's basket', or 'click on the other team's avatars until they die'. They also overlap in that both are ultimately based on entering a skillful kinesthetic flow state, of becoming one with the ball, or your digital avatar, and gliding seamlessly, through muscle mechanics you've trained over hundreds of hours, through situations which are dynamic and non-identical because they involve opposing humans capable of interactivity and learning.
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.
Think of it like Minecraft-like top-down 2D survival game (fun) with crafting (fun!), but which lets you automate away all the tedium of crafting, and then lets you automate all the automation, and...
Yeah that is why most players just copy blueprints for balancers that have been vetted by people who do enjoy it. There are also mods that trivialize the task by creating oversized item chests that you can hook many inputs and outputs to. But the belt system is very optimized so a belt based balancer is almost always better for cpu usage. Also I think balancers are overrated and most of the time when you need huge balancers you should actually be using trains.
It's a great test for what type of engineer you are. -- 1) Loves optimizing their belts: An engineer's engineer -- 2) Loves getting it to barely work and moves on: Hacker/Prototyper -- 3) Loves closing the game: Product Manager
Is belt balancing really that important in Factorio?
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?
Belt balancing is necessary when unloading trains, as otherwise uneven consumption can lead to some chests/wagons running out of resources but the train doesn't leave because other wagons are still full.
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.)
> Belt balancing is necessary when unloading trains, as otherwise uneven consumption can lead to some chests/wagons running out of resources
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.
Strictly speaking it hardly ever actually matters, but yeah I usually use N=8 just so I don't have to care.
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.)
The common method of playing factorio is to maximize throughput, nothing wrong with that, But I don't enjoy it much. I always play trying to create minimal belt, back pressure driven kanban type systems, heavy on logic, light on throughput. While I get the distinct feeling I am "playing it wrong" I enjoy setting up logic more than balancing belts.
It ensures that your X belt input blueprint and your X belt output blueprint are actually using X belts and not bottlenecked on one somewhere. At a certain point it stops being necessary except for loading and unloading trains, unless you use circuits.
This is super cool! Will never not upvote a post about factorio. If anyone is reading this and into programming you should try the game, it's incredible
Totally! I was wondering if those domain-specific tools would ever become more general, e.g. imagine writing general purpose programs in a 3D environment.
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.
I don't think spatially laying out symbolic code is likely to get that useful. We already heavily resist significant whitespace. I am fond of "ascii art" for tests and any code where it can help, but I get the impression I'm in the minority there.
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.
I've been tinkering with a custom programming language that compiles into a blueprint of Factorio logic pieces.
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.
IMO, it's more like circuit design than programming. Similar mindset, slightly different method of solving issues.
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.
You can play it in many different ways. One advanced playstyle is to use combinators heavily, but you don't need to. A lot of people get hooked on optimizing their factories, which leads down a rabbit hole of ratio calculation, but that's also not required. It's perfectly enjoyable without doing anything extremely technical.
I'd say "feels like programming" applies to even a vanilla playstyle.
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.
You can do a lot of programming activities but different than web standards. It leans more into process engineering concepts. You can program. But it’s ladder logic and expressions instead of text. You can build dependency injection but it’s a rail network instead of annotation. Many similar concepts but expressed in a different form.
I bought the game a few years ago and have about 20 hours in it. That's like 5 or so attempts of me trying my damnedest to get into it and bouncing off. I thitk GregTech just ruined me and my expectations for a crafting game.
I've recently started playing Factorio for the first time, and was thinking about using SAT solvers for automated sub-factory blueprint design with beacons. E.g. for a given recipe how do I design a sub-factory that builds the recipe with the minimum number of entities (or a given total entity weight, to allow for weighting buildings based on their impact on UPS). I've seen a paper [0] on a similar problem, but it doesn't take beacons into account. It seems like beacons make the problem significantly harder, because now positioning matters in order to share beacons. Does anyone have any ideas on how to approach this?
Interesting! My standard play style in Factorio is to use rail squares and 12-lanes inside those squares. I use 12 because 2 warehouses from the warehouse mod are 12 squares wide. All my blueprints are based on that, along with all the Angels+Bobs mods it makes for a fun-to-me playthrough. All my blueprints are based on 12 buildings, and it's neat because many of the modded buildings are 3, 5, or 7 squares wide so I have 3 standard sizes of lane direction changes, inputs, outputs, etc. In my current playthrough I'm up to almost 1,000 stations :D
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 :)
That’s going straight into my blueprint book; solves a problem I have at almost every mining train station much more elegantly than the standard linear 4x4 does.
The 90 degree turn 4x4 balancer is even better if your inputs and/or outputs are on opposite sides, making a T-shape. This is pretty common depending on the position of the balancer. In that case it fits into a 4x6 rectangle.
You can combine narrow balancers to make wider balancers. That way it is possible to save space, energy, latency .... same as is done in modern CPU / GPUs...
And funny enough, ultimate Factorio tool is tool to make great cpus... ;)
I like your, what i presume is, "joke" animation at the end…
whole system look can provide some unexpected "optimizations" too. is balancing really even needed in/as a solution... in cases when synchronization is not necessary you can simplify system greatly just by oversaturating belts with inputs. output machinery cadence dictates whole feeding mechanism rate.
This is really cool! Is there a page that has a list of useful concepts like this that might not be explicitly mentioned in the game itself? I don't have that much fun trolling the forums.
This is awesome, but balancing belts is usually a fool's errand. It's better to design your base as factories with inputs prioritized with priority splitters.
Benes network is a simple recursive pattern for power-of-2. So a 4-to-4, 8-to-8, and 16-to-16 perfect balancer can be calculated out by hand using Benes networks.
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.
Doing anything with Turing-complete games like Factorio or Minecraft is never impressive. Because building SAT solvers or, more generally, logic gate nodes for an abstract Turing based computing machine with digital video game items like in-game conveyor belts is only running a simulation on top of a finite substrate that isn't optimized for productive work. And I don't care one bit about people deriving pleasure from leisure like digital entertainment.
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.
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!