{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 1 24 0 0 255 1 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 261 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 266 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 267 "Helvetica" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Text Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 3 1 3 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Tex t Output" -1 6 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 2 1 3 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Warning" -1 7 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 1 1 3 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Plot" -1 13 1 {CSTYLE "" -1 -1 " Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 } {PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 257 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 3" -1 258 1 {CSTYLE "" -1 -1 "Time s" 1 14 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 } {PSTYLE "Normal" -1 259 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 3 10 3 10 2 2 0 1 }{PSTYLE "Normal" -1 260 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 } 1 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 261 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 262 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 3 0 3 0 2 2 0 1 }{PSTYLE "Heading 2" -1 263 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 2 3 0 3 0 2 2 0 1 }{PSTYLE "Heading 3" -1 264 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 3 0 3 0 2 2 0 1 }{PSTYLE "Normal" -1 265 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 3 0 3 0 2 2 0 1 }{PSTYLE "Warning" -1 266 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 1 1 3 1 }1 1 0 0 0 0 3 0 3 0 2 2 0 1 }{PSTYLE "Maple Output" -1 267 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 3 0 3 0 2 2 0 1 }{PSTYLE "Normal" -1 268 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 3 0 3 0 2 2 0 1 } {PSTYLE "Heading 1" -1 269 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 3 0 3 0 2 2 0 1 }{PSTYLE "Normal" -1 270 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 } 1 3 0 0 0 0 3 0 3 0 2 2 0 1 }{PSTYLE "Normal" -1 271 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 3 0 3 0 2 2 0 1 }{PSTYLE "Text Output" -1 272 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 2 1 3 1 }1 1 0 0 0 0 3 0 3 0 2 2 0 1 }{PSTYLE "Map le Output" -1 273 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 3 0 0 0 0 3 0 3 0 2 2 0 1 }{PSTYLE "NORMAL" -1 274 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 2 1 3 1 }1 3 0 0 0 0 3 0 3 0 2 2 0 1 }{PSTYLE "Normal" -1 275 1 {CSTYLE "" -1 -1 "Tim es" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 3 100 3 100 2 2 0 1 }{PSTYLE "Normal" -1 276 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 3 100 3 100 2 2 0 1 }{PSTYLE "Normal " -1 277 1 {CSTYLE "" -1 -1 "Times" 1 12 255 0 255 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 278 1 {CSTYLE " " -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 3 100 3 100 2 2 0 1 }} {SECT 0 {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart;" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 11 "Jason Burke" }}{PARA 0 "" 0 "" {TEXT -1 9 "6/13/2002" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 262 "" 0 "" {TEXT -1 140 "BlackJack analysis and Simulator final project for \+ Math 107B at UCSD with Professor John Wavrik and TA Stefan Erickson.\n Copywrite 2002 (c) \n" }}{PARA 277 "" 0 "" {TEXT -1 180 "Warning: This maple worksheet takes about 50 seconds to execute on my Athlon XP 170 0+ with 256 MBs of memory. If you have a much slower computer it may t ake a long time to execute." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 262 "" 0 "" {TEXT 258 30 "Procedures used for BlackJack:" } {TEXT -1 0 "" }}{PARA 262 "" 0 "" {TEXT -1 0 "" }}{SECT 0 {PARA 263 " " 0 "" {TEXT -1 23 "Create global variables" }}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 12 "randomize():" }}}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 10 "shoe := 1:" }}}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 45 "deck := [seq(i mod 13 + 1,i=0..(51 * shoe))]:" }}}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 319 "card_value_table := table([(0)=0,(1)=1 ,\n (2)=2,(3)=3,\n \+ (4)=4,(5)=5,\n (6)=6,(7)=7, \n (8)=8,(9)=9,\n \+ (10)=10,(11)=10,\n (12)=10,(1 3)=10]):" }}}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 14 "doubling := 1 :" }}}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 11 "stand := 0:" }}} {EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 11 "split := 0:" }}}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 23 "num_of_blackjacks := 0:" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 762 "basic strat table is a look up ta ble to find the best move to take depending on the player's 2 cards an d the dealer's\nup card. The 2 digits represent the player's 2 cards, \+ and the 3rd digit is the dealer's card. 0 represents 10 or a face card and 1 represents an ace. The other numbers are the same as the card. \+ If the value in the table is 0, that means stand, 1 that means hit, 2 \+ means double and 3 means split. If the hand total is less than 8 or gr eater than 16 it is not in this chart, because you should always hit w hen you have less than 8 and stand when you have greater than 16. Also note that in order to save space the hands are organized so that your low card is always first, for example (262) is in the chart but not ( 622) since these are the same." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4472 "basic_strat_table := table([(262) = 1, (263) = 1, (264) = 1, \n (265) = 1, (266) = 1, (267) = 1,\n \+ (268) = 1, (269) = 1, (260) = 1,\n \+ (261) = 1,\n (352) = 1, (353) = 1, (354) = 1,\n (355) = 2, (356) = 2, (3 57) = 1,\n (358) = 1, (359) = 1, (350) = 1, \n (351) = 1,\n \+ (122) = 1, (123) = 1, (124) = 2,\n (125) = \+ 2, (126) = 2, (127) = 1,\n (128) = 1, (129) = 1, (120) = 1,\n (121) = 1, \n \+ (132) = 1, (133) = 1, (134) = 2,\n \+ (135) = 2, (136) = 2, (137) = 1,\n \+ (138) = 1, (139) = 1, (130) = 1,\n (131) = 1,\n (142) = 1, (143) = 1, (144) = 2,\n \+ (145) = 2, (146) = 2, (147) = 1,\n \+ (148) = 1, (149) = 1, (140) = 1,\n \+ (141) = 1,\n (152) = 1, (153) = 1, (154) = 2,\n (155) = 2, (156) = 2, (157) = 1,\n (158) = 1, (159) = 1, (150) = 1,\n \+ (151) = 1,\n (162) = 2, (163) = 2, (164) = 2,\n (165) = 2, (1 66) = 2, (167) = 1,\n (168) = 1, (169) = 1, (160) = 1,\n (161) = 1,\n \+ (172) = 0, (173) = 2, (174) = 2,\n \+ (175) = 2, (176) = 2, (177) = 0,\n (178) = 0, (179) = 1, (170) = 1,\n (171) = 0,\n \+ (182) = 0, (183) = 0, (184) = 0,\n \+ (185) = 0, (186) = 2, (187) = 0,\n \+ (188) = 0, (189) = 0, (180) = 0,\n \+ (181) = 0,\n (192) = 0, (193) = 0, (194) = 0,\n (195) = 0, (196) = 0, (197) = 0,\n \+ (198) = 0, (199) = 0, (190) = 0,\n \+ (191) = 0, \n (112) = 3, (113) = 3, (114) = 3,\n (115) = 3, (116) = 3, (117) = 3,\n (118) = 3, (119) = 3, (110 ) = 3,\n (111) = 3,\n \+ (222) = 1, (223) = 3, (224) = 3,\n (2 25) = 3, (226) = 3, (227) = 3,\n (228) = 1, (229) = 1, (220) = 1,\n (221) = 1, \n \+ (332) = 1, (333) = 1, (334) = 3,\n \+ (335) = 3, (336) = 3, (337) = 3,\n \+ (338) = 1, (339) = 1, (330) = 1,\n ( 331) = 1,\n (442) = 1, (443) = 1, (444) = 1 ,\n (445) = 2, (446) = 2, (447) = 1,\n \+ (448) = 1, (449) = 1, (440) = 1,\n \+ (441) = 1,\n (552) = 2, (553 ) = 2, (554) = 2,\n (555) = 2, (556) = 2, ( 557) = 2,\n (558) = 2, (559) = 2, (550) = 1 ,\n (551) = 1,\n \+ (662) = 3, (663) = 3, (664) = 3,\n (665) = 3, (666) = 3, (667) = 1,\n (668) = 1, (669 ) = 1, (660) = 1,\n (661) = 1,\n \+ (772) = 3, (773) = 3, (774) = 3,\n \+ (775) = 3, (776) = 3, (777) = 3,\n \+ (778) = 1, (779) = 1, (770) = 0,\n (771) = 1,\n (882) = 3, (883) = 3, (884) = 3,\n \+ (885) = 3, (886) = 3, (887) = 3,\n \+ (888) = 3, (889) = 3, (880) = 3,\n \+ (881) = 3,\n (992) = 3, (993) = 3, (994) = 3,\n (995) = 3, (996) = 3, (997) = 0,\n (998) = 1, (999) = 1, (990) = 0,\n \+ (991) = 0,\n (002) = 0, (003) = 0, (004) = 0,\n (005) = 0, (0 06) = 0, (007) = 0,\n (008) = 0, (009) = 0, (000) = 0,\n (001) = 0]): \+ " }}}{PARA 262 "" 0 "" {TEXT -1 0 "" }}}{SECT 0 {PARA 262 " " 0 "" {TEXT -1 0 "" }{TEXT 257 40 "hand_total: Computes the value of \+ a hand" }{TEXT -1 0 "" }}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 270 " hand_total := proc (hand::list) local total; global card_value_table; \n\ntotal := 0;\n\ntotal := sum('card_value_table[hand[k]]', 'k' = 1.. nops(hand));\n\nif(is_an_ace(hand)) then\n if(total + 10 <= 21) then \n total := total + 10;\n end if;\nend if;\n\n\nreturn total;\nend proc:" }}}{PARA 263 "" 0 "" {TEXT -1 0 "" }}}{PARA 262 "" 0 "" {TEXT -1 0 "" }}{SECT 0 {PARA 263 "" 0 "" {TEXT -1 78 "is_an_ace: checks the hand for an ace. Returns true if there is at least 1 ace" }}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 166 "is_an_ace := proc(hand::list) lo cal i;\n for i from 1 by 1 while i <= nops(hand) do\n if(hand[i] = 1) then return true; end if;\n end do;\n\n return false;\nend proc: " }}}}{SECT 0 {PARA 263 "" 0 "" {TEXT -1 68 "players_turn_simple: exec utes the player's turn with simple strategy" }}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 268 "players_turn_simple := proc (my_hand::list, dea lers_hand::list) local new_my_hand; global deck, double; \nnew_my_ha nd := my_hand;\ndouble := 1;\nwhile(hand_total(new_my_hand) < 16) do\n new_my_hand := deal_card(new_my_hand);\n end do;\n\nreturn new_ my_hand;\nend proc:" }}}{PARA 262 "" 0 "" {TEXT -1 0 "" }}}{SECT 0 {PARA 262 "" 0 "" {TEXT 268 65 "players_turn_basic: executes the playe rs turn with basic strategy" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 3863 "players_turn_basic := proc (my_hand::list, dealers_hand::list)\n local new_my_hand::list, dcard, temp, what_to_do ; \n global deck, stand, double, split,\n \+ basic_strat_table, card_value_table;\n\nnew_my_hand := m y_hand;\ndcard := dealers_hand[1];\n# first check that we are not hand ling a split\nstand := 0;\ndouble := 1;\n\nwhile(stand = 0 and double \+ = 1) do\n\n#check 1 card case, we should always hit after a split\nif( nops(new_my_hand) = 1) then\n new_my_hand := deal_card(new_my_hand); \nend if;\n\n#checking specific 2 card cases\nif(nops(new_my_hand) = 2 ) then\n\n if(hand_total(new_my_hand) > 7 and\n hand_total(ne w_my_hand) < 17) then\n\n if(new_my_hand[1] > new_my_hand[2]) the n\n temp := new_my_hand[1];\n new_my_hand[1] := new_my_h and[2];\n new_my_hand[2] := temp;\n end if;\n\n #gene rate value for basic_strat_table \n temp := 100 * card_value_ table[new_my_hand[1]] mod 10 + \n 10 * card_value_tabl e[new_my_hand[2]] mod 10 +\n dcard;\n what_to_do \+ := basic_strat_table[temp];\n if(what_to_do = 1) then\n \+ new_my_hand := deal_card(new_my_hand);\n elif(what_to_do = 2) t hen\n double := 2;\n new_my_hand := deal_card(ne w_my_hand);\n elif(what_to_do = 3) then\n if(split = 0 ) then \n split := 1;\n new_my_hand := [ne w_my_hand[1]];\n stand := 1;\n else new_my _hand := deal_card(new_my_hand); end if;\n elif(what_to_do \+ = 0) then\n stand := 1;\n end if;\n end \+ if;\n end if;\n\n \n#check hand total cases \nif((stand != 1) and ( double != 2)) then\n \n elif((hand_total(new_my_hand) = 9) and \n \+ (dcard = 7 or dcard = 8 or dcard = 9 or \+ \+ \+ \+ \+ card_value_table[dcard] = 10 or dcard = 1)) then\n \+ new_my_hand := deal_card(new_my_hand); \n\n elif(hand_total(new_ my_hand) = 9) then \n new_my_hand := deal_card(new_my_hand); \n double := 2;\n\n elif((hand_total(new_my_hand) = 10) an d \n (card_value_table[dcard] = 10 or dcard = 1)) t hen\n new_my_hand := deal_card(new_my_hand);\n\n elif(hand _total(new_my_hand) = 10) then\n new_my_hand := deal_card(ne w_my_hand);\n double := 2;\n\n elif(hand_total(new_my_hand ) = 11) then \n new_my_hand := deal_card(new_my_hand);\n \+ double := 2;\n\n elif((hand_total(new_my_hand) = 12) and (dcar d = 4 or dcard = 5 or dcard = 6)) then\n stand := 1; #stand\n \n elif(hand_total(new_my_hand) = 12) then \n new_my_hand \+ := deal_card(new_my_hand);\n\n elif((hand_total(new_my_hand) = 13 o r hand_total(new_my_hand) = 14 or\n hand_total (new_my_hand) = 15 or hand_total(new_my_hand) = 16) and\n \+ (dcard = 2 or dcard = 3 or dcard = 4 or\n \+ dcard = 5 or dcard = 6)) then\n stand := 1; #stand\n \n elif(hand_total(new_my_hand) = 13 or hand_total(new_my_hand) = 14 or\n hand_total(new_my_hand) = 15 or hand_total(new_my_h and) = 16) then\n new_my_hand := deal_card(new_my_hand);\n\n \+ #now check if finished\n\n elif(hand_total(new_my_hand) > 16) the n \n stand := 1;\n\n elif(hand_total(new_my_hand) < 12) then new_my_hand := deal_card(new_my_hand);\n\n else stand := 1; \n en d if;\n\nend do;\n\n#Note: if there is a split just return the 1 card \+ that we are splitting with\n#then let the blackjack function take care of handling both cases.\n\nreturn new_my_hand;\nend proc:" }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 0 {PARA 263 "" 0 "" {TEXT -1 59 "deal ers_turn: executes the dealer's turn (stand on soft 17)" }}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 250 "dealers_turn := proc(dealers_han d::list) local new_dealers_hand; global deck;\nnew_dealers_hand := dea lers_hand;\nwhile(hand_total(new_dealers_hand) < 17) do\n new_dealers _hand := deal_card(new_dealers_hand);\nend do;\n\nreturn new_dealers_h and;\nend proc:" }}}}{SECT 0 {PARA 263 "" 0 "" {TEXT -1 71 "deal_card: deals one card at random from the deck into the players hand" }} {EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 279 "deal_card := proc(hand::l ist) local rand1, deck_length, i, new_hand::list; global deck;\n\n d eck_length := nops(deck);\n rand1 := (rand() mod deck_length) + 1;\n \n \n new_hand := [op(hand),deck[rand1]];\n\n\n deck := subsop(r and1=NULL,deck);\n\n return (new_hand);\n\n end proc:" }}}{PARA 262 "" 0 "" {TEXT -1 0 "" }}}{PARA 262 "" 0 "" {TEXT 256 0 "" }{TEXT -1 0 "" }}{SECT 0 {PARA 263 "" 0 "" {TEXT -1 63 "winner: determines th e winner, assuming hand2 wins on both bust" }}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 67 "winner := proc(hand1::list, hand2::list)\nglobal n um_of_blackjacks;\n" }{TEXT -1 1 "f" }{TEXT 18 33 "irst check if the d ealer has won:" }{MPLTEXT 1 0 130 "\nif(hand_total(hand1) > 21 or ((ha nd_total(hand2) <= 21) and (hand_total(hand2) > hand_total(hand1)))) t hen return -1; end if;\n" }{TEXT -1 32 "now check if the player has won:" }{MPLTEXT 1 0 1 "\n" }{TEXT -1 56 "check for blackjack (when yo u have an ace and a 10 card)" }{MPLTEXT 1 0 199 "\nif((hand_total(hand 1) = 21) and (hand_total(hand2) != 21)\nand (((card_value_table(hand1[ 1]) = 10 and hand1[2] = 1) or\ncard_value_table(hand1[2]) = 10 and han d1[1] = 1))) then return (1.5); end if;\n" }{TEXT -1 57 "check to see if the player should win without a blackjack" }{MPLTEXT 1 0 130 "\nif ((hand_total(hand1) > hand_total(hand2)) or \n (hand_total(hand1) <= 21) and (hand_total(hand2) > 21)) then return 1; end if;\n" }{TEXT -1 20 "now check for a tie\n" }{MPLTEXT 1 0 75 "if(hand_total(hand1) = hand_total(hand2)) then return 0; end if;\n\nend proc:" }}}{PARA 262 "" 0 "" {TEXT -1 0 "" }}}{SECT 0 {PARA 263 "" 0 "" {TEXT -1 93 "blackj ack: plays 1 game of blackjack! returns 0 if dealer wins, 1 if player \+ wins, 2 for a tie" }}{PARA 262 "> " 0 "" {MPLTEXT 1 0 0 "" }}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 159 "blackjack := proc (strategy) \n \+ local my_hand, my_hand2, dealers_hand;\n global \+ shoe, deck, split, double, num_of_blackjacks;\n\n shoe := 1;" }} {PARA 262 "" 0 "" {TEXT -1 10 " " }{MPLTEXT 1 0 90 "deck := [ seq(i mod 13 + 1,i=0..(51 * shoe))];\n split := 0;\n num_of_blac kjacks := 0;\n" }}{PARA 265 "" 0 "" {TEXT 264 48 "Now I will deal the \+ initial hand for the player:" }{TEXT -1 0 "" }}{PARA 262 "" 0 "" {TEXT -1 11 " " }{MPLTEXT 1 0 15 "my_hand2 := [];" }}{PARA 262 "" 0 "" {TEXT -1 11 " " }{MPLTEXT 1 0 14 "my_hand := []; " }}{PARA 262 "" 0 "" {TEXT -1 11 " " }{MPLTEXT 1 0 36 "my_h and := deal_card(my_hand, deck);" }}{PARA 262 "" 0 "" {TEXT -1 11 " \+ " }{MPLTEXT 1 0 36 "my_hand := deal_card(my_hand, deck);" }} {PARA 262 "" 0 "" {TEXT -1 0 "" }}{PARA 262 "" 0 "" {TEXT 260 38 "Now \+ the dealer will receive it's hand:" }{TEXT -1 0 "" }}{PARA 262 "" 0 " " {TEXT -1 10 " " }{MPLTEXT 1 0 19 "dealers_hand := [];" }} {PARA 262 "" 0 "" {TEXT -1 10 " " }{MPLTEXT 1 0 46 "dealers_h and := deal_card(dealers_hand, deck);" }}{PARA 262 "" 0 "" {TEXT -1 0 "" }{MPLTEXT 1 0 113 " dealers_hand := deal_card(dealers_hand, deck );\n\n#printf(\"My hand: \");\n#print(my_hand);\n#print(dealers_hand); \n" }}{PARA 262 "" 0 "" {TEXT 261 1 "\n" }{MPLTEXT 1 0 0 "" }{TEXT 265 23 "Now do player's turn..." }}{PARA 262 "" 0 "" {TEXT -1 10 " \+ " }{MPLTEXT 1 0 379 "if(strategy = 1) then my_hand := players_tu rn_simple(my_hand, dealers_hand); end if;\n if(strategy = 2) then m y_hand := players_turn_basic(my_hand, dealers_hand);\n \n if (split = 1) then \n my_hand2 := my_hand;\n my_hand := play ers_turn_basic(my_hand, dealers_hand);\n my_hand2 := players_ turn_basic(my_hand2, dealers_hand);\n end if;\n end if;" }} {PARA 262 "" 0 "" {TEXT 262 22 "Now do dealers turn..." }}{PARA 262 " " 0 "" {TEXT -1 0 "" }{MPLTEXT 1 0 49 " dealers_hand := dealers_tur n(dealers_hand);\n\n" }{TEXT -1 21 "debugging information" }{MPLTEXT 1 0 132 "\n#printf(\"My hand: \");\n#print(my_hand);\n#if(split = 1) t hen printf(\"Splitting: \"); print(my_hand2); end if;\n#print(dealers_ hand);\n\n\n" }}{PARA 262 "" 0 "" {TEXT 263 33 "Now check who has the \+ better hand" }}{PARA 262 "" 0 "" {TEXT -1 1 "\n" }{MPLTEXT 1 0 147 "if (split = 1) then return (winner(my_hand, dealers_hand) + winner(my_han d2, dealers_hand)); end if;\nreturn(winner(my_hand,dealers_hand) * dou ble);\n" }{TEXT -1 0 "" }}{PARA 262 "" 0 "" {TEXT -1 0 "" }{MPLTEXT 1 0 9 "end proc:" }}}{PARA 263 "" 0 "" {TEXT -1 0 "" }}}}{EXCHG {PARA 268 "" 0 "" {TEXT 259 29 "Blackjack - Start of Analysis" }{TEXT 266 0 "" }}}{EXCHG {PARA 275 "" 0 "" {TEXT -1 0 "" }}{PARA 276 "" 0 "" {TEXT -1 691 "The goal of this program is to determine the effectivene ss of using basic strategy in the card game, Blackjack. Blackjack seem s like a fairly simple game at first, but optimum strategies for the g ame can get very complicated. 'Basic' strategy is the term used to mea n that the player will make the best possible decision assuming the pl ayer does not take into account what cards have already been played. I will not cover card counting strategies here, because these strategie s require special card counting skills (which isn't practical for the \+ average player) and will only slightly increase the players advantage \+ (although sometimes increase it enough so that it is in the players fa vor)." }}{PARA 260 "" 0 "" {TEXT -1 0 "" }}{PARA 276 "" 0 "" {TEXT -1 1979 "Here is a short description of how Blackjack is played. The obje ct of the game is to try get your cards to add up to 21 but without go ing over 21. The card values are as follows: all face card are worth 1 0, an ace is worth 1 or 11 (whatever you choose), and number cards are worth their number. Each player and the dealer receives 1 card face u p and 1 card face down. The dealer always plays last. Starting with th e first player, each player decides whether or not he/she should get a nother card ('hit') or stop receiving a card ('stand'). A player can k eep hitting until he/she stands at which point the player's turn is ov er. Each player is only competing against the dealer, so it doesn't ma tter what the other players have. In fact, in my simulation I assume t here is 1 dealer and 1 player. The dealer's strategy is known, and is \+ usually something similar to 'stand on soft 17'. Which means the deale r will hit when the total of his/her entire hand is anything lower tha n 17. If the dealer's strategy is 'stand on hard 17' that means if the dealer's hand total is 17 but with an ace valued as 11 (such as havin g a 6 and an ace) then the dealer will continue to hit, otherwise it i s the same as before and the dealer will hit on anything less than 17. There are additional rules which help the player. The player can deci de to double his/her bet before he/she hits, at which point the player will only get 1 more card (no more hitting is allowed). Also if you a re dealt a pair (both cards the same but different suits) then you can split the hands into 2 hands and double your bet (1 bet for each hand ). For example if you are dealt a pair of eights, you always want to s plit this into 2 hands each hand starts with 1 card (the eight) and yo u play each hand seperatly. Most casinos do not allow you to double af ter you split. For simplification of my program I don't allow splittin g after the player has already split. This is a rare occurence and sho uldn't affect my results." }}}{PARA 259 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 276 "" 0 "" {TEXT -1 702 "In order to determine the effec tiveness of basic strategy used in the game of Blackjack I decided to \+ do this I run many simulations of playing Blackjack with basic strateg y and with a simple strategy. In fact, I've decided to run each strate gy a total of 10,000 times in blocks of 100. I needed to run the simul ation many times to get fairly accurate results, but I couldn't run to o many times or my program would take too long to calculate the result s. I have executed my Maple worksheet many times and I seem to get pre tty similar results which means 10,000 times in blocks of 100 seems to work out. This maple worksheet takes about 50 seconds to execute on m y Athlon XP 1700+ with 256 MBs of memory." }}}{EXCHG {PARA 271 "" 0 " " {TEXT -1 1 "." }}{PARA 262 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 262 "" 0 "" {TEXT -1 67 "Strategy 1, always hit (get another card) if \+ you have less than 17:" }}{PARA 262 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "win_percentage_list1 := [seq(i, i = 1..100)]:" }}}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 34 "wins := 0: \+ ties := 0: losses := 0:" }}}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 14 "strategy := 1:" }}}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 293 "fo r j to 100 do\n for i to 100 do\n result := blackjack(strategy):\n \+ if (result>=1) then wins := wins + result; end if;\n if (result=0) then ties := ties + 1; end if;\n if (result<=-1) then losses := los ses - result; end if;\n end do:\nwin_percentage_list1[j] := wins/(win s+losses):\nend do:" }}}{EXCHG {PARA 262 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 262 "" 0 "" {TEXT -1 117 "Strate gy 2, basic strategy. Determines the best action to take depending on \+ your cards and the dealers upturned card." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "win_percentage_list2 := [seq(i, i = 1..100)]:" }}} {EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 33 "wins:= 0: ties := 0: losse s := 0:" }}}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 14 "strategy := 2: " }}}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 291 "for j to 100 do\n f or i to 100 do\n result := blackjack(strategy):\n if (result>=1) t hen wins := wins + result; end if;\n if (result=0) then ties := ties + 1; end if;\n if (result<=-1) then losses := losses - result; end \+ if;\nend do:\nwin_percentage_list2[j] := wins/(wins+losses):\nend do: " }}}{EXCHG {PARA 262 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }} {PARA 7 "" 1 "" {TEXT -1 50 "Warning, the name changecoords has been r edefined\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "L := listplot (win_percentage_list1, color=red):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "L2 := listplot(win_percentage_list2, color=blue):" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "display(\{L, L2\});" } {TEXT -1 1 "\n" }}{PARA 13 "" 1 "" {GLPLOT2D 400 300 300 {PLOTDATA 2 " 6$-%'CURVESG6$7`q7$$\"\"\"\"\"!$\"+OPEOP!#57$$\"\"#F*$\"+3&HiU%F-7$$\" \"$F*$\"+'\\O]j%F-7$$\"\"%F*$\"+KY!\\g%F-7$$\"\"&F*$\"+h4#)GYF-7$$\"\" 'F*$\"+M0(>^%F-7$$\"\"(F*$\"+XXXXXF-7$$\"\")F*$\"+@n>3XF-7$$\"\"*F*$\" +3W\"yS%F-7$$\"#5F*$\"+D)HpR%F-7$$\"#6F*$\"+YWbXWF-7$$\"#7F*$\"+W?czVF -7$$\"#8F*$\"+7l@*Q%F-7$$\"#9F*$\"+jAVCWF-7$$\"#:F*$\"+<)\\dU%F-7$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\\?\"=z%F-7$Fbfl$\"+!o1*z%F-7$Fjhl$\"+-?64[F-7$F_il$\"+vH =6[F-7$Fdil$\"+D!f^\"[F-7$Fiil$\"+6?)R\"[F-7$F^jl$\"+[d?2[F-7$Fcjl$\"+ @k6)z%F--Fhjl6&FjjlF^[mF^[mF[[m" 1 2 0 1 10 0 2 9 1 4 2 1.000000 45.000000 45.000000 0 0 "Curve 1" "Curve 2" }}}}{EXCHG {PARA 257 "" 0 "" {TEXT -1 83 "The blue line represents Basic strategy and the red li ne represents Simple strategy" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 350 "You can see that the majority of \+ the time using basic strategy give a better wins/(wins + losses) avera ge. The fact that the graph levels off is a good sign, it shows that t he winning percentage is fairly accurate. Next I will calculate after \+ every 100 game block whether or not we come out better by using basic \+ strategy rather than simple strategy:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 10 "total:= 0:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 111 "for i to 100 do\nif(win_percentage_list2[i] > win_percentage_list 1[i]) then total := total + 1; end if;\nend do; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 40 " printf(\"%f%%\", evalf(total/100) * 100);" } }{PARA 6 "" 1 "" {TEXT -1 11 "100.000000%" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 333 "This is a high percentage, but it still doesn't tell us \+ how much less we would be losing money over a certain amount of time. \+ If I take the average of each of the 100 blocks of games played and co mputer the total basic average - the total simple average, I should ge t a positive value that represents the overall gain in win average." } }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "total_avg1 := evalf(win_pe rcentage_list1[100]):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "to tal_avg2 := evalf(win_percentage_list2[100]):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "avg_diff := total_avg2 - total_avg1:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "printf(\"%f%%\", evalf(avg_diff) * \+ 100);" }}{PARA 6 "" 1 "" {TEXT -1 9 "1.778842%" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 76 "This means t hat if I played blackjack 100 times that I would win on average:" } {MPLTEXT 1 0 23 " round(avg_diff * 100);" }}{PARA 2 "" 1 "" {TEXT -1 63 " 2" } }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "more times by applying basic str ategy over simple strategy." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 150 "If you were to play blackjack for 2 hours and bet $5 every 2 minutes, for a total of $300, then if you \+ used simple strategy on average you'd be down: " }{MPLTEXT 1 0 20 "(.5 -total_avg1)*300;" }}{PARA 2 "" 1 "" {TEXT -1 67 " \+ 11.3930348" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 9 "dollars. " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 52 "but if you were to use basic strategy you'd be down:" }{MPLTEXT 1 0 21 " \+ (.5-total_avg2)*300;" }}{PARA 2 "" 1 "" {TEXT -1 67 " \+ 6.0565074" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 290 "Since my program works by being a simulation, my results vary every time I run it. Basic strategy consistantly comes o ut ahead of simple strategy. After running my program many times the m ajority of time basic strategy comes out with losing only about half a s much money as simple strategy." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 275 "" 0 "" {TEXT -1 0 "" }}{PARA 275 "" 0 "" {TEXT 267 808 "Conclusion: While learning basic strategy a nd applying it helps you win more often, keep in mind that you are los ing either way. Like all casino games, Blackjack should be played for \+ fun not for money. It is possible to get the odds in your favor by lea rning card counting techniques in Blackjack, but professional gamblers who use these techniques are quickly identified by casinos and forced out of the casino. Part of the fun of playing Blackjack has to do wit h the somewhat complex strategy; people enjoy learning how to get bett er at something. For example, after learning the best strategy for tic -tac-toe, the game no longer becomes enjoyable to play because you alw ays now the best move. While a game like chess has such complex strate gy people can continuosly enjoy learning how to get better at it." }}} }{MARK "3" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }