Solving MAX-SAT with non-oblivious functions and history-based heuristics