home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e065 / 1.ddi / MADALINE.INS < prev    next >
Encoding:
Text File  |  1991-08-28  |  3.5 KB  |  134 lines

  1. inst4.0        !13:03 30-May-88  (Madaline.ins)  Madaline Network Builder
  2. !****************************************************************
  3. !*                                *
  4. !*    Madaline Network Generator                *
  5. !*                                *
  6. !****************************************************************
  7.  
  8. !    *** check that input / output PE count is non-zero
  9.  
  10. ?&In    1
  11. >bge    CheckOut
  12. @Err    "Madaline MUST have at least one input PE"
  13. :CheckOut
  14. ?&Out    1
  15. >bge    OutOK
  16. @Err    "Madaline MUST have at least one output PE"
  17. :OutOK
  18. ?&Hd1    1
  19. >bge    HidOK
  20. @Err    "Madaline MUST have at least one Hidden Layer 1 PE"
  21. :HidOK
  22. ?&Out    &Hd1
  23. >ble    HOisOK
  24. @Err    "Madaline MUST have at least as many Hidden as Output PEs"
  25. :HOisOK
  26.  
  27. !    *** Load the Control Strategy and LRS if needed
  28.  
  29. @LdCS    "adaline"        !control strategy
  30. @LdLR    "adaline"        !L/R schedule
  31.  
  32. =netn    "InstaNet (tm) Madaline Network version 1.00 20-Jun-88"
  33. =DLnF    0            !learn  re-display off
  34. =DRcF    0            !recall re-display off
  35.  
  36. !    *** Build the Input Layer ***
  37.  
  38. @LLdf                !load default layer to mi_layer structure
  39. =LDln    "In"            !layer name
  40. =Lpes    &In            !copy # of input PEs from menu
  41. !=Ltrn    "Signum"        !signum transfer function
  42. =x    100            !place to put layer on screen
  43. =y     80
  44. #Incl    "stdnwgtf.iif"        !standard # weight fields
  45. @LAdd                !add the input layer
  46.  
  47. !    *** Build the Adaline Layer ***
  48.  
  49. @LLdf                !start with default layer again
  50. =LDln    "Adaline"        !adaline layer name
  51. =Lpes    &Hd1            !hidden PEs
  52. =Ltrn    "Signum"        !transfer function
  53. =Lcmp    "Adaline"        !adaline competition
  54. =Llrn    "Adaline"        !adaline learning rule
  55. +y    80            !up higher on display
  56. #Incl    "stdnwgtf.iif"        !standard # weight fields
  57. @LAdd
  58.  
  59. !    *** Connect Adaline Layer to Bias & Input Layers ***
  60.  
  61. =SPEl    1            !current layer
  62. @SlPE                !select it as destination (sb already)
  63. =NPEl    -1            !near to bias term (source)
  64. @NrPE
  65. =cnwt    1.0            !connection weight
  66. =cnty    WVar            !variable
  67. =cnsc    WAbs            !absolute
  68. @LCFl
  69. =NPEl    0            !input layer
  70. @NrPE
  71. @LCFl
  72.  
  73. !    *** Build the output layer & connect it to prior layer ***
  74.  
  75. @LLdf                !load default layer to mi_layer structure
  76. =LDln    "Out"            !layer name
  77. =Lpes    &Out            !copy # of input PEs from menu
  78. =Lsum    "Majority"        !majority function for output layer
  79. =Ltrn    "Signum"        !signum output function
  80. +y    80
  81. #Incl    "stdnwgtf.iif"        !standard # weight fields
  82. @LAdd                !add the output layer
  83. =n7    LayN            !save for stdprobe
  84.  
  85. !    *** Set up for proper output connections ***
  86.  
  87. =SPEl    2            !output layer
  88. =SPEn    0
  89. =NPEl    1            !adaline layer
  90. =NPEn    0
  91. =cnty    WFix            !fixed weight
  92. =cnsc    WAbs            !absolute connection (wt is still 1.0)
  93.  
  94. !    *** Connect the Adaline layer to the Output layer
  95.  
  96. :OutCn
  97. @SlPE                !select next PE in output layer
  98. @NrPE                !select next PE in adaline layer
  99. @PCon                !connect two PEs together
  100. +SPEn    1            !next PE in output layer
  101. ?SPEn    &Out            !past the end?
  102. >blt    OutPEOK
  103. =SPEn    0            !back to start of output layer
  104. :OutPEOK
  105. +NPEn    1            !next PE in the adaline layer
  106. ?NPEn    &Hd1            !done with layer?
  107. >blt    OutCn            !no, keep going
  108.  
  109. !    *** Select Control Strategy & L/R Schedule ***
  110.  
  111. @LLsl                !load super layer
  112. =Lctl    "adaline"        !adaline control strategy
  113. =Llrs    "adaline"        !adaline L/R Schedule
  114. =Llnn    "madaline"        !name of learn input
  115. =Lrcn    "madaline"        !name of recall output
  116. #Incl    "stdioset.iif"        !standard I/O settings
  117. =Lscl    -1            !input  low-value
  118. =Loff     1            !input  high-value
  119. =Llow    -1            !output low-value
  120. =Lhgh     1            !output high-value
  121. @SVsl                !save it back
  122. !
  123. =n5    -1.0
  124. =n6    1.0
  125. =n4    &Out
  126. #Incl    "stdprobe.iif"        !Standard probe include file
  127. !
  128. =jogl    -.1            !lower limit for jog
  129. =jogh    +.1            !upper limit for jog
  130. =seed    257            !starting seed number
  131. @seed                !set the seed
  132. @Nini                !Initialize the network
  133. @EOF
  134.