Photonic nanostructures can be used for many applications, not just in solar cells, but also in optical sensors for cancer markers or other biomolecules, for example. Researchers using computer simulations and machine learning have now shown how the design of such nanostructures can be selectively optimized.