This paper develops an efficient, recursive algorithm for determining the economic power dispatch of thermal generators within the unit commitment environment. A method for incorporating the operation limits of all on-line generators and limits due to ramping generators is developed in the paper. The developed algorithm is amenable for computer implementation using the artificial intelligence programming language, Prolog. The performance of the developed algorithm is demonstrated through its application to evaluate the costs of dispatching 13 thermal generators within a generator schedule in a 24-hour schedule horizon.