def evaluate_soft_constraints(assignment, soft_constraints):
    """
    Compute the value of the soft constraints, evaluating them on the given the variables assignment.

    Parameters
    ----------
        assignment : list
            the assignment for each variable to obtain the maximum (the key is the literal and the value is the assigned value).
        soft_constraints : list
            the soft contraints, a list of lists, each list is built with the function name for the first element, followed by the intereseted variables.

    Returns:
    --------
        evaluations : list
            a list with the results of the evaluation of the soft constraints given the variables assignment.
    """

    # Variable initialization
    evaluations = []
    for elem in soft_constraints:
        function = elem[0]
        val = function(assignment[elem[1]],assignment[elem[2]])
        evaluations.append(val)
    return evaluations