Simulated annealing is used to solve the X-ray phase problem formulated as
a minimization problem. The cost function consists of two parts, one repres
ents the discrepancy between measured and calculated intensities while the
other monitors the probability distribution of the triplets. From a random
real-space structure at the start, the atoms are moved one by one to gradua
lly reduce the cost function until the best structure emerges. Trial calcul
ations for structures including hexadecaisoleucinomycin (HEXIL) are present
ed. Comparison of this method with other related methods is made.