The algorithm tried to optimize 2 things: 1, stay as close to the center as possible (ie stay away from the black edges). 2, live the longest.