How AI is speeding the mining of valuable metals needed to power the clean economy