def scoreSolution( args, solution ) :
    """
    Quantitatively rank a single solution.
    
    Parameters:
    args - the returned arguments from initAnnealer
    solution - the solution to be measured
    
    Higher scores are better.
    
    Returns: A quantitative measure of goodness of the
    proposed solution. The quantitative measure must be
    greater than zero. 

    """
    cost = 0.0
    for i in range(1, len(solution)) :
        cost += args['matrix'][ solution[i-1] ][ solution[i] ]

    return 1000000 - cost