# Path: simpleai/search/utils.py
# def argmin(iterable, function):
#     return _generic_arg(iterable, function, min)


import random
from copy import deepcopy, copy
from itertools import product
from simpleai.search.utils import argmin
    from simpleai.search.arc import arc_consistency_3
# coding=utf-8

MOST_CONSTRAINED_VARIABLE = 'mcv'
HIGHEST_DEGREE_VARIABLE = 'degree'
LEAST_CONSTRAINING_VALUE = 'lvc'



# Path: simpleai/search/utils.py
# def argmin(iterable, function):
#     return _generic_arg(iterable, function, min)


# Path: simpleai/search/csp.py
import random
from copy import deepcopy, copy
from itertools import product
from simpleai.search.utils import argmin
    from simpleai.search.arc import arc_consistency_3

# coding=utf-8

MOST_CONSTRAINED_VARIABLE = 'mcv'
HIGHEST_DEGREE_VARIABLE = 'degree'
LEAST_CONSTRAINING_VALUE = 'lvc'



def backtrack(problem, variable_heuristic='', value_heuristic='', inference=True):