home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / talk / origins / 14603 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  3.7 KB

  1. Path: sparky!uunet!ulowell!m2c!jjmhome!smds!rh
  2. From: rh@smds.com (Richard Harter)
  3. Newsgroups: talk.origins
  4. Subject: Lionel's chess program
  5. Keywords: Computer program, random, mutation, chess
  6. Message-ID: <1992Nov21.020700.3414@smds.com>
  7. Date: 21 Nov 92 02:07:00 GMT
  8. References: <1992Nov18.133247.8546@city.cs> <1992Nov19.215001.3750@cc.uow.edu.au> <1992Nov20.140744.7237@city.cs>
  9. Reply-To: rh@ishmael.UUCP (Richard Harter)
  10. Organization: Software Maintenance & Development Systems, Inc.
  11. Lines: 72
  12.  
  13. In article <1992Nov20.140744.7237@city.cs> lionel@cs.city.ac.uk (Lionel Tun) writes:
  14.  
  15. ... Lets say there is a computer program which `knows' the
  16. ... legal moves of chess - lets call it ChessMover.
  17. ... ChessMover plays very poor chess because its moves are
  18. ... made at random. But it does play very fast. ChessMover
  19. ... is small, compact and extremely efficient. But it plays
  20. ... bad chess because it has not been designed with any
  21. ... chess playing algorithms at all.
  22.  
  23. ... Would it be possible to subject ChessMover to random
  24. ... mutations, so that eventually you evolve ChessPlayer,
  25. ... a chess program which plays very well, say at master
  26. ... level?
  27.  
  28. This is an interesting question; the answer is not immediately
  29. obvious because it really does depend on how "chessmover" is
  30. written and what constitutes a random mutation.  Thus, if we have
  31. a straight forward machine language program and our mutations
  32. consist of random insertions and deletions of bits then, regardless
  33. of numbers of programs, the probability of ever producing a strong
  34. chess playing program is miniscule, even on evolutionary time
  35. scales.  I suspect this is the "trap" that Lionel has in mind.
  36.  
  37. However the genetic program for life doesn't work the same way
  38. as a conventional Von Neumann machine.  Here is how one might
  39. go about such a program.  The board position at any point and the
  40. possible moves are available as data -- they correspond to the
  41. external environment of a cell.  Chess mover has several built-in
  42. pieces.  These are:
  43.  
  44. (a)    A "program" which is simply a string of bits.  This is fixed
  45.     for a given instance of the program, but is alterable during
  46.     reproduction (by mutation) or genetic exchange (prokaryotic
  47.     sex).
  48.  
  49. (b)    A pattern matcher which matches a pattern against the data,
  50.     i.e. against the board position and against the legal moves.
  51.     This is analogous to enzymes.  Each pattern has a value
  52.     associated with it which is released if the pattern matches
  53.     the data.
  54.  
  55. (c)    A transcriber which, given a position on the "program" bit
  56.     string, produces a pattern, following a fixed mechanical
  57.     rule (the genetic code).
  58.  
  59. (d)    A responder which, given a value, associates with it a bit
  60.     position on the string.
  61.  
  62. (e)    A move selector.  If a pattern matches a move that move is
  63.     selected.  If, after a time out period passes without a move
  64.     being selected, a random legal move is selected.
  65.  
  66. The sequence of events is as follows:  Several million instances of
  67. the program play each other.  All programs that lose are eliminated.
  68. Programs that draw [we will need to count reaching a maximun number
  69. of moves as a draw] may have sex, i.e. drawing instances exchange 
  70. sections of their programs at random.  Half of these instances die.
  71. The surviving instances reproduce, i.e. new copies are produced.
  72. The "programs" of the new instances may mutate, i.e. the bit strings
  73. of their "programs" can either alter at a specific bit or a substring
  74. may be replicated or deleted.
  75.  
  76. ---
  77.  
  78. In answer to Lionel's question -- a chess program written along these
  79. lines can be expected to reach Master level.
  80. -- 
  81. Richard Harter: SMDS Inc.  Net address: rh@smds.com Phone: 508-369-7398 
  82. US Mail: SMDS Inc., PO Box 555, Concord MA 01742.    Fax: 508-369-8272
  83. In the fields of Hell where the grass grows high
  84. Are the graves of dreams allowed to die.
  85.