In this paper we apply the COllective INtelligence (COIN) framework ofWolpert et al. toWireless Sensor Networks (WSNs) with the aim to increase the autonomous lifetime of the network in a decentralized manner. COIN describes how selfish agents can learn to optimize their own performance, so that the performance of the global system is increased. WSNs are collections of densely deployed sensor nodes that gather environmental data, where the main challenges are the limited power supply of nodes and the need for decentralized control. To overcome these challenges, we make each sensor node adopt an algorithm to optimize its own energy efficiency, so that the energy efficiency of the whole system is increased. We introduce a new private utility function that will measure the performance of each agent and we show that nodes in WSNs are able develop an energy saving behaviour on their own, when using the COIN framework