AI resource optimization