Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Net = new Chislo[3, 5];
            Chislo a;

            for (int i = 0; i < 5; i++)
            {
                x = 30;
                for (int j = 0; j < 3; j++)
                {
                    Cell        = new Intel.S();
                    Cell.Row    = j;
                    Cell.Column = i;
                    a           = new Chislo();
                    a.Size      = new Size(30, 30);
                    a.Location  = new Point(x, y);
                    x          += 31;
                    a.BackColor = Color.White;
                    Net[j, i]   = a;
                    Controls.Add(Net[j, i]);
                }
                y += 31;
            }
            Intel.CreationOfBrain(Net.GetLength(0), Net.GetLength(1));
        }
Ejemplo n.º 2
0
 private void button4_Click(object sender, EventArgs e)
 {
     for (int l = 0; l < 10; l++)
     {
         for (int f = 0; f < 10000; f++)
         {
             for (int j = 0; j < 15; j++)
             {
                 if (numbers[f % 10][j] == '1')
                 {
                     Intel.Feeling[j].Signal = true;
                     Intel.Feeling[j].k      = 1;
                 }
                 else
                 {
                     Intel.Feeling[j].Signal = false;
                     Intel.Feeling[j].k      = 0;
                 }
             }
             Intel.Reality(f % 10);
             for (int i = 0; i < Intel.Brain1.Count; i++)
             {
                 Intel.Brain1[i].FindSignal();
                 Intel.Brain1[i].Count();
             }
             for (int i = 0; i < Intel.Brain2.Count; i++)
             {
                 Intel.Brain2[i].Cascade(1);
             }
             Intel.Summat.Cascade(2);
             Intel.Summat.CheckForF();
             Intel.Summat.BackPropagation();
         }
     }
     for (int i = 0; i < Intel.Brain1.Count; i++)
     {
         Intel.Brain1[i].DrawNumb(1);
     }
     for (int i = 0; i < Intel.Brain1.Count; i++)
     {
         Intel.Brain1[i].DrawNumb(2);
     }
     Intel.Summat.DrawNumb(2);
     Intel.Booking = 0;
 }
Ejemplo n.º 3
0
        private void button3_Click(object sender, EventArgs e)
        {
            Intel.StartProc(Net);
            Intel.Reality(textBox1.Text);

            /* double max = 0;
             * int res = -1;
             * for (int i = 0; i < Intel.Feeling.Count; i++)
             *    Intel.Feeling[i].Signalisation(Net);
             * Intel.Reality(textBox1.Text);
             * for (int i = 0; i < 10; i++)
             *
             *     if (Intel.Brain1[i].HearFeelThink() > max)
             *     {
             *         max = Intel.Brain1[i].HearFeelThink();
             *         res = i;
             *     }*/
            label1.Text = Convert.ToString(Intel.Summat.CheckForF());
            Intel.Summat.BackPropagation();
        }