Jump to content
  • 0

Slot Machine probability


Genesis

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   2
  • Joined:  12/01/11
  • Last Seen:  

Hello,

 

I'm trying to create a slot machine NPC, where players pay a fee to play. They have a x chance of winning y zeny. Does anyone have a snippet of a script illustrating a zeny slot machine's formula for making sure the house always wins?

 

 

As far as I can remember from my probability classes is the following formula:

 

EV = Chance_of_winning * (winnings - bet) + (chance of winning * -bet)

 

However, I'd like to be able to account for multiple instances of winning (not always the jackpot) but at the same time making sure the house always wins.

 

 

TLDR: I nneed a snippet of a zeny slot machine that shows the formula used to make sure the house wins, while ensuring the player gets SOME zeny back. 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   2
  • Joined:  12/01/11
  • Last Seen:  

Bump, anyone have any ideas?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...