I'm training a neural network to solve a maze.

My process is the following:

  1. Randomly generate a small maze
  2. Spawn hundreds of cars at the start, that will go through the same one maze
  3. Assign the same base neural network to each car, this would be the best from previous generation
  4. Do the mutations: for each neural network of those cars, slightly and randomly modify all the weights
  5. Run the simulation and wait 60 seconds
  6. Run the algorithm to determine the best generation
  7. Repeat

Right now, to determine the best generation, I'm using the car that has the shortest path to the end.

But my neural network isn't learning, that is, no car ever reaches the end for all randomly generated maze.

I believe that I would need to include some measurement of the dead-end and/or backtracking, but don't know exactly what to do.

What would be the best / correct criteria for determining the best generation?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.