From OpenCog
(Redirected from SimpleTruthValue)
Jump to: navigation, search

An Atom may have one of several different kinds of TruthValues. These include (among others) SimpleTruthValues, CountTruthValues and IndefiniteTruthValues. All truth values expose at least two parameters describing truth:

Strength, a floating-point value ranging from 0 to 1, with 0 denoting the classical Boolean false, and 1.0 denoting true.
Confidence, a floating point value ranging from 0 to 1, expressing the certainty of the strength, with 0 denoting completely uncertain, and 1 denoting completely confident.

Other truth value types may express strength or confidence intervals, or provide features for statistics gathering or temporal information.

CAUTION: in PLN, it is assumed that the truth value of EvaluationLink and MemberLink is a fuzzy set membership value, and NOT a probabilistic truth value. Neither the C++ code, nor the python or scheme wrappers distinguish these two types of truth values at this time. Combining these two different kinds of truth values can and will result in crazy results. Caveat Emptor!. EDIT: to remedy this I suggest to rely on Generalized Ditributional TV as proposed here.

We should probably invent a new fuzzy-set-membership truth value, to be safe.

Some ideas about reimplementation of TruthValues and AttentionValues in the Atomspace are given in ProtoAtom.


Holds two floating-point values, commonly called "strength" and "confidence".


Unless it is a fuzzy truth value (perhaps implementing GDTV would be more indicated), the strength represents a probability estimate of the true unknown probability.


The confidence captures the spread of the second order distribution over the true unknown probability. If the confidence is 1 the spread is null. If the confidence is 0 the spread is uniform, that is we know nothing about the true probability.

The spread of the second order distribution shrinks as more evidence accumulates, so it depends on the number of observations. There is a function to translate the count N (number of observations) into confidence

c = N / (N + K)

as the count increases, so does the confidence. This function is could be something else, like say 1 - std-dev, or anything that is monotonous and has co-domain [0, 1], but it has the advantage of being simple.


Holds three floating point values. One is typically a raw count (integer) of having seen some event. Another is typically the logarithm of the normalized frequency (i.e. observed probability) of the event.


Holds four floating point numbers.


FuzzyTruthValue: A TruthValue that stores a mean and the number of observations (strength and confidence).


GenericTruthValue: Generic TruthValue. The current implementation is seriously flawed.


NullTruthValue: A special type of TruthValue.


ProbabilisticTruthValue: A TruthValue that stores a mean, a confidence and the number of observations.


EvidenceCountTruthValue: A TruthValue that stores a positive and an optional total count, and calculates on demand the mean and the confidence when the total count is defined.