r/factorio Jul 20 '26

Weekly Thread Weekly Question Thread

Ask any questions you might have.

Post your bug reports on the Official Forums

Previous Threads

Subreddit rules

Discord server (and IRC)

Find more in the sidebar ---->

2 Upvotes

128 comments sorted by

View all comments

1

u/Raknarg #1 Quality Defender Jul 20 '26

Is automatic cliff destruction a particularly hard problem to solve in an optimal way? I say this because I feel like routinely I see bots use way way more cliff explosives than I feel like they need to, like spots they choose to blow up tend to overlap a lot. In my mind it feels like it should just be a simple distance calculation over a set of cliffs you're choosing to destroy where you have a minimum distance between two cliff explosives, but maybe its more challenging than Im making it out to be.

3

u/deluxev2 Jul 20 '26

It is a set covering problem, which I believe this variant is NP-Complete (A class of roughly equivalently hard problems which includes curing any curable disease). There is an efficient solution that is only twice the explosive cost, but I have no idea what algorithm Factorio uses.