Welcome to this project! Just click the green flag and watch. This uses machine learning, and the dots 'learn' themselves. The dots are trying to reach the centre of the line, and the best possible 'fitness' (how good it is) is 100. The average will never reach and stay at 100 because of mutations. It takes different amounts of time each time.
Note: This is pretty much the simplest genetic algorithm you can make. I have made more complex ones in written programming languages, and may make some of those in Scratch. (comments are inside) How it works: There is a random 'population' of dots. Then it picks the best performing half of the population. The next generation is the best performing half, and a slightly mutated (randomly changed) copy of that. Then it repeats the process, with the new populations.