The HP model reduces all 20 amino acids with a binary question: is the amino acid hydrophobic or not?
The free energy of a conformation is as low as the number of noncovalent contacts (a HH contact) between two amino acids that are adjacent in space but not in sequence. Although this is a greatly simplification of the mechanics of protein folding, it is helpful in understanding the basics principles of the mechanism and it still constitutes a NP-hard problem both in 2D and 3D. The genetic algorithm will search for the conformation with the lowest free energy.