Seol mar théacs é seo: Dynamic hybrid algorithms for MAP inference in discrete MRFs