public MySmartCarTester() throws Exception
    {
        super(inputCount, outputCount, new IMyNeuronFunction<Double>()
        {
            @Override
            public Double process(List<Double> inData, List<Double> weights, Double threshold) throws Exception
            {
                if(inData.size()!=weights.size())
                {
                    throw new Exception("inData size doesnt match weights size");
                }
                if(threshold==null)
                {
                    throw new Exception("threshold cannot be null");
                }
                double total=0;
                for(int i =0; i<inData.size(); i++)
                {
                    //System.out.println("n+"+mapIntegerToSpecialDouble(inData.get(i))+" w:"+mapIntegerToSpecialDouble(weights.get(i)));
                    total+=inData.get(i)*weights.get(i);
                }
                Double answer =1 / (1 + Math.exp((-total) / threshold));
                //System.out.println("a:"+answer);
                return answer;
            }            
        });
        init(new IMyFitnessTestFunction<Double>()
        {
            @Override
            public int testFitness(List<Double> list) 
            {
                
                try {
                    
                    
                    resetWeightsAndThresholds(list);
                    List<Double> in = Arrays.asList(new Double[]{(double)targetPoint.getX(),(double)targetPoint.getY(),(double)carStart.getX(),(double)carStart.getY()});
                    //in.forEach(i->{System.out.println(""+i.floatValue());});
                    double sumDataIn = in.stream().mapToDouble(d->d).sum();                    
                    List<Double> output = getNetworkOutput(in);
                    double sumDataOut=output.stream().mapToDouble(d->d).sum();
                    System.out.println("in:"+sumDataIn+" out"+sumDataOut);
                    
                    MyPoint distance=targetPoint.subtract(carStart);
                    MyPoint guessLineShort = new MyPoint(output.get(0).floatValue(), output.get(1).floatValue());
                    MyPoint guessLine = guessLineShort.scale((float)(distance.getX()/guessLineShort.getX()));
                    line=new MyCollidableLine(new MyDrawablePoint(carStart.getX(), carStart.getY()), new MyDrawablePoint(guessLine.getX(), guessLine.getY()));
                    line.setColor(Color.black);
                    //list.forEach(l->{System.out.println(""+l);});
                    //System.out.println("------");
                    List<MyPoint> c = line.isColliding(targetRect);
                    //c.forEach(l->{System.out.println("cp:"+l.toString());});
                    if(c!=null&&!c.isEmpty())
                    {
                        return 100;
                    }
                    else
                    {
                        return 0;
                    }
                } catch (Exception ex) {
                    Logger.getLogger(MySmartCarTester.class.getName()).log(Level.SEVERE, null, ex);
                }
                    return 0;
            }           
            
        },rf);
    }