## simulate randomly scattered pts in a diamond ## with vertices at (-1,0), (0,1), (1,0), (0,-1). z = matrix(0,ncol=2,nrow=1200) j=1 for(i in c(1:1200)){ x = runif(1)*2-1 y = runif(1)*2-1 if(abs(x)+abs(y)<1){ z[j,] = c(x,y) j = j+1 } } z2 = z[1:1000,] ## but check that you have kept at least 500 pts plot(z2) plot(z2[,1],z2[,2]) lines(c(-1,0,1,0,-1),c(0,1,0,-1,0)) ## a little better: plot(c(-1,0,1,0,-1),c(0,1,0,-1,0),type="l",xlab="",ylab="") points(z2,pch=".") diamond3 = function(k,n){ z = matrix(0,ncol=2,nrow=n) j=1 for(i in c(1:n)){ x = runif(1)*2-1 y = runif(1)*2-1 if(abs(x)+abs(y)<1){ z[j,] = c(x,y) j = j+1 } } if(j 8.5)) a1 = mychips1 a1 } ## end of yolanda malibooty = function(numattable1, crds1, board1, round1, currentbet, mychips1, pot1, roundbets, blinds1, chips1, ind1, dealer1, tablesleft){ ## go all-in with any pocket pair, or any combination of T-A ## go all-in with 80% probability if suited connector a1 = 0 x = runif(1) if((crds1[1,1] == crds1[2,1]) || ((crds1[1,1] > 9.5) && (crds1[2,1]>9.5))) a1 = mychips1 if((crds1[1,1]-crds1[2,1]==1) && (crds1[1,2] == crds1[2,2]) && (crds1[1,1] < 10.5) && (crds1[2,1] < 9.5) && (x<.80)) a1 = mychips1 a1 } ## end of malibooty: kevinfujii & emilykosko fillivey = function(numattable1, crds1, board1, round1, currentbet, mychips1, pot1, roundbets, blinds1, chips1, ind1, dealer1, tablesleft){ ## go all in with any pair 9 or higher, AK, AQ ## AJ, KQ, 77, 88 if no one is all in yet ## if less than 5 times the big blind, go all in if 1st card is 10 or higher and 2nd card is 9 or higher, or any pair ## if nobody's raised yet, and on the button go all in with A8 or greater a1 = 0 x = runif(1) y = max(roundbets[,1]) big1 = dealer1 + 2 if(big1 > numattable1) big1 = big1 - numattable1 z = big1 - ind1 if(z<0) z = z + numattable1 if((crds1[1,1] == crds1[2,1]) && (crds1[1,1] > 8.5)) a1 = mychips1 if((crds1[1,1] == 14) && (crds1[2,1] > 11.5)) a1 = mychips1 if((crds1[1,1] == 14) && (crds1[2,1] == 11) && (currentbet <= blinds1)) a1 = mychips1 if((crds1[1,1] == 13) && (crds1[2,1] == 12) && (currentbet <= blinds1)) a1 = mychips1 if((crds1[1,1] == crds1[2,1]) && (crds1[1,1] > 6.5) && (currentbet <= blinds1)) a1 = mychips1 if((mychips1 < 5*blinds1) && (crds1[1,1] >= 10) && (crds1[2,1] >= 9)) a1 = mychips1 if((mychips1 < 5*blinds1) && (crds1[1,1] == crds1[2,1])) a1 = mychips1 if(y <= blinds1){ if((z < 1.5) && ((crds1[1,1] == 14) && (crds1[2,1] > 7.5))) a1 = mychips1 } a1 } ## end of fillivey: myley & chris