Simulate dots walking across a plane over multiple generations, learning to become more accurate after every generation.
Open Driver.m in MATLAB 2015+ and click the Run button
Driver.mstart:(x, y)coordinate where all dots start fromgoal:(x, y)coordinate where all dots should try to get tonum_gens: number of generations to simulate
Move.mpop_size: population sizenum_keep: the best this many individuals to keep each generationmax_step: the largest distance any individual can take in one simulation stepmutation_rate: the percentage of directions which will change on new individuals each generationplane_size: the greatest coordinate (both x and y) that an agent can step to without dying off
- The number of steps each generation is determined by the distance to
goalfromstartinDriver.mand thedist_modifierinMove.m - The
plane_sizeinMove.mdoes not check ifstartandgoalare within the bounds; ensurestartandgoalare within the square defined by the corners(0, 0)and theplane_sizecoordinate - Diagonal
startandgoalcoordinates yield better results than keepingstartandgoalon the samexoryline due to how new directions are chosen
