A stochastical algorithm to investigate the real closed-shell Hartree-Fock problem is proposed. The approach is based on a global optimization method, the generalized simulated annealing. We tested this methodology by determining the Hartree-Fock ground state of the H-2, LiH, BH, Li-2, OH-, FH, CO, N-2, BeH2, CH2, H2O, NH3, HCHO, CH, molecular systems using minimal, double-zeta, and triple-zeta bases. The main characteristic of this method is that it enables mapping the electronic hypersurface to find minima with the guarantee of finding the absolute minimum of the functional in focus. (c) 2005 Wiley Periodicals, Inc.