Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose the first DOABLE pattern when requesting autocrafting #499

Open
ChromaPIE opened this issue Oct 9, 2024 · 3 comments
Open

Choose the first DOABLE pattern when requesting autocrafting #499

ChromaPIE opened this issue Oct 9, 2024 · 3 comments

Comments

@ChromaPIE
Copy link

No need to explain it with bunches of words. See this:

For example you want to craft some Ice cubes, which consumes buckets of water, but there are multiple patterns having water coded as its output.

Now:

Pattern 1, Priority 0, Missing components
Pattern 2, Priority 0, Sufficient components
Pattern 3, Priority 100, Sufficient components

It chooses Pattern 3, which is good.

But if we disconnect its Interface, it chooses Pattern 1.
iirc it respects where the Interfaces are at in the network and their priority settings, but it should also calculate to see if you can actually hit the button.

damn it sounds performance heavy.

@Legend2579
Copy link

Why not just remove unwanted secondary outputs when creating patterns?

@ChromaPIE
Copy link
Author

Because:

  • It doesn't have to be secondary
  • It's not always unwanted

Water was just a bad example, the actual situation might be 10 times more complicated than what's been described above. Anyway the on-demand autocrafting is supposed to get things going, but not block you for some reason when you can actually press start, so when it comes to this, remove unwanted secondary outputs when creating patterns should only be a decent workaround but not an once-and-for-all solution.

@Exaxxion
Copy link

Not considering every possible recipe for a particular thing and stopping on the first discovered pattern is an optimization in crafting tree generation. The algorithm gets vastly more complex and slower if you have to consider combinations and have to pick which is the most optimal solution rather than arriving at a single valid solution where you either have the materials for it or you don't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants