Because of its mathematical and computational components, operations research (OR) is not simple to teach or to learn, despite its innumerable industry applications. However, advanced OR is included in many graduate degrees related to industrial engineering, where students need these techniques to solve complex optimization problems. Faced with the problem of teaching heuristic methods to master's students at the University of Seville, we developed a problem-based approach whereby instead of listening to lectures and taking exams on these techniques, one algorithmic technique is randomly assigned to each student, who must apply it to solving a certain optimization problem. Here we discuss our approach to putting our heuristics course into practice, the problems we faced, how we addressed those problems, the positive results obtained, and the lessons learned.