We address the problem of resource discovery in peer-to-peer(P2P) networks. Existing P2P systems employ an uninformed (blind) search algorithm to locate resources present on different nodes of the P2P network. Uninformed search is inefficient because it generates considerable traffic and congestion in the network through message flooding. In this paper, we address this problem through an informed search mechanism for P2P networks which uses a heuristic inspired by social insects such as ants. In our algorithm, ants, implemented as mobile software agents, visit different nodes to search for a resource and deposit a substance called pheromone. Future ants use the amount of pheromone left behind on nodes as a reinforcement to direct their search query towards resourceful nodes. We employ different types of pheromone, and, different types of ants to improve the efficiency of the P2P search mechanism. Our simulation results illustrate that ant-based heuristics compare favorably with traditional techniques for resource discovery in P2P networks.