Build Anything With One Assembler - POC - eviltoast

https://factoriobin.com/post/tvqipx (v3)

older-version

Updated; Simplified, and added descriptions above, and grouping.

Take any item in the combinator in the bottom left; If we dont have a full stack of it, add it to a build queue

For each item on the build queue, pick one at random, try to build it, if we don’t have enough ingredients, add them to the build queue

When building a item, build until we have TWO stacks, or run out of ingredients. This is one stack MORE then we use to determine if something goes into the build queue by inventory alone, this prevents thrashing, so we queue at 100, but will build until 200.

I use the H as a hold signal… this could be a lot cleaner and simpler, but it works, and I wanted to share! I’d love to see improvements.

A dependency we can’t build will get stuck in the build queue (like plastic), right now I just have that displayed on the bottom using a manual check, but this isn’t very elegant.

Inspired by https://reddit.com/r/factorio/comments/1gkhehl/behold_the_bogocrafter/ Thank you @Legitimate-Teddy@reddit.com

I don’t have a reddit account to thank the original poster, but I do appreciate them sharing the idea! (If you use their original bogo design, be aware it doesn’t recurse down the dependency tree very efficiently, so you will WANT to make your own build queue)

Issues I’d like to improve:

Too complicated, better alerting, less cycles rechecking recipes we already checked, if we change the original item combinator the build queue doesn’t get reset, if I want MORE then one stack of something that isn’t possible… that really needs to get fixed.

  • HeckGazer@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    25 days ago

    I love seeing all the different approaches to this. My solution was to break all the recipes up into dependency tiers (coils & gears T1, circuits T2, inserters T3 etc.), which would then let me use the sorting on the advanced combinator to sort the execution. I guess it kinda works how the player crafting queue works:

    counter cell holding an index
    If logi_requests[index] is not craftable: increment index (counter resets at logi_requests.len)
    If we “lock on” to something craftable we save it to mem
    Calculate the total resources required (raw and intermediates) using lookup combinators and have that all on a line
    Raws get requested, intermediates get “oned out” by a decider and then multiplied by the tier values.
    That then gets picked by an advanced combinator which is sorting it by low to high and sent to the assembler.
    It then makes as many as needed before moving onto the next thing until eventually it satisfies the saved logi request
    It then resets the counter and everything starts again.

    I liked that it was resilient to constantly changing network requests and made efficient use of the logi bots with bulk requests