To solve some complicated function optimization problems, the SEIRS algorithm is constructed based on the SEIRS epidemic model. The algorithm supposes that some human individuals exist in an ecosystem; each individual is characterized by a number of features; an infectious disease exists in the ecosystem and infects among individuals; and the disease attacks a part of features of an individual. Each infected individual passes through such stages as suspected, exposed, infected and removed, which determine synthetically the physique strength of an individual. The algorithm uses the transferring mechanism of the infectious disease described by the SEIRS epidemic model to construct some operators so as to enable individuals to exchange feature information among them easily. Results show that the E-E, I-I and R-R operator can transfer feature information from some strong individuals to a weak individual so as to make the latter grow better; the S-E, S-R, E-I(ω) and R-S(ω) operator ensure an individual to obtain average feature information from other individuals so as to reduce probability that the individual drops into local optima; the S-S operator can expand an individual’s search scope by increasing its vitality; the E-R and I-R operator have the characteristics of both the S-S operator and the S-E, S-R, E-I(ω) and R-S(ω) operator; The individuals with strong physique can continue to grow, while the individuals with weak physique stop growing, which ensures the algorithm to have global convergence. Some case studies show that the algorithm has characteristics of strong search capability and high convergence speed for the complicated functions optimization problems.