TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Enhancing Factorio with SAT solvers

376 点作者 polivier大约 1 年前

20 条评论

zero_k大约 1 年前
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&#x27;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&#x27;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.<p>I have seen publications&#x2F;work where the SAT solver was credited only as pysat, which is not a SAT solver :) Kinda cool and sad at the same time!
评论 #39371354 未加载
评论 #39371030 未加载
评论 #39370958 未加载
Chirono大约 1 年前
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: <a href="https:&#x2F;&#x2F;wiki.factorio.com&#x2F;Balancer_mechanics" rel="nofollow">https:&#x2F;&#x2F;wiki.factorio.com&#x2F;Balancer_mechanics</a>
评论 #39369599 未加载
dexwiz大约 1 年前
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.<p>Same lane balancers and powers of two aren’t bad, but anything else usually requires loop backs so the network becomes cyclic.<p>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.
评论 #39372425 未加载
评论 #39377639 未加载
评论 #39372230 未加载
评论 #39372094 未加载
Sohcahtoa82大约 1 年前
Is belt balancing really that important in Factorio?<p>I&#x27;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.<p>As I expanded the factory to build new products, I&#x27;d play whack-a-mole with fixing bottle necks in materials. Heck, I never even used trains or any sort of drone.<p>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?
评论 #39372911 未加载
评论 #39378763 未加载
评论 #39373332 未加载
sapiogram大约 1 年前
Can this also generate &quot;universal&quot; balancers? I&#x27;ve found them more useful in practice: <a href="https:&#x2F;&#x2F;wiki.factorio.com&#x2F;Balancer_mechanics#Universal_balancers" rel="nofollow">https:&#x2F;&#x2F;wiki.factorio.com&#x2F;Balancer_mechanics#Universal_balan...</a>
评论 #39369865 未加载
snapcaster大约 1 年前
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&#x27;s incredible<p>source: 3000 hours+ on the game :)
评论 #39372599 未加载
评论 #39372081 未加载
评论 #39370827 未加载
评论 #39375504 未加载
thenipper大约 1 年前
I definitely knew people in the Wayfair logistics org that used the same kind of algos that we used at work with their Factorio games...
评论 #39372794 未加载
terrelln大约 1 年前
I&#x27;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&#x27;ve seen a paper [0] on a similar problem, but it doesn&#x27;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?<p>[0] <a href="https:&#x2F;&#x2F;arxiv.org&#x2F;pdf&#x2F;2310.01505.pdf" rel="nofollow">https:&#x2F;&#x2F;arxiv.org&#x2F;pdf&#x2F;2310.01505.pdf</a>
bloopernova大约 1 年前
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&#x27;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&#x27;m up to almost 1,000 stations :D<p>I would like to see if this can create a 12 to 12 universal+lane+throughput-unlimited balancer. Plus I&#x27;ve been wanting a 12 to 24, 12 to 36, and 12 to 48 lane balancer too because I&#x27;m a masochist :)
Lichtso大约 1 年前
Cool project! Wish we would see more applications of SAT solvers or logic programming in general.
评论 #39370126 未加载
jvanderbot大约 1 年前
This is my favorite pastime as well! Well done. I&#x27;ve also dipped my toes in the &quot;over engineer a game&quot; with:<p>A highfleet ship optimizer which chooses optimal module sets using ILP at<p><a href="https:&#x2F;&#x2F;hfopt.jodavaho.io" rel="nofollow">https:&#x2F;&#x2F;hfopt.jodavaho.io</a> (try desktop site on mobile)<p>And a hunt showdown loadout A&#x2F;B test package that lets you run stats queries on your game journal at (for now)<p><a href="https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;kda-tools" rel="nofollow">https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;kda-tools</a>
kzrdude大约 1 年前
Even the 90 degree turn 4x4 balancer is new to me, nice to see.
评论 #39370738 未加载
评论 #39374271 未加载
评论 #39369815 未加载
评论 #39369660 未加载
ge0ffrey大约 1 年前
I once optimized Factorio&#x27;s belts with OptaPlanner (now Timefold.ai), our open source metaheuristics solver in Java.<p>The source code is still here: <a href="https:&#x2F;&#x2F;github.com&#x2F;kiegroup&#x2F;optaplanner-quickstarts&#x2F;tree&#x2F;8.6.x&#x2F;quarkus-factorio-layout">https:&#x2F;&#x2F;github.com&#x2F;kiegroup&#x2F;optaplanner-quickstarts&#x2F;tree&#x2F;8.6...</a>
Yesway大约 1 年前
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 &#x2F; GPUs...<p>And funny enough, ultimate Factorio tool is tool to make great cpus... ;)<p>I like your, what i presume is, &quot;joke&quot; animation at the end…
评论 #39373204 未加载
yogurtboy大约 1 年前
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&#x27;t have that much fun trolling the forums.
jamesrom大约 1 年前
This is awesome, but balancing belts is usually a fool&#x27;s errand. It&#x27;s better to design your base as factories with inputs prioritized with priority splitters.
评论 #39378938 未加载
j2kun大约 1 年前
I wonder if there are any real-world factory configurations that employ SAT solving techniques.
ivanjermakov大约 1 年前
What is the math name for the problem of belt balancing? The one that SAT solvers solve.<p>Perhaps Beneš network?
评论 #39371328 未加载
评论 #39369988 未加载
评论 #39373987 未加载
ineedasername大约 1 年前
On Valentines Day? Seriously?<p>This post should be titled <i>“I’m going to ruin Valentine’s Day for every Factorio player here with a non-Factorio partner”</i><p>I’ll see you all in a month, linking to my own post titled “How Factorio Ruined My Marriage”
makerdiety大约 1 年前
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&#x27;t optimized for productive work. And I don&#x27;t care one bit about people deriving pleasure from leisure like digital entertainment.<p>In contrast, what <i>is</i> 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&#x27;s concerned with manipulating virtual conveyor belts as one of its programming primitives.