The paper constructs the cost function of the optical thin film,designs the multilayer antireflection coatings in the infrared and far infrared region.By simulated annealing algorithm,the paper compares the results of the simulated annealing algorithm with that of the genetic algorithm.