Add simulated annealing algorithm.

Also add a .gitignore and simplify the makefile.