Ejemplo n.º 1
0
 void Start()
 {
     colorRay[0]   = new Color(255, 0, 0);
     colorRay[1]   = new Color(0, 255, 0);
     colorRay[2]   = new Color(0, 0, 255);
     speed         = minSpeed;
     neironNetWork = new NeironNetWork();
     SetLigth();
     //SetRandomColor();
 }
Ejemplo n.º 2
0
 public DrawNeiron(NeironNetWork neironNetWork, float maxDistanceRay)
 {
     this.neironNetWork = neironNetWork;
     amountLayer        = neironNetWork.AmountNeironInLayer.Length;
     stepX = width / amountLayer;
     this.maxDistanceRay = maxDistanceRay;
     outValuePosition    = new Vector2[neironNetWork.AmountNeironInLayer[neironNetWork.AmountNeironInLayer.Length - 1]];
     CalculationPositionNeiron();
     InicializatioMassColorNeiron();
     SetMassColorNeironWeigth();
 }
Ejemplo n.º 3
0
 public void NewGeneration(NeironNetWork massNeironNew)
 {
     neironNetWork = massNeironNew;
     distance      = 0;
     numberLap     = 0;
     crash         = false;
     gameObject.GetComponent <BoxCollider>().enabled = true;
     drawNeiron?.SetNeironNetWork(neironNetWork);
     drawNeiron?.SetMassColorNeironWeigth();
     //coefSpeedGame = 1;
 }
Ejemplo n.º 4
0
    public object Clone()
    {
        NeironNetWork netWork = new NeironNetWork();

        for (int i = 0; i < massNeiron.Length; i++)
        {
            for (int j = 0; j < massNeiron[i].Length; j++)
            {
                netWork.massNeiron[i][j].weight = massNeiron[i][j].weight;
            }
        }
        return(netWork);
    }
Ejemplo n.º 5
0
    int IComparable.CompareTo(object o)
    {
        NeironNetWork temp = (NeironNetWork)o;

        if (this.AbsError > temp.AbsError)
        {
            return(1);
        }
        if (this.AbsError < temp.AbsError)
        {
            return(-1);
        }
        else
        {
            return(0);
        }
    }
Ejemplo n.º 6
0
 public void SetNeironNetWork(NeironNetWork neironNetWork)
 {
     this.neironNetWork = neironNetWork;
 }