nTimeStep = pre-defined value MSD = mean squared displacement persistenceModule = pre-defined value biasVector = vector with pre-defined module and direction nSubsteps = 10 for timeStep = 1 to nTimeStep persistenceVector = vector with persistenceModule and direction of previous displacement subStepModule = sqrt (MSD/nSubsteps) displacement = null for n = 1 to nSubsteps displacement += vector with subStepModule and random direction displacement += persistenceVector displacement += biasVector newPosition = previous position + displacement