1. A method, in a data processing system, for optimizing a photolithograph mask, the method comprising: receiving, by the data processing system, a given target pattern; generating, by the data processing system, an initial fictitious mask; selecting, by the data processing system, an initial value of α 2 , wherein the initial value of α 2 is used to determine a light intensity and a wafer image; determining, by the data processing system, the light intensity for each pixel in the initial fictitious mask; determining, by the data processing system, the wafer image for each pixel in the initial fictitious mask; determining, by the data processing system, if a convergence has been achieved by comparing the wafer image generated from the initial fictitious mask to the given target pattern; and responsive to a convergence of the wafer image generated from the initial fictitious mask to the given target pattern, generating, by the data processing system, a final mask to use to transfer an image to a wafer, wherein the final mask is generated using the following formula: θ w + 1 = θ w - γ ∂ F ( θ w ) ∂ θ wherein θ is a specific pixel, wherein w is an increments step of θ, and wherein γ is a damping parameter to control the step size.