This paper develops a genetic algorithm to optimize the reliability of series-parallel systems by determining optimal component configurations. The genetic algorithm encodes potential solutions, generates an initial population, selects parents for breeding via crossover and mutation, and repeats until convergence criteria are met. The algorithm is demonstrated on two numerical examples, showing it consistently finds optimal or near-optimal solutions, outperforming previous methods. The genetic algorithm approach can handle complex multi-component system optimization problems without guaranteeing optimality but achieving good results.