The Minimum Remaining Values (MRV) heuristic is a variable ordering strategy for constraint satisfaction problem (CSP) search that selects the next variable to assign based on which has the fewest legal values remaining in its current domain. This practical application of the 'fail-first' principle aims to prune the search tree early by encountering dead-ends—where no valid assignment exists—as quickly as possible, thereby reducing the overall computational cost of finding a solution or proving none exists.
