A drawback of ant colony algorithm is not suitable for solving continuous optimization problems. A method for solving optimization problem in continuous space by using ant colony algorithm is presented. By dividing the space into subdomains, in each iteration of the ant colony algorithm, the method first find the subdomain in which the solution located by using the trail information, then the values of the components in the solution can be determined from the existing solutions in the subdomain. The experimental results on the nonlinear programming problem show that the method has much higher convergence speed than that of GA and SA.