}
public void trainNet(){
double traininput [] = new double [9];
double trainoutput [] = new double[1];
TrainingSet trainingSet = new TrainingSet();
input = new File("C:/Users/Ishuah K/NeuralTicTacToe/src/neuraltictactoe/trainingset/tictactoedata.tttd");
try {
r = new Scanner(input);
System.out.println("File ok.(1)complete");
} catch (FileNotFoundException ex) {
JOptionPane.showMessageDialog(null, "Error reading file:"+ex);
}
while(r.hasNext()){
System.out.println("one");
int ind = 1;
int index = 0;
for( ind = 1; ind<10; ind++){
traininput [index] = r.nextInt();
System.out.print(traininput[index]+" ");
index++;
}
trainoutput [0] = r.nextDouble();
System.out.println(trainoutput[0]);
trainingSet.addElement(new SupervisedTrainingElement(traininput, trainoutput));
}
if(point >= prevpoint){
myNeuralNetwork.learnInSameThread(trainingSet);
}else{