+ Reply to Thread
Results 1 to 5 of 5

Help building a simulation based on probability

  1. #1
    Registered User
    Join Date
    11-12-2010
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    20

    Exclamation Help building a simulation based on probability

    Hi

    My final objective is to create a graph that will show the rate at which a player accumulates coins in a game. (I need to know how much coins the player has at any day#)

    Here are the conditions: (numbers represents coins gained)

    Winning a game 100
    Fast win 16
    First win (bonus valid once every 24hours) 150
    Loosing a game 70

    and this is a sample player profile:

    Avg #games played per day 3
    Win probability 60%
    Fast win probability 35%


    Any suggesstion as of how to tackle this issue wihtout coding in VBA ?

    Cheers!
    N

  2. #2
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    21,135

    Re: Help building a simulation based on probability

    Quote Originally Posted by one11 View Post
    Here are the conditions: (numbers represents coins gained)

    Winning a game 100
    Fast win 16
    First win (bonus valid once every 24hours) 150
    Loosing a game 70
    Just to be clear, I gain 70 coins if I lose a game?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    11-12-2010
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Help building a simulation based on probability

    That's correct. (you gain coins even if you loose) The reward system is based on playtime more than performance.

  4. #4
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    21,135

    Re: Help building a simulation based on probability

    Press F9 to rerun the simulation.

    This is not a highly generalized solution. The number of columns depends on how many games you think someone might play in one day. Given the average of 3, I assumed that the number of games played will range from 0-6, so I have six sets of results which are accumulated through the day.

    I show 29 days of games but it's easy to add rows; just copy the formulas down.

    The Parameters sheet has all the probabilities and other values. It is fairly easy to change to a different set of probabilities for different outcomes, add more outcomes, and change coin gains.

    This sort of simulation is called a Monte Carlo simulation, where you set parameters and probabilities for possible outcomes, and run random scenarios to get a forecast for likely outcomes. We do this for project scheduling, for example.

    I plotted your outcomes with day on the x axis, but also look at the Histogram sheet to see the daily winnings distribution for each run. The more days you simulate, the more consistent the histogram will be. There is a clump of 0 winnings because there are some days that the game is not played.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-12-2010
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Help building a simulation based on probability

    Thanks! very impressive

    All this time I thought that the "Monte Carlo simulation" was something exclusive to gambling (yknow what they say about assume :P)

    On top of that, this is a lot neater than coding VBA

    Thanks a lot for your time on this, i'll spend some time reading up on the Monte Carlo method

    Cheers,
    N

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1