Building knowledge for algorithm