Computation for cognition