-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConstants.cs
1087 lines (861 loc) · 33 KB
/
Constants.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
namespace SLN
{
/// <summary>
/// Global constants
/// </summary>
public class Constants
{
public const int LOGGING_RATE = 100; //salvo su file ogni 100 passi
public const int DEBUG = 1;
#region Network geometry
/// <summary>
/// Number of rows in the first layer
/// </summary>
public const int FIRST_LAYER_DIMENSION_I = 4;
/// <summary>
/// Number of columns in the first layer
/// </summary>
public const int FIRST_LAYER_DIMENSION_J = 4;
/// <summary>
/// Number of rows in the second layer
/// </summary>
public const int SECOND_LAYER_DIMENSION_I = 9;
/// <summary>
/// Number of columns in the second layer
/// </summary>
public const int SECOND_LAYER_DIMENSION_J = 9;
/// <summary>
/// Number of rows in the third layer
/// </summary>
public const int THIRD_LAYER_DIMENSION_I = 12;
/// <summary>
/// Number of columns in the third layer
/// </summary>
public const int THIRD_LAYER_DIMENSION_J = 12;
/// <summary>
/// Number of rows in the Liquid state
/// </summary>
public const int LIQUID_DIMENSION_I = 8;
/// <summary>
/// Number of columns in the Liquid
/// </summary>
public const int LIQUID_DIMENSION_J = 8;
/// <summary>
/// Radius of the neighborhood for each neuron in the second layer
/// </summary>
public const int NEIGHBORHOOD_SIZE = 1;
/// <summary>
/// Probability of creation of a first-to-second-layer
/// between two neurons
/// </summary>
public const double FIRST_TO_SECOND_P = 0.25;
/// <summary>
/// Probability of creation of a second-to-third layer
/// between two neurons
/// </summary>
public const double SECOND_TO_THIRD_P = 0.25;
/// <summary>
/// Number of the neurons in the winner cluster (including the central one)
/// </summary>
public const int WINNER_CLUSTER_SIZE = 5;
/// <summary>
/// Number of ring in the context layer
/// </summary>
public const int RINGS = 5;
public const int CLASSES = 4;
/// <summary>
/// Number of ring in the context layer
/// </summary>
public const int MOTOR = 2;
#endregion
#region Simulation parameters
/// <summary>
/// Steps of simulation (phase A)
/// </summary>
public const int SIMULATION_STEPS_A = 1000; //1000
/// <summary>
/// Steps of simulation (phase B)
/// </summary>
public const int SIMULATION_STEPS_B = 500; //500;
/// <summary>
/// Steps of simulation (phase DETOUR)
/// </summary>
public const int SIMULATION_STEPS_DETOUR = 1000; //1000;
/// <summary>
/// Steps of simulation (phase FEEDFORWARD)
/// </summary>
public const int SIMULATION_STEPS_FEEDFORWARD = 200; //1000;
/// <summary>
/// Steps of an epoch (Liquid State)
/// </summary>
public const int SIMULATION_STEPS_LIQUID = 1000;//1000;
/// <summary>
/// Value of each step of integration in ms
/// </summary>
public const double INTEGRATION_STEP = 0.08; //0.08;
/// <summary>
/// Value of each step of integration in ms for the liquid state
/// </summary>
public const double INTEGRATION_STEP_LIQUID = 0.08; //1.5;
/// <summary>
/// Default value of the current in input for the neuron in the Liquid State
/// </summary>
public const double DEFAULT_CURRENT_LIQUID = 35.0;
/// <summary>
/// Value of each step of integration in ms for the Morris-Lecar neuron
/// </summary>
public const double INTEGRATION_STEP_MORRIS_LECAR = 1;
/// <summary>
/// The offset (in steps of simulation) when the simulation starts.
/// </summary>
public const int SIMULATION_STEP_OFFSET = 13;
/// <summary>
/// Number of consecutive simulations started by the Main
/// </summary>
public const int SIMULATION_NUMBER = 21; //////////
/// <summary>
/// Number of consecutive simulations started used for learning
/// </summary>
public const int LEARNING_NUMBER = 32;
/// <summary>
/// Number of consecutive simulations started used for testing
/// </summary>
public const int TESTING_NUMBER = 4;
/// <summary>
/// Set to <i>true</i>, enables output to console
/// </summary>
public const bool ENABLE_OUTPUT = false;
#endregion
#region Neuron parameters
/// <summary>
/// Initial value of neurons' membrane potential
/// </summary>
public const double INITIAL_STATE_V = -70.0;
/// <summary>
/// Initial value of neurons' recovery variable
/// </summary>
public const double INITIAL_STATE_U = -14.0;
/// <summary>
/// Initial value of neurons' membrane potential for the Liquid State
/// </summary>
public const double INITIAL_STATE_V_LIQUID = -60.0;
/// <summary>
/// Initial value of neurons' recovery variable for the Liquid State
/// </summary>
public const double INITIAL_STATE_U_LIQUID = 6.0;
/// <summary>
/// Parameter <b>A</b> in Izhikevich's spiking neuron model
/// </summary>
public const double A_IZH_SPK = 0.02;
/// <summary>
/// Parameter <b>B</b> in Izhikevich's spiking neuron model
/// </summary>
public const double B_IZH_SPK = 0.2;
/// <summary>
/// Parameter <b>C</b> in Izhikevich's spiking neuron model
/// </summary>
public const double C_IZH_SPK = -65.0;
/// <summary>
/// Parameter <b>D</b> in Izhikevich's spiking neuron model
/// </summary>
public const double D_IZH_SPK = 1.5;
/// <summary>
/// Parameter <b>A</b> in Izhikevich's "alternative" neuron model
/// </summary>
public const double A_IZH_ALT = 0.0;
/// <summary>
/// Parameter <b>B</b> in Izhikevich's "alternative" neuron model
/// </summary>
public const double B_IZH_ALT = -0.1;
/// <summary>
/// Parameter <b>C</b> in Izhikevich's "alternative" neuron model
/// </summary>
public const double C_IZH_ALT = -55.0;
/// <summary>
/// Parameter <b>D</b> in Izhikevich's "alternative" neuron model
/// </summary>
public const double D_IZH_ALT = 0.0;
/// <summary>
/// Parameter <b>A</b> in Izhikevich's Inhibition-Induced Spiking neuron model
/// </summary>
public const double A_IZH_INH = -0.02;
/// <summary>
/// Parameter <b>B</b> in Izhikevich's Inhibition-Induced Spiking neuron model
/// </summary>
public const double B_IZH_INH = -1;
/// <summary>
/// Parameter <b>C</b> in Izhikevich's Inhibition-Induced Spiking neuron model
/// </summary>
public const double C_IZH_INH = -60;
/// <summary>
/// Parameter <b>D</b> in Izhikevich's Inhibition-Induced Spiking neuron model
/// </summary>
public const double D_IZH_INH = 8;
/// <summary>
/// Parameter <b>A</b> in Izhikevich's Class1 Spiking neuron model
/// </summary>
public const double A_IZH_CLASS1 = 0.02;
/// <summary>
/// Parameter <b>B</b> in Izhikevich's Class1 Spiking neuron model
/// </summary>
public const double B_IZH_CLASS1 = -0.1;
/// <summary>
/// Parameter <b>C</b> in Izhikevich's Class1 Spiking neuron model
/// </summary>
public const double C_IZH_CLASS1 = -55;
/// <summary>
/// Parameter <b>D</b> in Izhikevich's Class1 Spiking neuron model
/// </summary>
public const double D_IZH_CLASS1 = 6;
#region Morris-Lecar neuron
/// <summary>
/// Parameter <b>Vk</b> in Morris-Lecar neuron model
/// </summary>
public const double VK_VALUE = -84;
/// <summary>
/// Parameter <b>Vl</b> in Morris-Lecar neuron model
/// </summary>
public const double Vl_VALUE = -60;
/// <summary>
/// Parameter <b>Vca</b> in Morris-Lecar neuron model
/// </summary>
public const double VCA_VALUE = 120;
/// <summary>
/// Parameter <b>gca</b> in Morris-Lecar neuron model
/// </summary>
public const double GCA_VALUE = 4.4;
/// <summary>
/// Parameter <b>gk</b> in Morris-Lecar neuron model
/// </summary>
public const double GK_VALUE = 8;
/// <summary>
/// Parameter <b>gl</b> in Morris-Lecar neuron model
/// </summary>
public const double GL_VALUE = 2;
/// <summary>
/// Parameter <b>V1</b> in Morris-Lecar neuron model
/// </summary>
public const double V1_VALUE = -1.2;
/// <summary>
/// Parameter <b>V2</b> in Morris-Lecar neuron model
/// </summary>
public const double V2_VALUE = 18;
/// <summary>
/// Parameter <b>V3</b> in Morris-Lecar neuron model
/// </summary>
public const double V3_VALUE = 2;
/// <summary>
/// Parameter <b>V4</b> in Morris-Lecar neuron model
/// </summary>
public const double V4_VALUE = 30;
/// <summary>
/// Parameter <b>V_INITIAL_VALUE</b> in Morris-Lecar neuron model
/// </summary>
public const double V_INITIAL_VALUE = -60;
/// <summary>
/// Parameter <b>W_INITIAL_VALUE</b> in Morris-Lecar neuron model
/// </summary>
public const double W_INITIAL_VALUE = 0.01;
/// <summary>
/// Parameter <b>I</b> in Morris-Lecar neuron model
/// </summary>
public const double I_8Hz = 61.35;
/// <summary>
/// Parameter <b>kf</b> in Morris-Lecar neuron model
/// </summary>
public const double kf_8Hz = 0.082;
#endregion
#endregion
#region Synaptic parameters
#region First-to-second synapses
/// <summary>
/// Synaptic weight of the first-to-second-layer synapses
/// </summary>
public const double FIRST_TO_SECOND_W = 30; //30.0;
/// <summary>
/// Value in steps of simulation of first-to-second-layer synaptic delay
/// </summary>
public const int FIRST_TO_SECOND_DELAY_STEP = 0;
/// <summary>
/// Time constant of a first-to-second-layer synapse
/// </summary>
public const double FIRST_TO_SECOND_TAU = 1.0;
/// <summary>
/// Gain in the calculation of the current for first-to-second-layer synapses
/// </summary>
public const double FIRST_TO_SECOND_SYNAPTIC_GAIN = 1.0;
#endregion
#region Second-to-second synapses
/// <summary>
/// Excitatory synaptic weight of the second-to-second-layer synapses
/// </summary>
public const double EXCITATORY_W = 10.0;
/// <summary>
/// Inhibitory synaptic weight of the second-to-second-layer synapses
/// </summary>
public const double INHIBITORY_W = -10.0;
/// <summary>
/// Weight for local synapses <i>after</i> the local excitatory window
/// </summary>
public static readonly double LOCAL_INHIBITORY_W =
EXCITATORY_W / (System.Math.Pow((2 * NEIGHBORHOOD_SIZE + 1), 2) - 1);
/// <summary>
/// Window size (in simulation steps) in which to mantain the local excitation
/// </summary>
public const int LOCAL_EXCITATORY_WINDOW = 750;
/// <summary>
/// Value in seconds of inhibitory synaptic delay
/// </summary>
public const double INH_DELAY_TIME = 1.0;
/// <summary>
/// Value in steps of simulation of inhibitory synaptic delay
/// </summary>
public const int INH_DELAY_STEP = 0;
/// <summary>
/// Value in steps of simulation of excitatory synaptic delay
/// </summary>
public const int EXC_DELAY_STEP = 0;
/// <summary>
/// Time constant of a second-to-second-layer "<i>near</i>" synapse
/// </summary>
public const double NEAR_TAU = 1.0;
/// <summary>
/// Time constant of a second-to-second-layer "<i>far</i>" synapse
/// </summary>
public const double FAR_TAU = 1.0;
/// <summary>
/// Gain in the calculation of the current for second-to-second-layer synapses
/// </summary>
public const double SECOND_TO_SECOND_SYNAPTIC_GAIN = 0.5;
#endregion
#region First-to-first synapses
/// <summary>
/// Excitatory synaptic weight for first-to-first-layer synapses
/// </summary>
public const double FIRST_TO_FIRST_W_EXC = 0; //7;
/// <summary>
/// MAX synaptic weight for first-to-first-layer STDP synapses
/// </summary>
public const double FIRST_TO_FIRST_STDP_W_HI = 6.9;
/// <summary>
/// MIN synaptic weight for first-to-first-layer STDP synapses
/// </summary>
public const double FIRST_TO_FIRST_STDP_W_LO = 0.05;
/// <summary>
/// Inhibitory synaptic weight for first-to-first-layer synapses
/// </summary>
public const double FIRST_TO_FIRST_W_INH = -30;
/// <summary>
/// Time constant of a first-to-first-layer
/// </summary>
public const double FIRST_TO_FIRST_TAU = 1;
/// <summary>
/// Value in steps of simulation of first-to-first-layer synaptic delay
/// </summary>
public const int FIRST_TO_FIRST_DELAY_STEP = 0;
/// <summary>
/// Gain in the calculation of the current for first-to-first-layer synapses
/// </summary>
public const double FIRST_TO_FIRST_SYNAPTIC_GAIN = 1.0;
/// <summary>
/// Gain in the calculation of the current for first-to-first-layer synapses
/// </summary>
public const double FIRST_TO_FIRST_SYNAPTIC_GAIN_STDP = 0;// 1.5 3*0; //4.0; //2
#endregion
#region Second-to-first synapses
/// <summary>
///Sinaptic weight from second layer to first layer
/// </summary>
public const double SECOND_TO_FIRST_W = 0;
/// <summary>
///Time constant of a second-to-first-layer
/// </summary>
public const double SECOND_TO_FIRST_TAU = 1;
/// <summary>
/// Value in steps of simulation of second-to-first-layer synaptic delay
/// </summary>
public const int SECOND_TO_FIRST_DELAY_STEP = 0;
/// <summary>
/// Gain in the calculation of the current for second-to-first-layer synapses
/// </summary>
public const double SECOND_TO_FIRST_SYNAPTIC_GAIN = 2.0;
/// <summary>
/// Gain in the calculation of the current for second2-to-second1-layer synapses
/// </summary>
public const double SECOND2_TO_SECOND1_SYNAPTIC_GAIN = 1.0;
#endregion
#region Feedback synapses
/// <summary>
/// Weight of the feedback synapses between the two SOSL
/// </summary>
public const double FEEDBACK_W = 5.0;
/// <summary>
/// Time constant of feedback synapses
/// </summary>
public const double FEEDBACK_TAU = 1.0;
/// <summary>
/// Value in steps of simulation of feedback synaptic delay
/// </summary>
public const int FEEDBACK_DELAY_STEP = 0;
/// <summary>
/// Gain in the calculation of the current for feedback synapses
/// </summary>
public const double FEEDBACK_SYNAPTIC_GAIN = 1.0;
#endregion
#region Reward-to-premotor
/// <summary>
/// Synaptic weight between the reward neuron and the premotor one
/// </summary>
public const double REWARD_TO_PREMOTOR_W = 40.0;
/// <summary>
/// Time constant of the synapse between the reward neuron and the premotor one
/// </summary>
public const double REWARD_TO_PREMOTOR_TAU = 1.0;
/// <summary>
/// Value in steps of simulation of reward-to-premotor synaptic delay
/// </summary>
public const int REWARD_TO_PREMOTOR_DELAY_STEP = 0;
/// <summary>
/// Gain in the calculation of the current for reward-to-premotor synapse
/// </summary>
public const double REWARD_TO_PREMOTOR_GAIN = 1.0;
#endregion
#region Sameness-to-premotor
/// <summary>
/// Time constant of the synapse between the sameness neuron and the premotor one
/// </summary>
public const double SAMENESS_TO_PREMOTOR_TAU = 1.0;
/// <summary>
/// Value in steps of simulation of sameness-to-premotor synaptic delay
/// </summary>
public const int SAMENESS_TO_PREMOTOR_DELAY_STEP = 0;
/// <summary>
/// Gain in the calculation of the current for sameness-to-premotor synapse
/// </summary>
public const double SAMENESS_TO_PREMOTOR_GAIN = 1.0;
#endregion
#region Sameness-to-First
/// <summary>
/// Synaptic weight of the sameness to first synapses
/// </summary>
public const double SAMENESS_TO_FIRST_W = 0.1;
#endregion
#region Morris-Lecar to Sameneness
/// <summary>
/// Synaptic weight of the first-to-second-layer synapses
/// </summary>
public const double MORRIS_TO_SAMENESS_W = 0.1;
/// <summary>
/// Value in steps of simulation of first-to-second-layer synaptic delay
/// </summary>
public const int MORRIS_TO_SAMENESS_DELAY_STEP = 0;
/// <summary>
/// Time constant of a first-to-second-layer synapse
/// </summary>
public const double MORRIS_TO_SAMENESS_TAU = 50;
/// <summary>
///decay of a liquid-to-sameness synapse
/// </summary>
public const double MORRIS_TO_SAMENESS_DECAY = 600;
/// <summary>
/// Time constant of a first-to-second-layer synapse
/// </summary>
public const double MORRIS_TO_SAMENESS_TAU1 = 5;
// <summary>
/// Time constant of a first-to-second-layer synapse
/// </summary>
public const double MORRIS_TO_SAMENESS_GAIN = 0;
/// <summary>
/// Gain in the calculation of the current for first-to-second-layer synapses
/// </summary>
public const double MORRIS_TO_SAMENESS_SYNAPTIC_GAIN = 1.0;
#endregion
#region STDP synapses
/// <summary>
/// Initial weight of STDP synapses
/// </summary>
public const double STDP_INIT_W = 0.05;
/// <summary>
/// Initial weight of STDP synapses
/// </summary>
public const double STDP_CONTEXT_END_INIT_W = 0.0;
/// <summary>
/// Positive time constant for STDP synapses
/// </summary>
public const double STDP_TAU_P = 20; //0.2;
/// <summary>
/// Negative time constant for STDP synapses
/// </summary>
public const double STDP_TAU_N = 20; //0.2;
/// <summary>
/// "Memory" time constant for STDP synapses
/// </summary>
public const double STDP_TAU_OLD = 3.0;
/// <summary>
/// Positive gain for STDP synapses
/// </summary>
public const double STDP_A_P = 0.005;//0.000075; //0.1 * 0.25;
/// <summary>
/// Negative gain for STDP synapses
/// </summary>
public const double STDP_A_N = 0.00505;//0.00007575; //0.1 * 0.25;
/// <summary>
/// "Memory" gain for STDP synapses
/// </summary>
public const double STDP_A_N_OLD = 7.5e-3 * 0.025;
/// <summary>
/// Lower weight limit for STDP synapses
/// </summary>
public const double STDP_W_LO = 0.05;
/// <summary>
/// Upper weight limit for STDP synapses
/// </summary>
public const double STDP_W_HI = 8.0;
/// <summary>
/// Multiplier of STDP weight for decay (e.g. 0.9 = 10% decay)
/// </summary>
public const double STDP_DECAY = 1;//0.9;
/// <summary>
/// Multiplier of STDP Expectation weight for decay (e.g. 0.7 = 30% decay)
/// </summary>
public const double STDP_DECAY_EXPECTATION = 0.7;
/// <summary>
/// Value in steps of simulation of STDP synaptic delay
/// </summary>
public const int STDP_DELAY_STEP = 0;
/// <summary>
/// Gain in the calculation of the current for STDP synapse
/// </summary>
public const double STDP_GAIN = 10;
/// <summary>
/// Gain in the calculation of the current for STDP synapse
/// in the feedback connection between the Second to First Layer
/// </summary>
public const double STDP_EXPECTATION_GAIN = 1.0; //0.8; // se = 20 la frequenza premotore=6250
/// <summary>
/// Time constant
/// </summary>
public const double STDP_TAU = 1.0;
/// <summary>
/// Time constant for expectation's STDP synapse
/// </summary>
public const double STDP_TAU_EXPECTATION = 1.0;
/// <summary>
/// Common multiplication factor of the gains
/// for sameness-to-premotor synapse
/// </summary>
public const double STDP_SAMENESS_MULT_FACTOR = 4;
/// <summary>
/// Common multiplication factor of the gains
/// for SOSL-to-premotor synapse
/// </summary>
public const double STDP_SOSL_MULT_FACTOR = 1;
/// <summary>
/// Multiplication factor of current gain for
/// sameness-to-premotor synapse
/// </summary>
public const double STDP_SAMENESS_GAIN = 3;
/// <summary>
/// Multiplication factor of current gain for
/// SOSL-to-premotor synapses
/// </summary>
public const double STDP_SOSL_GAIN = 0.5;
#endregion
#region First-to-Inhibitory
/// <summary>
/// Synaptic weight of the first-to-Inhibitory neuron synapses
/// </summary>
public const double FIRST_TO_INHIBITORY_W = 30.0;
#endregion
#region Second-to-Third synapses
/// <summary>
/// Synaptic weight of the second-to-third-layer synapses
/// </summary>
public const double SECOND_TO_THIRD_W = 10.0; //30
/// <summary>
/// Value in steps of simulation of second-to-third-layer synaptic delay
/// </summary>
public const int SECOND_TO_THIRD_DELAY_STEP = 0;
/// <summary>
/// Time constant of a second-to-third-layer synapse
/// </summary>
public const double SECOND_TO_THIRD_TAU = 1.0;
/// <summary>
/// Gain in the calculation of the current for second-to-third-layer synapses
/// </summary>
public const double SECOND_TO_THIRD_SYNAPTIC_GAIN = 1.0;
#endregion
#region Third-to-third synapses
/// <summary>
/// Excitatory synaptic weight for third-to-third-layer synapses
/// </summary>
public const double THIRD_TO_THIRD_W_EXC = (7/2); //7/2;
/// <summary>
/// Inhibitory synaptic weight for third-to-third-layer synapses
/// </summary>
public const double THIRD_TO_THIRD_W_INH = -(7/2); //-7
/// <summary>
/// Excitatory synaptic weight for third-to-third-layer synapses outer the excitatory window
/// </summary>
public const double THIRD_TO_THIRD_WSEC = -20; //7;
/// <summary>
/// Time constant of a third-to-third-layer
/// </summary>
public const double THIRD_TO_THIRD_TAU = 1;
/// <summary>
/// Time constant of a third-to-third-layer
/// </summary>
public const double THIRD_TO_THIRD_TAU_INH = 2;
/// <summary>
/// Value in steps of simulation of third-to-third-layer synaptic delay
/// </summary>
public const int THIRD_TO_THIRD_DELAY_STEP = 0;
/// <summary>
/// Gain in the calculation of the current for third-to-third-layer synapses
/// </summary>
public const double THIRD_TO_THIRD_SYNAPTIC_GAIN = 10.0; //2
public const double THIRD_TO_THIRD_SYNAPTIC_GAIN_END = 20.0;
/// <summary>
/// Gain in the calculation of the current for third-to-third-layer synapses
/// </summary>
public const double THIRD_TO_THIRD_SYNAPTIC_GAIN_STDP = 1; //2.0;
/// <summary>
/// Gain in the calculation of the current for third-to-third-layer synapses
/// </summary>
public const double THIRD_TO_END_SYNAPTIC_GAIN_STDP = 2; //2;
#endregion
#region Third-to-Second
/// <summary>
/// Excitatory synaptic weight for third-to-second-layer synapses
/// </summary>
public const double THIRD_TO_SECOND_W = 10;
#endregion
#region Liquid-to-Output
/// <summary>
/// Synaptic weight of the Liquid-layer to output neurons synapses
/// </summary>
public const double LIQUID_TO_OUT_W = 1.0; //30
/// <summary>
/// Value in steps of simulation of Liquid-layer to output neurons synaptic delay
/// </summary>
public const int LIQUID_TO_OUT_DELAY_STEP = 0;
/// <summary>
/// Time constant of a Liquid-layer to output neurons synapse
/// </summary>
public const double LIQUID_TO_OUT_THIRD_TAU = 1.0;
/// <summary>
/// Gain in the calculation of the current for Liquid-layer to output neurons synapses
/// </summary>
public const double LIQUID_TO_OUT_SYNAPTIC_GAIN = 1.0;
/// <summary>
/// Parameter for the updating of the weight for Liquid-layer to output neurons synapses
/// </summary>
public const double LIQUID_TO_OUT_NI = 0.0001;//0.0001; //-->a epoche //0.00001;//--->per 5Hz
/// <summary>
/// Threshold for the updating of the weight for Liquid-layer to output neurons synapses
/// </summary>
public const double LIQUID_TO_OUT_EPS = 0.0000000005;
/// <summary>
/// Selected target for Liquid-layer to output neurons synapses
/// </summary>
public const int LIQUID_TO_OUT_TARGET = 8;//0;
/// <summary>
/// Selected option for the updating rules of the Liquid-layer to output neurons synapses
/// case 0: // campioni classico
/// case 1: // campioni EPOCHE
/// case 2: // campioni segno d'errore
/// case 3 : // pseudo inversa
/// case 4: // segno d'errore EPOCHE
/// </summary>
public const int LIQUID_TO_OUT_OPTION = 0;
/// <summary>
/// Selected error threshold for Liquid-layer to output neurons synapses
/// </summary>
public const double LIQUID_TO_OUT_THRESHOLD = 0.0006;
/// <summary>
/// Set the constant for the calculation of the pseudoinverse from file
/// </summary>
public const bool LIQUID_TO_OUT_PSEUDOINV_FILE = false;
#endregion
#region Liquid-to-Liquid
/// <summary>
/// Synaptic weight of the Liquid-to-liquid layer synapses
/// </summary>
public const double LIQUID_TO_LIQUID_W = 1.0; //30
/// <summary>
/// Value in steps of simulation of Liquid-to-liquid layer synaptic delay
/// </summary>
public const int LIQUID_TO_LIQUID_DELAY_STEP = 0;
/// <summary>
/// Time constant of a Liquid-to-liquid layer synapse
/// </summary>
public const double LIQUID_TO_LIQUID_TAU = 1.0;
/// <summary>
/// Gain in the calculation of the current for Liquid-to-liquid layer synapses
/// </summary>
public const double LIQUID_TO_LIQUID_SYNAPTIC_GAIN = 1.0;
/// <summary>
/// Probability for the internal synapses in the Liquid layer
/// </summary>
public const double LIQUID_E_I = 0.25; //0.1
/// <summary>
/// Connection for the internal synapses in the Liquid layer
/// </summary>
public const int LIQUID_CONNECTION = 2;
/// <summary>
/// Weight for the connection of the internal synapses in the Liquid layer
/// </summary>
public const double LIQUID_WEIGHT = 0.25;
/// <summary>
/// Input Ratio for the input to the the Liquid layer
/// </summary>
public const double LIQUID_INPUT_RATIO = 0.50; //0.15
/// <summary>
/// Input weight for the the Liquid layer
/// </summary>
public const double LIQUID_INPUT_WEIGHT = 1;
/// <summary>
/// Output Neuron for the the Liquid layer
/// </summary>
public const int LIQUID_OUTPUT = 1;
/// <summary>
/// Target for the learning in the the Liquid layer
/// </summary>
public const int LIQUID_TARGET = 0;
/// <summary>
/// Number of Spikes of the morris lecar for having the winner object
/// </summary>
public const int MORRIS_WINNER_SPIKE = 3;
#endregion
#region Context-to-Morris
/// <summary>
/// Gain in the calculation of the current for context-to-morris synapses
/// </summary>
public const double CONTEXT_TO_MORRIS_GAIN_STDP = 2.0;
/// <summary>
/// Gain in the calculation of the current for context-to-morris synapses
/// </summary>
public const double CONTEXT_TO_MORRIS_GAIN = 10.0;
#endregion
#region Motor-to-Motor
/// <summary>
/// Gain in the calculation of the current for context-to-morris synapses
/// </summary>
public const double MOTOR_TO_MOTOR_W_INH = -7/3;
/// <summary>
/// Gain in the calculation of the current for context-to-morris synapses
/// </summary>
public const double MOTOR_TO_MOTOR_TAU_INH = 2;
public const int MOTOR_TO_MOTOR_DELAY_STEP = 0;
public const double MOTOR_TO_MOTOR_SYNAPTIC_GAIN = 10.0;
#endregion
#region Morris-to-Motor
public const double MORRIS_TO_MOTOR_SYNAPTIC_GAIN_STDP = 2; //2;
public const double MORRIS_TO_MOTOR_SYNAPTIC_GAIN = 14.0;
public const double MORRIS_MOTOR_INIT_W_STDP= 0.0;
public const double MORRIS_MOTOR_MAX_W_STDP = 8.0;
public const double MORRIS_TO_MOTOR_TAU = 15;
#endregion
#region Morris-to-Contex
/// <summary>
/// Gain in the calculation of the current for morris-to-contex synapses
/// </summary>
public const double MORRIS_TO_CONTEX_W_EXC = (7/2);
/// <summary>
/// Time constant of a third-to-third-layer
/// </summary>
public const double MORRIS_TO_CONTEX_TAU = 15;
#endregion
#region Context-to_End
/// <summary>
/// Threshold of the end sequence neuron
/// </summary>
public const double THRESHOLD_END_SEQUENCE = 12.5;
#endregion
#region Context-to-Motor
public const double CONTEXT_TO_MOTOR_SYNAPTIC_GAIN_STDP = 2; //2;
public const double CONTEXT_TO_MOTOR_SYNAPTIC_GAIN = 4.0;
public const double STDP_CONTEXT_MOTOR_INIT_W = 0.0;
/// <summary>
/// Threshold of the end sequence neuron
/// </summary>
//public const double THRESHOLD_END_SEQUENCE = 12.5;
#endregion
/// <summary>
/// Level of noise in the sinaptic weight
/// </summary>
public static double NOISE_LVL = 0;
#endregion
#region Input currents
/// <summary>
/// Value of the input current of the first layer neurons
/// </summary>
public const double INPUT_CURRENT = 40.0;