public void ProcessNextStimulus(Stimulus stimulus)
 {
     LogSDRoutput();
     foreach (var region in Regions)
     {
         foreach (var neuron in region.Neurons)
         {
             neuron.SetFiringStatus();
         }
         LogRegionOutput(region);
     }
 }
Exemplo n.º 2
0
        public static void ProcessStimulus(Stimulus stimulus)
        {
            var output = new bool[Bandwidth];

            foreach (var sensoryInput in stimulus.SensoryInputs)
            {
                var dimension = Dimensions.Single(dim => dim.Name == stimulus.Label);
                var i         = Dimensions.IndexOf(dimension);
                for (int j = 0, maxLength = dimension.GetSDROutput(sensoryInput.Intensity).Length; j < maxLength; j++)
                {
                    output[i + j] = dimension.GetSDROutput(sensoryInput.Intensity)[j];
                }
            }
            foreach (var bit in output)
            {
                foreach (var neuron in Neurons)
                {
                    neuron.SetFiringStatus(bit);
                }
            }
        }