Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Product Chance/Probability  (Read 1059 times)

Upright Path

  • Bay Watcher
    • View Profile
Product Chance/Probability
« on: April 06, 2010, 01:44:56 pm »

Has anyone do any tests to see whether the product chance is actually a random chance on each product, or whether it keeps track of the total 'chance' for each object type, and when 100 is reached one of those objects is spawned?

IE- Will it always take 2 reactions with this product to result in one stone? Or is there a 50% chance each time that it will result in a stone? Meaning you could use the reaction twice and get 0 stone, 1 stone, or 2 stone, depending on how much a RNG likes you?

[PRODUCT:50:1:STONE:NONE:NONE:NONE]
Logged

Warlord255

  • Bay Watcher
  • Master Building Designer
    • View Profile
Re: Product Chance/Probability
« Reply #1 on: April 06, 2010, 01:47:52 pm »

I had assumed that it was chance, with the example of Galena's 50% silver chance, but upon further inspection, it turns out that the random chance factor is now kept in the stone file for Galena;

[METAL_ORE:LEAD:100]
[METAL_ORE:SILVER:50]

So I'm not as sure anymore.
Logged
DF Vanilla-Spice Revised: Better balance, more !!fun!!
http://www.bay12forums.com/smf/index.php?topic=173907.msg7968772#msg7968772

LeadfootSlim on Steam, LeadfootSlim#1851 on Discord. Hit me up!

Upright Path

  • Bay Watcher
    • View Profile
Re: Product Chance/Probability
« Reply #2 on: April 06, 2010, 01:56:46 pm »

It's always been there. Or at least, that's where I always remember it being. But this is more of a question on the actual Reactions, on still on my NETBOOK and it'd take me 20 minutes to even test what I suggested before, heh.

If anyone could get me the results of a couple of tests, like...

Make three reactions, each with a different one of the following, and run each reaction X times, then post how many Iron Bars for which reaction and the number of times we should be able to tell whether it's still the <QUANTITY> * <CHANCE> / 100 for creating items thing from the last release.
[PRODUCT:20:5:BAR:NO_SUBTYPE:METAL:IRON]
[PRODUCT:10:10:BAR:NO_SUBTYPE:METAL:IRON]
[PRODUCT:1:100:BAR:NO_SUBTYPE:METAL:IRON]


Logged

NecroRebel

  • Bay Watcher
    • View Profile
Re: Product Chance/Probability
« Reply #3 on: April 06, 2010, 02:01:57 pm »

In the previous version, there was some debate over this, and with testing, we found that the probability model was true in all cases, both in terms of ore reactions and custom smelter reactions. slink also asked Toady in the Future of the Fortress thread, and it was confirmed:

Quote from: slink
How do the reactions work at the smelter?  Are they percentage probability or percentage completion?  Popular opinion had it that they are percentage completion but testing by a couple of us in the modding forum indicated that it was percentage probability with some weighting from unknown sources.  It was definitely not percentage completion weighted by same operator/same smelter.  We decided that only Tarn Adams could answer the question.  This is relevant in this thread because the new custom shops will undoubtedly be using the same sorts of reactions.  This is a hugely important feature in the new version, for some of us.

The way it works currently, which is open to additions of course, it to go through each product, and if it clears the chance (a single roll), it gives you all of the number.  It doesn't roll the chance for each individual one of a given product, and no invisible partial products are stored.  If you have odd numbers of reagents coming in (like lots of extra), you can get extra product, but the single chance must be cleared first.  So pretty much the clunkiest, most simple interpretation.

The probability model is almost certainly still the true one, rather than the %-completion model. That is, each reaction have a %chance of getting the whole product, and these chances do not add up. As Toady says, no invisible partial products are stored.
Logged
A Better Magma Pump Stack: For all your high-FPS surface-level magma installation needs!

soul4hdwn

  • Bay Watcher
  • make due with what you have
    • View Profile
Re: Product Chance/Probability
« Reply #4 on: April 06, 2010, 02:42:55 pm »

http://www.bay12games.com/forum/index.php?topic=53159.0
Spoiler (click to show/hide)
Logged

Upright Path

  • Bay Watcher
    • View Profile
Re: Product Chance/Probability
« Reply #5 on: April 06, 2010, 02:48:59 pm »

Thank you kindly! Just updated the Wiki with that information.
Logged

sunshaker

  • Bay Watcher
    • View Profile
Re: Product Chance/Probability
« Reply #6 on: April 06, 2010, 03:35:07 pm »

http://www.bay12games.com/forum/index.php?topic=53159.0
Spoiler (click to show/hide)

We had this discussion here about the last version and the Chance thing was discovered to be pure chance, no partial products, see http://www.bay12games.com/forum/index.php?topic=47700.15 about half way down. Adding stuff to the wiki without testing it first (which is really easy to do) leads to arguments later on and the spreading of incorrect information. Please before editing the wiki do some testing on this, its pretty simple to do.

Spoiler (click to show/hide)
Logged

Upright Path

  • Bay Watcher
    • View Profile
Re: Product Chance/Probability
« Reply #7 on: April 06, 2010, 03:40:40 pm »

Nah, I just said that it was pure chance. Not to test it.
Logged

sunshaker

  • Bay Watcher
    • View Profile
Re: Product Chance/Probability
« Reply #8 on: April 06, 2010, 03:58:12 pm »

Nah, I just said that it was pure chance. Not to test it.

My point was the information quoted by soul4hdwn indicates that it is not pure chance and as you said you added it to the wiki (or at least that is the way the thread reads), I'm saying that soul4hdwn contradicts what we have tested for a previous version and that if information is going to be added to the wiki which is disputed either it needs to be tested to resolve the dispute or it needs to be marked as disputed.
Logged

Upright Path

  • Bay Watcher
    • View Profile
Re: Product Chance/Probability
« Reply #9 on: April 06, 2010, 04:02:55 pm »

Ah.

Hah, hah!

He quoted my own, earlier, post as proof. A lot of that was/is assumptions.
Logged