In
artificial intelligence
Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machines, as opposed to intelligence displayed by animals and humans. Example tasks in which this is done include speech re ...
and
operations research
Operations research ( en-GB, operational research) (U.S. Air Force Specialty Code: Operations Analysis), often shortened to the initialism OR, is a discipline that deals with the development and application of analytical methods to improve deci ...
, a Weighted Constraint Satisfaction Problem (WCSP), also known as Valued Constraint Satisfaction Problem (VCSP), is a generalization of a
constraint satisfaction problem (CSP) where some of the
constraints can be violated (according to a violation degree) and in which
preference
In psychology, economics and philosophy, preference is a technical term usually used in relation to choosing between alternatives. For example, someone prefers A over B if they would rather choose A than B. Preferences are central to decision theo ...
s among solutions can be expressed. This generalization makes it possible to represent more real-world problems, in particular those that are over-constrained (no solution can be found without violating at least one constraint), or those where we want to find a minimal-cost solution (according to a
cost function) among multiple possible solutions.
Formal definition
A Weighted Constraint Network (WCN), aka Cost Function Network (CFN), is a triplet
where is a finite set of discrete variables, is a finite set of soft constraints and
is either a natural integer or
.
Each soft constraint
involves an ordered set of variables, called its scope, and is defined as a cost function from
to
where
is the set of possible instantiations of . When an instantiation
is given the cost , i.e.,
, it is said forbidden. Otherwise it is permitted with the corresponding cost (0 being completely satisfactory).
In WCSP, specific subclass of Valued CSP (VCSP), costs are combined with the specific operator
defined as:
:
.
The partial inverse of
is
defined by:
:If
,
and if