Algorithm for Assessment of Cognition