A novel design method - a genetic algorithm applied to an erbium-doped fiber amplifier (EDFA) is presented for obtaining maximum gains and bandwidths. With differently objective functions and pumping powers, applying the genetic algorithm optimizes three parameters (fiber length L, pumping wavelength λ p and signal power P s ) of the given single fiber EDFA by solving the rate and power propagation equations. There is evidence that the optimal pumping wavelengths depend on the pumping powers. The usual 1480-nm pump is not an optimal choice for different applications of EDFAs, and the pump should be chosen in the lower wavelength ranges than 1480 nm for obtaining both/either the maximum gains and/or the broader bandwidths in the EDFAs.