We propose a new method for selecting importance factors (for regions of interest like organs at risk) used to plan conformal radiotherapy. Importance factors, also known as weighting factors or penalty factors, are essential in determining the relative importance of multiple objectives or the penalty ratios of constraints incorporated into cost functions, especially in dealing with dose optimization in radiotherapy treatment planning. Researchers usually choose importance factors on the basis of a trial-and-error process to reach a balance between all the objectives. In this study, we used a genetic algorithm and adopted a real-number encoding method to represent both beam weights and importance factors in each chromosome. The algorithm starts by optimizing the beam weights for a fixed number of iterations then modifying the importance factors for another fixed number of iterations. During the first phase, the genetic operators, such as crossover and mutation, are carried out only on beam weights, and importance factors for each chromosome are not changed or 'frozen'. In the second phase, the situation is reversed: the beam weights are 'frozen' and the importance factors are changed after crossover and mutation. Through alternation of these two phases, both beam weights and importance factors are adjusted according to a fitness function that describes the conformity of dose distribution in planning target volume and dose-tolerance constraints in organs at risk. Those chromosomes with better fitness are passed into the next generation, showing that they have a better combination of beam weights and importance factors. Although the ranges of the importance factors should be set in advance by using this algorithm, it is much more convenient than selecting specific numbers for importance factors. Three clinical examples are presented and compared with manual plans to verify this method. Three-dimensional standard displays and dose-volume histograms are shown to demonstrate that this method is feasible, automatic and convenient.