This is a VEX algorithm I borrowed from JAVIER TOLEDO. The algorithm takes a current point, finds the available neighbours, picks one of those randomly, changes its position to that new current point and sets them to visited. Once it reaches a dead end, it travels back the visited points until it finds a new available point to move on to until there is no more points left.