Pretty self explanatory. The "flies" check a random fly and if it is closer to the mouse, go towards it. If it is farther from the mouse than it, don't move. It is suggested to spawn in about 100. 10/5/1 is my favorite settings Acceleration also seems to inadvertently affect the spread radius of the flies.
I saw a similar project probably several months ago. Inspiration gathered from them.