This work devoted to an ellipsoidal head of pressure vessel under internal pressure load. The analysis is aimed at finding an optimum weight of ellipsoidal head of pressure vessel due to maximum working pressure that ensures its full charge with stresses by using imperialist competitive algorithm and genetic algorithm. In head of pressure vessel the region of its joint with the cylindrical shell is loaded with shear force and bending moments. The load causes high bending stresses in the region of the joint. Therefore, imperialist competitive algorithm was used here to find the optimum shape of a head with minimum weight and maximum working pressure which the shear force and the bending moment moved toward zero. Two different size ellipsoidal head examples are selected and studied. The imperialist competitive algorithm results are compared with the genetic algorithm results.