Using AI to avert 'environmental catastrophe'