Mobile ad-hoc networks are deployed under the assumption that participating nodes are willing to forward other nodes' packets. In reputation-based mechanisms cooperation is induced by means of a threat of partial or total disconnection from the network if a node is non-cooperative; however packet collisions and interference may make cooperative nodes appear selfish sometimes. In this paper we use a simple network model to first study the performance of some proposed reputation strategies and then present a new mechanism that we call DARWIN (Distributed and Adaptive Reputation mechanism for WIreless ad-hoc Networks). The idea is to avoid a retaliation situation after a node has been falsely perceived as selfish so cooperation can be restored quickly. We prove that our strategy is robust to imperfect measurements, is collusion-resistant and can achieve full cooperation among nodes.