Astronomers are using artificial intelligence to improve the precision of measuring distances of gamma-ray bursts, the most powerful and luminous explosions in the universe. This has allowed for a better understanding of the physical processes driving these bursts and their role in the cosmos.