How to set connection weights to decay with exponential decay?

Hi everyone, I have made some attempts in improving the R-STDP algorithm. It means that when the reward is occurred, STDP is adopted. Otherwise, the weights decay exponentially with time. How to implement the weight decay process? Any ideas and examples are welcome. :smile: