<award>
Attribute Examples Part 1
The following examples illustrate use of the <award>
tag attributes.
Attribute Example: credit
By default, a matched <award>
will give full credit of 1. Specify a
smaller value of the credit
attribute cause the <award>
to give partial credit.
Attribute Example: matchPartial
When the matchPartial
attribute is applied, an automated partial credit evaluation will be attempted,
potentially giving credit between 0 and 1. Without the matchPartial
attribute, the response must
be completely correct before it receives credit.
The automated partial credit algorithm will attempt to break up logical conditions into pieces and look separately at components of vectors.
For comparison of vectors, the attributes matchByExactPositions
and unorderedCompare
influence
the partial credit algorithm.
Attribute Example: symbolicEquality
Note that you cannot repeat the original expression in the first question, and you cannot commute the terms in the second question.
For answer validation that is more liberal (but still stricter than the default
numerical checker), combine symbolicEquality
with the simplifyOnCompare
and
expandOnCompare
attributes.
Attribute Example: symbolicEquality with simplifyOnCompare
Specifying the symbolicEquality
attribute switches to a symbolic answer-checker that
demands exact syntatical equality. The symbolic equality can be relaxed with the simplifyOnCompare
attribute.
The simplifyOnCompare
attribute has four options:
simplifyOnCompare="none"
: the default value of demanding exact equality.simplifyOnCompare="full"
(or simplysimplifyOnCompare
by itself): apply currently available simplification routines before checking. Does not include expanding factored expressions.simplifyOnCompare="numbers"
: simplify numerical expressions like1+2
but not algebraic expressions. Permute terms and factors into a canonical order before checking equality.simplifyOnCompare="numbersPreserveOrder"
: simplify numbers but without permuting terms or factors.
To include expansion of factored expressions, you can add the expandOnCompare
attribute.
Attribute Example: symbolicEquality with expandOnCompare
The default comparison is a numerical answer-checker with a liberal definition of
equality. Specifying the symbolicEquality
attribute switches to a symbolic
answer-checker that demands exact syntatical equality. The symbolic equality can be
relaxed with the simplifyOnCompare
attribute. To expand factor expressions prior to
comparison, you should also include the expandOnCompare
attribute.
Attribute Example: unorderedCompare and unordered
When multiple values are compared within a single <award>
tag, the default behavior
is to match the order of the sequenced values. If order is irrelevant, use the unorderedCompare
attribute.
unorderedCompare
can be used with list components (e.g., <mathList>
, <numberList>
,
and <textList>
) as well as the <math>
component containing a list (e.g, 1,2,3
),
tuple (e.g., (1,2,3)
) or array (e.g., [1,2,3]
).
Alternatively, and for more control over what is ordered, one can add the unordered
attribute
directly to a list component or a <math>
, which will cause an unordered comparison to
be used when comparing it to anything else.