Open Kim-Vallee opened 6 years ago
You refer an array for input & output in the trainingset. Works in theory, but I recommend to write out the 9 inputs and 9 outputs instead and build the trainingset by looping as many times as required to fill the trainingset with your data.
Example with 27 input and 1 output
trainingSet[i] = {
input: [
parseFloat(arrayx[x][0]),
parseFloat(arrayx[x][1]),
parseFloat(arrayx[x][2]),
parseFloat(arrayx[x][3]),
parseFloat(arrayx[x][4]),
parseFloat(arrayx[x][5]),
parseFloat(arrayx[x][6]),
parseFloat(arrayx[x][7]),
parseFloat(arrayx[x][8]),
parseFloat(arrayx[x][9]),
parseFloat(arrayx[x][10]),
parseFloat(arrayx[x][11]),
parseFloat(arrayx[x][12]),
parseFloat(arrayx[x][13]),
parseFloat(arrayx[x][14]),
parseFloat(arrayx[x][15]),
parseFloat(arrayx[x][16]),
parseFloat(arrayx[x][17]),
parseFloat(arrayx[x][18]),
parseFloat(arrayx[x][19]),
parseFloat(arrayx[x][20]),
parseFloat(arrayx[x][21]),
parseFloat(arrayx[x][22]),
parseFloat(arrayx[x][23]),
parseFloat(arrayx[x][24]),
parseFloat(arrayx[x][25]),
parseFloat(arrayx[x][26])
],
output: [parseFloat(arrayx[x + timejump][0])]
Thanks I am trying that, I also found out that I never trained it to do the right moves but only not to do the wrong ones, which arrived at 0 probability on every output, probably made it bug too
Hello, I am doing an AI for the tic tac toe game (player vs machine) So in basic everything works, its an AI with 9 inputs and 9 outputs that are all numbers between 0 and 1 but at some point the AI.activate(numbers...) only returns me an array of NaN whatever I input Any Idea ? (see below my piece of code and ask for anything unclear)
Etilawin