Discovering strategies for coastal resilience with AI-based prediction and optimization