Male spiders are attracted by a female like planets orbiting a star

The tiny male golden orb-weaving spider faces a considerable challenge when searching for a mate. He is a fraction of the size of the massive female, but must carefully enter her web and approach her without being noticed, because the cannibalistic female will kill and eat him if he makes one wrong move on her web. Add to this gamble the competition he faces from other males also on the delicate arena of the web, and you have a complex optimization problem that even human analysts would find daunting. Yet these little spiders barely have what we would recognize as a brain. How then do they manage?