A knowledge-based P2P simulator