home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / MISC / BAM.ZIP / BAM.DOC < prev    next >
Encoding:
Text File  |  1990-05-13  |  3.3 KB  |  72 lines

  1.  
  2. Bidirectional Associative Memory simulation program
  3.  
  4.  
  5. Copyright 1988 by Wesley R. Elsberry
  6.  
  7.  
  8. The accompanying program was originally written as an assignment for
  9. Dr. Farhad Kamangar's "Neural Networks" class at the University of
  10. Texas at Arlington.  Part of Kamangar's criteria for simulations 
  11. suitable for class was that all parameters of the architecture should
  12. be determined at run time rather than compile time.  Thus, this
  13. program uses linked lists extensively to avoid problems in the 
  14. allocation of memory under Turbo Pascal Version 3.
  15.  
  16. The program was minimally updated to compile and run under Turbo Pascal
  17. Version 5.5.
  18.  
  19. Bidirectional Associative Memory, or BAM, is an architecture extensively
  20. studied by Bart Kosko (UCSD).  Usually, bipolar vector strings are used
  21. as inputs.  For convenience, I have termed the vectors 'X' and 'Y'.
  22. When X is "associated" with Y, a set of weights between nodes in the 
  23. network is changed to record the association.  Upon presentations of either
  24. the X or the Y vector, the network is generally capable of recalling the
  25. missing vector.  BAM becomes very interesting in when the recall fails.
  26. This happens when substrings of the vectors are identical to other,
  27. previously learned vectors.  A BAM network can stably learn only a fraction
  28. of the potential capacity of the system, when looking at the
  29. representational capability of the weight array.  Another interesting side
  30. effect of the underlying equations is that for each vector pair learned, 
  31. another stable state is introduced into the weights at the same time --
  32. namely, the complementary vector pair representation.
  33.  
  34. The program allows for interactive setup of the BAM network.  First,
  35. the program prompts for bit-string length of each of the X and Y vectors.
  36. A network structure is generated, and a menu is presented for setting
  37. vectors and learning associations.  I have chosen the characters "-" and
  38. "+" to represent elements of the vectors.  Once an X-Y pair of vectors is
  39. entered, the user may "set weights".  In other words, learn an association
  40. between the current X and Y vectors and store that in the weights.  
  41. Alternatively, the user can specify that the program pick up vector pairs
  42. from a text data file.  Thus, if the user had specified vector lengths
  43. for X and Y of 3 and 4, respectively, a sample data file might look like:
  44.  
  45. --- ++++
  46. +++ -+-+
  47. -++ ++--
  48.  
  49. The program would read in the vector strings and set weights automatically,
  50. then.  Picking up data from a file will cause the program to also store
  51. its outputs to file, as well.
  52.  
  53. Once the network setup is done, the user can quit to the recall menu.
  54. Here, values for the X or Y vector can be entered, and recall performed to
  55. retrieve the other vector.  Note that the entered vector can change during
  56. recall, as intermediate associations cause the network to search for a 
  57. stable association.
  58.  
  59. When the user quits the program, the current set of weights is dumped, and
  60. the network is examined to find all stable states.
  61.  
  62. The program is not a polished product, it is a fairly pedestrian exercise
  63. done for learning.  That is, it is likely to contain bugs of varying
  64. severity.  I would appreciate hearing of discoveries of further bugs in
  65. the code, and I hope that the program helps the user despite its 
  66. shortcomings.
  67.  
  68. Wesley R. Elsberry
  69.  
  70.  
  71.  
  72.