In this article the problem of shape and thickness optimization of uniform-strength thin-walled pressure vessel heads subjected to internal pressure is investigated. The optimal geometry of a closure, which minimizes the design objective containing both depth and capacity or both depth and volume of the material of a closure (two variants), is sought in the class of uniform-strength structures under geometrical constraints. Three types of optimization problem are considered: the optimal shape of the middle surface is sought for a prescribed wall thickness, the optimal wall thickness is sought for a prescribed shape of a closure, and the most general case when looking for both shape functions. The meridian is approximated either by the convex Bézier polynomial or by functions with free parameters. Both two-and one-arc domes are considered. The optimal solutions are obtained using the simulated annealing algorithm.