Optimization with stochastic preferences based on a general class of