Prolonged network lifetime, scalability, and load balancing are important requirements for many ad-hoc sensor network applications. Clustering sensor nodes is an effective technique for achieving these goals. In this w ork, we propose a new energy-efficient approach for clustering nodes in ad-hoc sensor networks. Based on this approach, we present an algorithm, RCA (Reward based Clustering Algorithm) that periodically selects cluster heads by learning methods on the basis of their residual energy parameters and the number of members in previous process. their residual energy and. RCA does not make any assumptions about the distribution or density of nodes, or about node capabilities, e.g., location-awareness. The clustering process terminates in O(1) iterations, and does not depend on the netw ork topology or size. The algorithm incurs low overhead in terms of processing cycles and messages exchanged. It also achieves fairly uniform cluster head distribution across the network. RCA is able to distribute energy dissipation evenly throughout the sensors, doubling the useful system lifetime for the networks we simulated. Our simulation results demonstrate that RCA has better efficiency than other clustering algorithms. W e also apply our approach to a simple application to demonstrate its effectiveness in prolonging the network lifetime and supporting data aggregation.