A highly accurate and reliable algorithm capable of performing automatic inverse design of coolant flow passage numbers, shapes, sizes, and locations inside coated solid objects has been developed. The user has the freedom to specify arbitrary temperatures and heat fluxes at the points on the outer surface of the object, and either temperatures or heat fluxes on the surfaces of the yet unknown coolant flow passages. The number of passages required could be guessed and the algorithm will automatically eliminate the unnecessary passages. The method allows even inexperienced designers to achieve an optimal configuration of coolant passages in a single computer run while satisfying user-specified manufacturing constraints that were incorporated via a barrier function method. The optimization algorithms used in this inverse design code were based on gradient search and on a modified Newton search. A simple method for escaping from local minima has been implemented that involves switching between two different formulations of the objective function. The optimal value of the gradient search parameter was found using a simple method of fitting a highly accurate spline through a set of points in the cost function/search parameter plane, and seeking out the value that will generate minimal error.