Computer Science Canada

Help with adjusting integers on a bell curve

Author:  syntribos [ Thu Dec 20, 2012 6:56 pm ]
Post subject:  Help with adjusting integers on a bell curve

Is it possible to adjust a random integer (or any integer) on a bell curve (so that numbers closer to the middle appear more frequently, and less on the edges)?

I'm creating a 'Texas Hold 'em' program for my computer science at school, and wanted to add a multiplier on the bets given by the computers (e.g. a bet of $500 gets a multiplier of .93 and becomes $465). I wanted the bets to have a potential multiplier between ? 50%, but would like lower multipliers to appear more frequently.

Author:  Insectoid [ Thu Dec 20, 2012 7:08 pm ]
Post subject:  RE:Help with adjusting integers on a bell curve

Turing has no built-in way to do this, but you can write a function that uses the random() funcion to generate random numbers on a curve.

Author:  Tony [ Thu Dec 20, 2012 8:59 pm ]
Post subject:  Re: RE:Help with adjusting integers on a bell curve

Insectoid @ Thu Dec 20, 2012 7:08 pm wrote:
but you can write a function that uses the random() funcion to generate random numbers on a curve.

A specific example is that a sum of rolling two random die has a bellcurve distribution.


: