home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / ai / 4316 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  3.4 KB

  1. Xref: sparky comp.ai:4316 rec.games.programmer:4718
  2. Newsgroups: comp.ai,comp.ai.genetic,rec.games.programmer
  3. Path: sparky!uunet!cis.ohio-state.edu!sample.eng.ohio-state.edu!purdue!ames!kronos.arc.nasa.gov!iscnvx!netcomsv!versyss.versyss.com!keithd
  4. From: keithd@versyss.com (Keith Doyle)
  5. Subject: Re: Games and genetic algorithms
  6. Reply-To: keithd@versyss.UUCP (Keith Doyle)
  7. Organization: VERSYSS Incorporated, Torrance, California
  8. Date: Mon, 16 Nov 1992 17:52:15 GMT
  9. Message-ID: <1992Nov16.175215.29411@versyss.com>
  10. Keywords: genetic algorithms 
  11. References: <1992Nov11.001553.12600@samba.oit.unc.edu> <1992Nov11.131739.19137@athena.mit.edu>
  12. Lines: 51
  13.  
  14. In article <1992Nov11.131739.19137@athena.mit.edu> acgoldis@athena.mit.edu (Andrew C Goldish) writes:
  15. >I have written several computer games using the Borland Pascal compiler and
  16. >would like to teach the computer to learn from its own mistakes when it plays
  17. >against a human opponent (a la War Games).  I am going to try to insert a
  18. >genetic algorithm into the board evaluation subroutine so that the game
  19. >strategies whose parameters produce the most successful games survive to
  20.  
  21. One problem you may have with this approach, is that it could take a fairly
  22. long time for it to learn, and in the meantime it could be pretty boring
  23. for the human opponent.
  24.  
  25. One problem is, if you mutate an "offspring" of the parent evaluation
  26. DNA, it may play worse than it's parent.  Normally, you would compare
  27. the success of the two "organisms" until you determine which one should
  28. be preserved and which one should die out, giving way to new organisms.
  29. This could mean it might play several lousy games before it decides a
  30. particular organism should be edited out.  Not a lot of fun I expect.
  31.  
  32. However, you may have more success if you create an entire population
  33. of organisms, all of which "vote" with regards to a given move, and
  34. you cast the computer's move based on the majority.  Once the outcome
  35. is decided (and you could even have intermediate goals which can be
  36. used during the game as well), you can "weigh" each of the organisms
  37. performances.  In time, even an organism who consistently votes
  38. wrong (or votes wrong most of the time) will have a weight adjusted
  39. to take this into account, which in effect will turn his vote around
  40. (the program can ultimately consider his vote as a "don't make this
  41. move").  This approach is probably better than a single organism
  42. because the population will evolve a little more slowly and once it
  43. is trained to a reasonable level will tend not to all of a sudden
  44. play a really goofy game due to a single mutation that sends it off
  45. the map.
  46.  
  47. Another problem may be that if the game is being played by a variety
  48. of human opponents, the program may adapt to one persons playing
  49. style, and then begin to forget some of that training if subsequently
  50. played by another opponent for awhile, as it begins to adapt to the
  51. new opponent.  There may be steps you can take to avoid this, but
  52. I'm not sure what they are.  One approach would be to keep a record
  53. of past game moves, and recheck the organism's voting records to see
  54. that they're still basically on track.  Problem is, as soon as the
  55. population changes enough to vary a strategy in an old game, you
  56. can't play out the rest of the game (the remainder of the opponents 
  57. moves no longer apply) to determine if it is a beneficial or
  58. detrimental modification.
  59.  
  60. At any rate, good luck.  I expect you'll learn some interesting
  61. things re: genetic algorithms in the process.
  62.  
  63. Keith
  64.  
  65.