Superficial (two-dimensional) crack patterns appear when a thin layer of material elastically attached to a substrate contracts. We study numerically the maturation process undergone by these crack patterns when they are allowed to adapt in order to reduce its energy. The process models the evolution in depth of cracks in geological formations and in starch samples ("columnar jointing"), and also the time evolution (over thousands of years) of crack patterns in frozen soils. We observe an evolution towards a polygonal pattern that consists of a fixed distribution of polygons with mainly five, six, and seven sides. They compare very well with known experimental examples. The evolution of one of these "mature" patterns upon reduction of the degree of contraction is also considered. We find that the pattern adapts by closing some of the cracks and rearranging those in the immediate neighborhood. This produces a change of the mean size of the polygons, but remarkably no changes of the statistical properties of the pattern. Comparison with the same behavior recently observed in starch samples is presented.