You would need to work out the rules for the moth to move between lights.

Typically the rule set wouldn;t have random values in it so you'd need to make clearer rules.

Possibly never allow the moth to look behind itself so that it will not just fly between two lights all the time.

1. Moth flies to nearest light
2. When moth reaches light - choose the closest light other than the one it just came from. - Go to 1.

This would in fact be quite interesting to watch and see the clear pattern that emerges as lights and moths are added.

Any objection to me coding this for you?