## Projects are due by email to me, on Sunday, June 2, 8:00pm ## to frederic@stat.ucla.edu . ## Rules: ## a) We will run several tournaments. ## Each will have 3 winners, with payouts of 13,8, and 5. ## b) Start with 1000 chips each, and blinds of 10 and 20. ## c) Small blind = 1/2 big blind (rounded to nearest integer). ## d) Blinds last 10 hands, then increase by 50 percent. (rounded) ## Examples: tommy = function(numattable1, crds1, board1, round1, currentbet, mychips1, pot1, roundbets, blinds1, chips1, ind1, dealer1, tablesleft){ ## all in with any pair. a1 = 0 if(crds1[1,1] == crds1[2,1]) a1 = mychips1 a1 } ## end of tommy ursula = function(numattable1, crds1, board1, round1, currentbet, mychips1, pot1, roundbets, blinds1, chips1, ind1, dealer1, tablesleft){ ## if pair of 9s or better, then all in a1 = 0 if((crds1[1,1] == crds1[2,1]) && (crds1[2,1] > 8.5)) a1 = mychips1 a1 } ## end of ursula ## MAKE TEAMS: x = c("KevinD", "Jesus", "Noam", "Jordan", "Philip", "Yu-Lun", "Jason", "Patricia", "KevinN", "Tammy", "Zach", "Paulina", "Allen", "Tianheng", "Gary", "Daniel", "Lindsay", "Haiyu") n = length(x) name1 = c("a","b","c","d","e","f","g","h","i") teams = function(){ y = x[sample(n)] for(i in 1:(n/2)){ cat("\n", name1[i], y[(2*i-1):(2*i)]) } cat(" ",y[n]) } teams() install.packages("holdem") library(holdem) name1 = c("gravity","tommy","ursula","timemachine","vera","william","xena") decision1 = list(gravity, tommy, ursula, timemachine, vera, william, xena) tourn1(name1, decision1, myfast1 = 2) ## run quickly name1 = c("gravity","tommy","ursula") decision1 = list(gravity, tommy, ursula) tourn1(name1, decision1, myfast1 = 0) ## run slowly a Jordan Daniel b KevinN Yu-Lun c Zach Jesus d Tianheng Gary e Allen KevinD f Haiyu Philip g Jason Noam h Patricia Paulina i Tammy Lindsay