## 1 Introduction
In this mechanism, taking advantage of data derived from an experiment performed in the real world, we built a database containing the history of meetings of every pair of friends/not friends participating in the experiment. Then, to find out the existence of friendship between a pair of nodes in other scenarios, we apply a machine learning classifier to the created database. To discover the node's acquaintances, FSF introduces a metric entitled Node's Acquaintanceship Metric (NAM), which is based on the similarity between the history of contacts of each pair of nodes in the network. Next, to check the selfishness of the message relay candidate, FSF uses a mechanism that combines a collaborative watchdog system with a reputation system based on a logistic function. Finally, before it takes the forwarding decision, and to take into account those cases in which the relay node may not accept to receive the message because of resource constraints, FSF checks the resources levels of the candidate relay. When a contact opportunity arises, FSF will forward a message if, and only if, the social ties between the nodes are strong (friends or acquaintances), the message relay is not assessed as selfish, and the resources of the relay' device are not at critical levels. On the contrary, the message will not be forwarded. To validate our proposal, we develop a set of experiments that include simulating the message delivery process in four realistic well-known opportunistic network scenarios, i.e., Cambridge [8], Reality [9], National Chengchi University (NCCU) [10], and Sassy [11]. We then compare the obtainedresults in terms of delivery rate, average delay, and cost, against other protocols found in the literature such as BUBBLE-RAP [12], Friendship Routing [13], Probabilistic Routing Protocol using History of Encounters and Transitivity (PROPhet) [14], and Epidemic [15]. Simulation results show that, when taking the selfishness on routing issues into account, our FSF algorithm outperforms previously proposed schemes, by increasing the delivery ratio up to 20%, with the advantage that it introduces a lower number of forwarding events. We also find out that the buffer management algorithm can become an important key parameter that may impact the network performance in scenarios with the presence of selfish nodes. In summary, the main contributions of this paper are:  
* We present a novel system to classify the friendship strength between nodes using machine learning classifiers. We also present a new metric to depict the node's acquaintanceships. * We design the FSF algorithm by also taking into account the resources of the relay device on the routing decisions. * We propose a watchdog and a reputation system to detect the nodes' selfishness behaviour. * We evaluate and compare the proposed algorithm with respect to other well-known routing algorithms, and show its performance improvements in realistic scenarios. The rest of this paper is organized as follows: in Section 2, we discuss some related works, while, in Section 3, we present the architecture used. Section 4 details the proposed FSF protocol for OppNet applications. In Section 5, we describe the experimental setup, while, in Section 6, we present and discuss the experimental results. Finally, in Section 7, we conclude the paper and refer to future works.