Jump to content

Slot Machine: Difference between revisions

From Stardew Valley Wiki
imported>Yoho
Add probabilities for outcomes and associated expected values, based on inspecting the code
imported>Carlvr
m Undo revision 190086 by Keithrausch (talk), because it was based on a wrong edit
 
(29 intermediate revisions by 17 users not shown)
Line 5: Line 5:
The player can bet either 10 or 100 Qi coins when using a slot machine. If the results match one of the winning lines, the player receives a multiple of their bet. If there is no match the player loses their bet.  
The player can bet either 10 or 100 Qi coins when using a slot machine. If the results match one of the winning lines, the player receives a multiple of their bet. If there is no match the player loses their bet.  


==Roll Probability==
Daily [[Luck]] and Luck buffs (from [[cooking|food]] items, [[Ginger Ale]], [[Lucky Ring]]s, etc.) can increase the chance of winning and the expected return when gambling. Otherwise, rolls are randomly determined.


Daily [[Luck]] and the Luck buff from various food items increase the chance of winning and your expected return when gambling. Probability ranges are from minimum luck (negative daily luck, no buff) to maximum luck (max daily luck, +5 luck from [[Magic Rock Candy]]).
==Winning lines==
 
There are 10 possible winning lines, each one giving different multipliers.
All probabilities are independent of each other except Parsnip and Single/Double Cherry (due to specific ordering within the code).<ref name="slots" />
{| class="wikitable sortable"
 
|-
{| class="wikitable"
!Line
!Name
!Chance<ref name="slots"/>
!Reward
!Multiplier
!Minimum Probability
!Maximum Probability
|-
|-
|Stardrop
|[[File:Cherry.png|32px]]
|2500x
|20%
|0.00329%
|2
|0.00729%
|-
|-
|Diamond
|[[File:Cherry.png|32px]][[File:Cherry.png|32px]]
|1000x
|10%
|0.0329%
|3
|0.0729%
|-
|-
|Triple Cherry
|[[File:Parsnip.png|32px]][[File:Parsnip.png|32px]][[File:Parsnip.png|32px]]
|500x
|8%
|0.0658%
|5
|0.1458%
|-
|-
|Melon
|[[File:Large Milk.png|32px]][[File:Large Milk.png|32px]][[File:Large Milk.png|32px]]
|200x
|1%
|0.1316%
|30
|0.2916%
|-
|-
|Nautilus Shell
|[[File:Rainbow Trout.png|32px]][[File:Rainbow Trout.png|32px]][[File:Rainbow Trout.png|32px]]
|120x
|0.3%
|0.2632%
|80
|0.5832%
|-
|-
|Trout
|[[File:Nautilus Shell.png|32px]][[File:Nautilus Shell.png|32px]][[File:Nautilus Shell.png|32px]]
|80x
|0.2%
|0.3948%
|120
|0.8748%
|-
|-
|Milk
|[[File:Melon.png|32px]][[File:Melon.png|32px]][[File:Melon.png|32px]]
|30x
|0.25%
|0.6580%
|200
|1.4580%
|-
|-
|Parsnip
|[[File:Cherry.png|32px]][[File:Cherry.png|32px]][[File:Cherry.png|32px]]
|5x
|0.09%
|3.2900%
|500
|7.2900%
|-
|-
|Double Cherry
|[[File:Diamond.png|32px]][[File:Diamond.png|32px]][[File:Diamond.png|32px]]
|3x
|0.06%
|1.9740%
|1000
|4.3740%
|-
|-
|Single Cherry
|[[File:Stardrop.png|32px]][[File:Stardrop.png|32px]][[File:Stardrop.png|32px]]
|2x
|0.1%
|7.896%
|2500
|17.496%
|}
|}


This means that the expected value of playing slots is between 2.2x and 4.9x.
This is adjusted multiplicatively by daily Luck, increasing by 20% at best or decreasing by 20% at worst with the [[Special Charm]] adding 5%. Food buffs add 8% for every point of Luck (''e.g.,'' if daily Luck is max and luck from food is 3 then the chance to get 1 cherry is 20% * (1 + 0.2 + 0.24) = 28.8%).
 
==Expected Value Calculation==
 
To calculate the expected net gain or loss from playing the slot machine, we use the formula:
 
'''Net Expected Gain/Loss = (B × Σ(P<sub>i</sub> × M<sub>i</sub>)) - B'''
 
Where:
* ''B'' = Bet amount (in units)
* ''P<sub>i</sub>'' = Probability of the i-th outcome
* ''M<sub>i</sub>'' = Multiplier for the i-th outcome
* ''Σ'' = Sum over all possible outcomes (i=1 to n)
 
After accounting for the following:
 
'''Net Expected Gain/Loss = B × ((0.2 × 2) + (0.1 × 3) + (0.08 × 5) + (0.01 × 30) + (0.003 × 80) + (0.002 × 120) + (0.0025 × 200) + (0.0009 × 500) + (0.0006 × 1000) + (0.001 × 2500)) - B'''
 
Which simplifies to:
 
'''Net Expected Gain/Loss = B × 5.93 - B = B × (5.93 - 1)'''
 
Then reducing to:
 
'''Net Expected Gain/Loss = B × 4.93'''
 
To simplify, if you spend {{Price|100|Qi}} on a spin you can expect a net gain of {{Price|493|Qi}} per spin!


==References==
==References==
<references>
<references>
<ref name="slots">See <tt>Slots::setSlotResults</tt> in the game code.</ref>
<ref name="slots">See <samp>Slots::setSlotResults</samp> in the game code.</ref>
</references>
</references>


==History==
==History==
{{history|1.4|Recalculated the way random number generation is done, removing repeating pattern exploits.  All [[Casino]] games now slightly favor the player rather than the house.}}
{{History|1.4|Recalculated the way random number generation is done, removing repeating pattern exploits.  All [[Casino]] games now slightly favor the player rather than the house.}}


[[Category:Mini-games]]
[[Category:Mini-games]]
Line 88: Line 102:
[[hu:Pénzbedobós automata]]
[[hu:Pénzbedobós automata]]
[[pt:Caça-níqueis]]
[[pt:Caça-níqueis]]
[[ru:Игровой автомат]]
[[ru:Слот-машина]]
[[tr:Kumar Makinesi]]
[[tr:Slot Makinesi]]
[[zh:角子机]]
[[zh:印花老虎机]]

Latest revision as of 14:14, 18 March 2026

Slot Machines are a mini-game found in the Casino.

The player can bet either 10 or 100 Qi coins when using a slot machine. If the results match one of the winning lines, the player receives a multiple of their bet. If there is no match the player loses their bet.

Daily Luck and Luck buffs (from food items, Ginger Ale, Lucky Rings, etc.) can increase the chance of winning and the expected return when gambling. Otherwise, rolls are randomly determined.

Winning lines

There are 10 possible winning lines, each one giving different multipliers.

Line Chance[1] Multiplier
20% 2
10% 3
8% 5
1% 30
0.3% 80
0.2% 120
0.25% 200
0.09% 500
0.06% 1000
0.1% 2500

This is adjusted multiplicatively by daily Luck, increasing by 20% at best or decreasing by 20% at worst with the Special Charm adding 5%. Food buffs add 8% for every point of Luck (e.g., if daily Luck is max and luck from food is 3 then the chance to get 1 cherry is 20% * (1 + 0.2 + 0.24) = 28.8%).

Expected Value Calculation

To calculate the expected net gain or loss from playing the slot machine, we use the formula:

Net Expected Gain/Loss = (B × Σ(Pi × Mi)) - B

Where:

  • B = Bet amount (in units)
  • Pi = Probability of the i-th outcome
  • Mi = Multiplier for the i-th outcome
  • Σ = Sum over all possible outcomes (i=1 to n)

After accounting for the following:

Net Expected Gain/Loss = B × ((0.2 × 2) + (0.1 × 3) + (0.08 × 5) + (0.01 × 30) + (0.003 × 80) + (0.002 × 120) + (0.0025 × 200) + (0.0009 × 500) + (0.0006 × 1000) + (0.001 × 2500)) - B

Which simplifies to:

Net Expected Gain/Loss = B × 5.93 - B = B × (5.93 - 1)

Then reducing to:

Net Expected Gain/Loss = B × 4.93

To simplify, if you spend data-sort-value="100">100 on a spin you can expect a net gain of data-sort-value="493">493 per spin!

References

  1. ↑ See Slots::setSlotResults in the game code.

History

  • 1.4: Recalculated the way random number generation is done, removing repeating pattern exploits. All Casino games now slightly favor the player rather than the house.