Dynamical vacuum selection in string theory