# An Adaptive Dempster-Shafer Theory of Evidence Based Trust Model in Multiagent Systems
## 5 Simulation
### Evidence Generation  
The proposed model aims to maintain the trust of agents, in which agents can react differently over time. That is to say, both resource provider agents and information provider agents (witnesses) can decide to move from genuine to malicious or the other way around, as stated in Section 1. As a result, when an agent switches its performance deliberately, the proposed method enables agents to notice the agility difference and take sharp responses. This part mainly examines if the resource client agent can react sharply, facing an unstable resource provider agent, namely, to investigate the efficiency of the proposed direct trust generation approach. We fix one resource provider agent and one resource client agent in the experiment. Each round, the resource client agent solicits the resource provider agent for some resources, and, correspondingly, the resource provider agent contributes its resources cooperatively. In addition, concerning the resource provider agent, we also fix the probability of distributing satisfied resources to the decimal number of \(P_{s}\) (\(P_{s}\in[0,1]\)), which is unknown to the resource client agent. After a fixed number of interactions, for example, \(N_{i1}\), the resource provider agent decides to go from genuine to malicious (or from malicious to genuine). Thus, we fix the probability of distributing satisfied resources to \(1-P_{s}\) correspondingly. In each round, the client agent employs the transaction feedback to estimate the trust of the resource provider, and the transaction feedback could be a success if a randomly generated number is smaller than \(P_{s}\). Otherwise, interaction feedback is a failure. As a comparison, we compared to [65], as they map the evidence \((r,s)\) to the trust represented by \(\left(\frac{r}{r+s}+1^{\prime},\frac{s}{r+s}+1^{\prime},\frac{1}{r+s+1}\right)\) in terms of the absolute error; here, \(r\) and \(s\) indicate the number of success interactions and failed interactions, respectively. We pay much attention to the estimated value of trust in the proposed method when performance has changed. Figure 5 shows the accumulation of absolute errors (five rounds starting with \(N_{i1}\)) due to the resource provider changing its performance. As we can see, the accumulative absolute errors obtained by the proposed method are smaller than the \(\frac{r}{r+s+1}\) in Figure 5, no matter whether 10 or 100 rounds are conducted. That is to say, the proposed method has a sharp perception of the sudden change of the resource providers. This improvement enables agents to manage varying performance in a dynamic MAS. Nonetheless, some issues have to be stressed in this experiment. First, we fixed the number of resource provider agents and resource client agents to one that also fits any other number of agents. We simplify the number of agents because we want to check the performance facing sudden changes. Second, the proposed method generally acts well when the probability of presenting high-quality services is high or low (0.7 and 0.9). However, if the resource provider agent acts averagely (for example, \(P_{s}=0.5\)), the estimated trust by [65] may have a better performance because it seems to be no different when the agent decides to go from malicious (\(P_{s}=0.5\)) to genuine (\(1-P_{s}=0.5\)). As a comparison, we run the test 1000 times, and we set \(P_{s}=0.5\) and \(N_{i1}=10\). We say it is a win if the accumulated five-round absolute error by the proposed method is smaller than that of \(\frac{r}{r+s+1}\) starting with \(N_{i1}\). We received an average of 0.47 for winning the comparison, and the method in [65] wins by a tiny margin. However, the proposed method wins with 0.96 and 0.999 if \(P_{s}=0.7\) and \(P_{s}=0.9\), respectively. Nevertheless, rational agents tend to cooperate with the well-performing resource provider agents rather than the averagely performing agents in practical life. Thus, this is why we focus on 0.1, 0.3, 0.7, and 0.9 to present satisfying resources in the test.