Genetic, hill-climbing, and simulated annealing algorithms in C++