Exemple #1
0
        public void RunNetwork(int numberOfSteps)
        {
            for (int i = 0; i < numberOfSteps; i++, Time++)
            {
                if (Time % LearningInterval == 0)
                {
                    //Console.WriteLine(Time);

                    for (int lay = 0; lay < layers.Count; lay++)
                    {
                        layers[lay].Learn();
                    }

                    for (int lay = 0; lay < layers.Count; lay++)
                    {
                        layers[lay].ClearSpikeTimes();
                    }
                }
                for (int lay = 0; lay < layers.Count; lay++)
                {
                    layers[lay].Update();
                }

                Dopamine.Update();

                foreach (IMonitor m in monitors)
                {
                    m.Update();
                }
            }
        }
Exemple #2
0
 public void SetDopamineModule(float decayFactor, IDopamineInjector dopamineInjector)
 {
     Dopamine.SetParameters(decayFactor, dopamineInjector);
 }