home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / ant.ytar / ant / ANT / DEFS / ant.h next >
Text File  |  1995-07-15  |  2KB  |  59 lines

  1. /*************************************************************************
  2.  *   Program: ant.h header of ANT
  3.  *
  4.  *  Version   Date       Author                         Comments & modif.
  5.  *  --------  ---------  ----------------------------   -------------------
  6.  *  V1.00     13-Jun-95  I. Labrador, R. Carrasco, LML  Very first version
  7.  */
  8. #define  True 1
  9. #define  ANT_SQ(x)    ((x)*(x)) 
  10. #define  ANT_STORE 2000
  11. #define  ANT_TIME (((60*5)<<8)|0x80000000)
  12. #define  ANT_STRING 64
  13. #define  ANT_ERASE 12
  14. #define  ANT_EXP_MAX 500.
  15. #define  ANT_TRAIN    0
  16. #define  ANT_IMPROVE    1
  17. #define  ANT_PROCESS    2
  18. #define  ANT_EXIT    3
  19.  
  20. #define  ANT_END     1
  21. #define  ANT_NO_END    0
  22.  
  23. #define  ANT_DIG       1        /* Sigmoid type DIGital  (0,1)*/
  24. #define  ANT_SYM       2        /* Sigmoid type SYMmetrical (-1,1)*/
  25.  
  26. typedef char  ant_string[ANT_STRING];
  27.  
  28. typedef struct _ant_net
  29. {  
  30.     int     l,  /* including output */
  31.             *n, /* neurons per layer*/
  32.             SIG,  /* sigmoid type  */
  33.             seed;     /* seed of random generation */
  34.     ant_string   init,  
  35.                 examp,
  36.                 in,
  37.                 out;
  38.     double  *S,     /* simoid slope per layer */
  39.             pol,     /*  polaritation coef. */
  40.             mu,        /* adjust weights coef. */
  41.             errlim,     /*  error limit in convergence */
  42.             noise;     /*  noise factor  from 0 to 1*/
  43. } ant_net;
  44.  
  45. typedef struct _ant_neuron
  46. {  
  47.     double  *w, /* weights of the connection with neurons of upper layer */
  48.             er,
  49.             out;   /* neuron output */
  50. } ant_neuron;
  51.  
  52. typedef struct _ant_examp
  53. {  
  54.     int     nex;
  55.     double  **in,
  56.             **out;
  57. } ant_examp;
  58.  
  59.