Need Help for Genetic Algorithm

I believe you are using the wrong term here, GENERIC algorithms determine possible outcomes from specific situations by fuzzy logic and starcastic matrix algebra.

Asimov wrote about positronic brains which would be the ultimate Generic algorithm. What do you actually want to do?

If its a learn about environment you can study AI techniques on learning algorithms but again the maths is horrible and the Arduino would be vastly underpowered. An alternative is to look at the simply tile map used in many computer games since year zero
of platform games. The ideas can be transposed into learning quite simply rather than as in the game the path is pre defined the player just has to locate it.

Unfortunately the fly in the ointment is the need to use recursive algorithms otherwise the code becomes unmanageable, infact most AI has to be based on recusion (the calling by a function of itself.) read up on the towers of hanoi or factorial solutions.

Why recursion if robot is in a maze then it needs to check as a minimum 4 directions of travel but if one direction offers possible route to an adjacent square then it has to check 4 directions in that square If you code without recursion you need to store possible routes tried and backtrack-by direction reversal based on info stored using recursion as the recursive calls unstack the info needed becomes instantly available.

I built a robot 4 wheel drive car with a mega using the tile and recursive solution, I also plotted the map to sd card to avoid learning from scratch each time. The mega managed the maths but was slow to learn some of this was my doing as I wanted to folow the algorithm so I wifi linked to a IMac but most time was taken by the volume of computations

Suggest you avoid learning and mapping have fun see what the arduino is capable of with simple avoidance detection and you own avoidance algorithm a standard technique for avoidance isto always turn in same direction when theres noway forward.

Its a victorian solution to a maze, you keep one hand on hedge at all times so you are forced to turn one way.

      1. happy coding..