Optimizing Algorithms From Pairwise User Preferences