  This paper addresses the distributed consensus problem in the presence of
faulty nodes. A novel weight learning algorithm is introduced such that neither
network connectivity nor a sequence of history records is required to achieve
resilient consensus. The critical idea is to dynamically update the interaction
weights among neighbors learnt from their credibility measurement. Basically,
we define a reward function that is inversely proportional to the distance to
its neighbor, and then adjust the credibility based on the reward derived at
the present step and the previous credibility. In such a way, the interaction
weights are updated at every step, which integrates the historic information
and degrades the influences from faulty nodes. Both fixed and stochastic
topologies are considered in this paper. Furthermore, we apply this novel
approach in clock synchronization problem. By updating the logical clock skew
and offset via the corresponding weight learning algorithms, respectively, the
logical clock synchronization is eventually achieved regardless of faulty
nodes. Simulations are provided to illustrate the effectiveness of the
strategy.
