I have create an AI that learns to navigate a course from orange to green. Read below for an outline of how it works The first blob picks randomly between moving to the right, up and down. This is repeated until it hits a wall. Once it has finished, the second blob repeat the choices of the first blob, but instead of just following it to the end, they start to each pick a random course 15 moves before the previous blob hit the wall. This is repeated, following the movements of the blob which survived longest and then going randomly, until one surpasses that distance, and then following the movements of that blob and going randomly, and so on. Once a blob reaches green, it then retraces its movements so you can see the path it took
Now fully working - it should (in theory) work every time as long as there are no dead ends on the course All coding by me To use this, run in normal to watch it work normally, but run in turbo mode to speed it up so you can see it actually finish. Read the instructions section if you want to know how it works