## Teams: ## ## Marlene/BrianL --- "asshole" ## Scott/Stephanie -- "brenda" ## Dan/BryanP ------- "c" ## Sara/Sean -------- "doyle" ## Martin/Eddie ----- "edmartin" ## MichaelZ/BryanY -- "farha" ## MichaelL/Josh ---- "greg" ## Curtis/Tom ------- "hector" ## Steve/Vivek ------ "jesus" ## NOTE: After class I added one called "Zebra" below, to show how to take ## things like the number of players left to act into account. ## Also, if you look at the top of the file "strats101.s", you can see ## some other things you can use, if you want. xena = function(numattable1, crds1, board1, round1, currentbet, mychips1, pot1, roundbets, blinds1, chips1, ind1, dealer1, tablesleft){ ## if any pair, suited anything, or if the smaller card is at least 9, then all in a1 = 0 if((crds1[1,1] == crds1[2,1]) || (crds1[1,2] == crds1[2,2]) || (crds1[2,1] > 8.5)) a1 = mychips1 a1 } ## end of xena yolanda = 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 yolanda unbeatable1 = function(numattable1, crds1, board1, round1, currentbet, mychips1, pot1, roundbets, blinds1, chips1, ind1, dealer1, tablesleft){ ## any pair, or AT-AK, a1 = 0 if((crds1[1,1] == crds1[2,1]) || ((crds1[1,1] > 13.5) && (crds1[2,1]>9.5))) a1 = mychips1 a1 } ## end of unbeatable version2 = function(numattable1, crds1, board1, round1, currentbet, mychips1, pot1, roundbets, blinds1, chips1, ind1, dealer1, tablesleft){ ## any pair, or AT-AK, or suited connectors a1 = 0 if((crds1[1,1] == crds1[2,1]) || ((crds1[1,1] > 13.5) && (crds1[2,1]>9.5)) || ((crds1[1,1]-crds1[2,1]==1) && (crds1[1,2] == crds1[2,2]))) a1 = mychips1 a1 } ## end of unbeatable wilma = function(numattable1, crds1, board1, round1, currentbet, mychips1, pot1, roundbets, blinds1, chips1, ind1, dealer1, tablesleft){ ## if pair of 9s or 10s, all in with probability 35% ## if higher pair, all in with prob. 50% a1 = 0 x = runif(1) if((crds1[1,1] == crds1[2,1]) && (crds1[2,1] > 8.5) && (crds1[2,1]<10.5) && (x<.35)) a1 = mychips1 if((crds1[1,1] == crds1[2,1]) && (crds1[2,1]>10.5) && (x<.50)) a1 = mychips1 a1 } ## end of wilma zebra = function(numattable1, crds1, board1, round1, currentbet, mychips1, pot1, roundbets, blinds1, chips1, ind1, dealer1, tablesleft){ ## if pair of 10s or higher, all in for sure, no matter what. ## if AK or AQ, all in with probability 75%. ## if pair of 7s or higher and there are 6 or fewer players ## at your table (including you), then all in. ## if your chip count is less than twice the big blind, go all in with any cards. ## if nobody's raised yet: ## ... and if there are 3 or fewer players left behind you, ## then go all in with any pair or any ace. ## ... and there's only 1 or 2 players behind you, ## then go all in with any cards. a1 = 0 x = runif(1) ## x is a random number between 0 and 1. y = max(roundbets[,1]) ## y is the maximum bet so far. big1 = dealer1 + 2 if(big1 > numattable1) big1 = big1 - numattable1 z = big1 - ind1 if(z<0) z = z + numattable1 ## the previous 4 lines make it so z is the number of players left to act behind you. if((crds1[1,1] == crds1[2,1]) && (crds1[2,1] > 9.5)) a1 = mychips1 if((crds1[1,1] == 14) && (crds1[1,2]>11.5) && (x<.75)) a1 = mychips1 if((crds1[1,1] == crds1[2,1]) && (crds1[2,1] > 6.5) && (numattable1 < 6.5)) a1 = mychips1 if(mychips < 2*blinds1) a1 = mychips1 if(y <= blinds1){ if((z < 3.5) && ((crds1[1,1] == crds1[2,1]) || (crds1[1,1] == 14))) a1 = mychips1 if(z < 2.5) a1 = mychips1 } a1 } ## end of zebra