The theory of intelligence and its measurement