AI model shows how Amazon dams can be made less environmentally damaging