Scientists are working on a way to predict bluebottle infestations to let swimmers know whether heading to the beach is worth the trip.