Lattice formulation of the Fokker-Planck equation