A three-dimensional self-learning kinetic Monte Carlo model: application to Ag(111)