[R] card games

(Ted Harding) Ted.Harding at manchester.ac.uk
Thu Oct 23 01:21:29 CEST 2008


On 22-Oct-08 23:04:34, Barry Rowlingson wrote:
> 2008/10/22 Erin Hodgess <erinm.hodgess at gmail.com>:
>> This is for programming purposes.
>>
>> I wanted my students to do some games, but I wanted to see if there
>> were items already out there.
> 
>  A quick googling (oooh, if ONLY R was called something more googly!)
> found Duncan Murdoch's poker package:
> 
> http://www.stats.uwo.ca/faculty/murdoch/repos/html/pokerv0.0.html
> 
>  v0.0 could give your students something to start on. It has some card
> handling and shuffling packages as well as hand evaluations.
> 
>  Here's my poker calculator:
> 
>  action = function(hand, bet, cash){
>    if(rubbish(hand)){
>       drink() ; drink()
>       if(drunk()) {
>          return(bluff)
>           }else{
>          return(fold)
>        }
>    } else {
>     drink()
>     bet = runif(1,min,max)
>     return(bet)
>    }
> }
> 
>  It's a pretty accurate simulation. *hic*
> Barry

*** Segmentation fault - virtuous memory exceeded





--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 23-Oct-08                                       Time: 00:21:27
------------------------------ XFMail ------------------------------



More information about the R-help mailing list