Peer-to-Peer networks are overlay networks that are constructed over underlay networks. These networks can be structured or unstructured. In these networks, peers choose their neighbors without considering underlay positions, and therefore, the resultant overlay network may have a large number of mismatched paths. In a mismatched path, a message may meet an underlay position several times, which causes redundant network traffic and end-to-end delay. In some of the topology matching algorithms such as X-BOT, PROP-O, PROP-G, and THANCS, each peer uses a local search operator for gathering information about the neighbors of that peer located in its neighborhood radius. In these algorithms, each peer also uses a local operator for changing the connections among the peers. These matching algorithms suffer from two problems; neither the neighborhood radius nor the local operator can adapt themselves to the dynamicity of the network. In this paper, a topology matching algorithm that uses lea...