neataptic
neataptic copied to clipboard
Local Optimum
I've been working on an AI to play a Mario style game. There is one spot where the computer has to go backwards before he jumps to get past an obstacle.

The AI always gets stuck here, and won't back up a step to make the jump. Anybody have any thoughts?
The inputs to the network include a 7*6 grid of the spaces around the player + the specific location of the player in the current tile and has 2 outputs - one for direction, and one for jumping.
I initialize the NEAT network like this:
const MUTATION_RATE = 0.4;
const MUTATION_AMOUNT = 2;
const ELITISM = Math.round(0.1 * popsize);
this.neat = new Neat(43, 2, null, {
popsize,
mutation: methods.mutation.ALL,
mutationRate: MUTATION_RATE,
mutationAmount: MUTATION_AMOUNT,
elitism: ELITISM,
network: new architect.Random(43, 26, 2)
});
Do you train the network with all different jump types and jump modes before the network works through the real map ?
My understanding is that using NEAT, you are not supposed to train the network first. I have thought about it, but I'm not sure what that looks like with the NEAT algorithm.
Can I create a network with trained data and pass that in network: trainedNetwork
, instead new architect.Random(43, 26, 2)
?
What Pummelchen said. Train on smaller sets of data first.
"Anybody have any thoughts?" Negative points if Mario stops moving might help it do backtracking.
"Can I create a network with trained data and pass that in" Yes.