public void setNetInput() {
            float[] input = new float[Network.inputNs];
            Spinner closest = getClosest(this);
            Spinner closestSame = getClosestOfSameType(this, true);
            Spinner closestDifferent = getClosestOfSameType(this, false);
            Food closestFood = globalProperties.getClosest(this.getPosition());
            float[] distanceVectorSame;
            float[] distanceVectorDifferent;
            float[] distanceVectorFood;
            if (closestSame != null) {
                distanceVectorSame = getDistanceVector(closestSame.getPosition(), this.getPosition());
            } else {
                distanceVectorSame = new float[]{0f, 0f};
            }
            if (closestDifferent != null) {
                distanceVectorDifferent = getDistanceVector(closestDifferent.getPosition(), this.getPosition());
            } else {
                distanceVectorDifferent = new float[]{0f, 0f};
            }
            if (closestFood != null) {
                distanceVectorFood = getDistanceVector(closestFood.getPosition(), this.getPosition());
            } else {
                distanceVectorFood = new float[]{0f, 0f};
            }
            float[] velocity = getVelocity();
            float activationScaleDomain = 0.001f;
            float activationScaleRange = 1f;
            float sameMag = getDistance(distanceVectorSame, new float[] {0f, 0f});
            float differentMag = getDistance(distanceVectorDifferent, new float[] {0f, 0f});
            float velocityMag = getDistance(velocity, new float[] {0f, 0f});
            float foodMag = getDistance(distanceVectorFood, new float[] {0f, 0f});
            input[0] = getScaledAngle(distanceVectorSame);
            input[1] = activation(sameMag,activationScaleRange,activationScaleDomain,0f);
            input[2] = getScaledAngle(distanceVectorDifferent);
            input[3] = activation(differentMag,activationScaleRange,activationScaleDomain,0f);
            input[4] = getScaledAngle(velocity);
            input[5] = activation(velocityMag,activationScaleRange,activationScaleDomain,0f);
            if (closestSame != null) {
                input[6] = activation(closestSame.getEnergy() - this.getEnergy(), activationScaleRange, activationScaleDomain, 0f);
                input[7] = activation(closestSame.getAge(), 1f, 1E-5f, 3f);
                input[8] = closestSame.getAlive() ? 1f : 0f;
            } else {
                input[6] = 0f;
                input[7] = activationScaleRange;
                input[8] = 0f;
            }
            if (closestDifferent != null) {
                input[9] = activation(closestDifferent.getEnergy() - this.getEnergy(),activationScaleRange,0.1f,0f);
                input[10] = activation(closestDifferent.getAge(), 1f, 1E-5f, 3f);
                input[11] = closestDifferent.getAlive() ? 1f : 0f;
            } else {
                input[9] = 0f;
                input[10] = activationScaleRange;
                input[11] = 0f;
            }
            input[12] = activation(this.getAge(), 1f, 1E-5f, 3f);
            input[13] = this.getEnergy();
            input[14] = getScaledAngle(distanceVectorFood);
            input[15] = activation(foodMag,activationScaleRange,activationScaleDomain,0f);
            input[16] = closest != null && closest.getType() == this.getType() ? 1f : 0f;
            net.setInputs(input);
        }