This is the demonstration of a genetic algorithm used to shape the lines so that its tip is closer to the target.
The application was made in Xcode using openframeworks with a modified version of the ofxDna add-on.
In case any detail is wanted go to "
First test with genetic algorithms" or just ask in the comments.