home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / ai / genetic / 36 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  3.7 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!asuvax!asuacad!azaxv
  2. Organization: Arizona State University
  3. Date: Monday, 11 Jan 1993 18:37:06 MST
  4. From: <AZAXV@ASUACAD.BITNET>
  5. Message-ID: <93011.183706AZAXV@ASUACAD.BITNET>
  6. Newsgroups: comp.ai.genetic
  7. Subject: Black Jack - a first pass
  8. Lines: 69
  9.  
  10. Hi,
  11.  
  12. I've been thinking about the black jack problem and I'd like to
  13. offer a starting point, if not a solution...
  14.  
  15. OBJECTIVE: to develop a population of very good (to be defined in
  16. terms of %wins) black jack players, genetically, through some
  17. evolutionary process, using what I understand to be a genetic
  18. algorithm.
  19.  
  20. At the start, some number of players will be given a genetic code
  21. (see below) and paired with an honest dealer, with an honest deck,
  22. that gets reshuffled after each hand. Each player is associated
  23. with a running %win value; when a player wins 5 (or?) hands in a
  24. row, it gets to mate with another player with the highest %win
  25. value that is still alive. (Mating is described below.) E.g., as
  26. your simulator cycles through each living player, making a single
  27. decision/play each time one is selected, it gets to mate with the
  28. first other player that has the highest %win value. When a player
  29. loses 5 (or?) hands in a row, it dies. Mating results in a newly
  30. created player with a %win=0 and a combination of the genetic codes
  31. from the two mating players. (Still with me?)
  32.  
  33. The genetic code is exactly two integers, between zero and 11. The
  34. first integer is the highest value that the player may hold, and
  35. still take another card from the dealer (zero is a special case,
  36. described below). UNLESS, the dealer is SHOWING an amount that is
  37. greater than the second integer in the genetic code array. A zero
  38. in either of the two integer values means that the value is really
  39. calculated each time a decision is needed, as the average value of
  40. the UNSEEN cards; i.e., the number/values (ace=1|11?) of cards that
  41. the player cannot know about: dealer's down cards and those in the
  42. deck. Note that the player makes a decision to request another card
  43. based on the value of the first integer in its genetic code, but a
  44. decision to draw might be blocked by the value (or calculated value,
  45. remember) of the second integer. I leave the dealer's algorithm up
  46. to the reader; perhaps this may be a variable that one might wish
  47. to examine and optimize in order to produce (evolve) better players.
  48.  
  49. Mating produces a genetic code that is an arithmetic average of the
  50. values from each of the mating players; when one (or both) player
  51. is a "calculator" (a zero value causes it to dynamically evaluate
  52. the value from the card values it can "see"), the offspring (as a
  53. first pass anyway) might take on that trait. (I fear that the en-
  54. tire population might become calculators very quickly if this is a
  55. rule, but I have not yet tried to code this.)
  56.  
  57. Finally, I remember something about "splits/doubles", "dealer wins"
  58. in a tie, and other such rules that I will leave to those who better
  59. understand the game.
  60.  
  61. Your original population might be normally distributed about reasonable
  62. values for first and second integer codes, reserving say 2% for some
  63. initial calculators.
  64.  
  65. An example player might be created with an array containing /17,8/ with
  66. an initial %wins=0.0. The first number in its genetic code (17) says it
  67. will decide to draw another card if it holds (down + shown card values)
  68. at most 17 points, but it will NOT draw in that case if the dealer has
  69. cards totaling 9 or better showing (tens and face cards are 10 points,
  70. and aces are 1 or 11; I'm not sure yet how to handle ace values).
  71.  
  72. I am suited up, but I hope I'll get at least partial credit for taking
  73. a crack at this. I plan to try this in C, probably under DOS.
  74.  
  75.                    ./alex
  76.  
  77. azaxv@asuvm.inre.asu.edu
  78. CS graduate student
  79.