Recipes with probabilities better handling

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Recipes with probabilities better handling

Post by darkfrei »

Can you please add the tool how to define such recipe:
Ingredient: 1 not forged screw
Result with probably: 90% for 1 forged screw, 10% for 1 broken screw, NEVER both, NEVER nothing.

Right now it's impossible to define only one result for multiple results with probabilities.
Sometimes I can get two screws from only one that was processed.

User avatar
AmatorPhasma
Fast Inserter
Fast Inserter
Posts: 126
Joined: Sat Aug 05, 2017 8:20 pm
Contact:

Re: Recipes with probabilities better handling

Post by AmatorPhasma »

+1

that would be awesome, for one of my mods to implement failed production cycle of some intermediates.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Recipes with probabilities better handling

Post by darkfrei »

Maybe also results by mining drills, I want just only one item per second, but randomly.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Recipes with probabilities better handling

Post by eradicator »

I think the last time this was requested the advocatu diaboli counter-argument was: on a statistical level, after a few thousand cycles it doesn't really matter. Not that i can't understand the desire to have perfect control...
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Recipes with probabilities better handling

Post by darkfrei »

eradicator wrote:
Wed Nov 20, 2019 9:43 pm
I think the last time this was requested the advocatu diaboli counter-argument was: on a statistical level, after a few thousand cycles it doesn't really matter. Not that i can't understand the desire to have perfect control...
So if after thousandths of cycles will be the same, why not changing also vanilla to tight way? The uranium enrichment process can give also right amount of results, one result for one ingredient.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Recipes with probabilities better handling

Post by DaveMcW »

When your probability is 0.007, a few thousand cycles is not enough to make the statistics work. Try 20,000 cycles.

User avatar
valneq
Smart Inserter
Smart Inserter
Posts: 1149
Joined: Fri Jul 12, 2019 7:43 am
Contact:

Re: Recipes with probabilities better handling

Post by valneq »

DaveMcW wrote:
Thu Nov 21, 2019 11:19 pm
When your probability is 0.007, a few thousand cycles is not enough to make the statistics work. Try 20,000 cycles.
This is about how to control the outcome of random recipes, not how to average properly.

As in: how many random numbers should actually be drawn?
Just one? So that depending on it two or three or n different exclusive events will happen.
Or multiple random numbers that are statistically independent? Then multiple events might happen simultaneously.

Whether or not this averages out after millions of random samples is yet another story, but the mere structure of the events may impact the design of the factory handling these events.

pleegwat
Filter Inserter
Filter Inserter
Posts: 258
Joined: Fri May 19, 2017 7:31 pm
Contact:

Re: Recipes with probabilities better handling

Post by pleegwat »

I think this mainly applies to low-volume high-value recipes. And then particularly cases where a high-value catalyst has a chance to decay - 90% outcome A and 10% outcome B becomes 9% both and 9% neither, and that's particularly punitive if it happens on the first craft.

The question is though, what should the result options be if the odds add up to, say, 110%?

Post Reply

Return to “Modding interface requests”