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(); }
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(); }
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; }
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); }
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); } }
public void SetNeironNetWork(NeironNetWork neironNetWork) { this.neironNetWork = neironNetWork; }