Computer algorithm created to encode human memories