ajar.judgment#
Judgment functions transform (activated) arguments into a scalar number.
The idea is to obtain a reward, which qualifies or measures the degree to which the agent’s action was aligned with the moral value that is represented by the argumentation graph. Argumentation frameworks allow determining a subset of accepted arguments, such as the grounded extension. From this subset, we want to compare the pros and cons arguments (which respectively defend that the action was aligned or not aligned with the moral value), and to return a scalar number.
For example, if only pros arguments are present in the grounded extension,
the reward may be 1
; if only cons arguments are present, the reward may
be 0
. A mixture of pros and cons arguments should return a number
between 0
and 1
which corresponds to this mixture and which allows
the learning agent to effectively learn good behaviours.
The judgment functions implement this measure and propose several ways to compute it, which have different properties. A (hopefully good) discussion of these properties can be found at: https://rchaput.github.io/phdthesis/5-judgments.html#judgments-experiments-ajar
This code is mostly based on the work of Benoît Alcaraz.
- members:
Functions
|
Compares the number of alive pros with total pros, and returns the difference with the number of alive cons over total cons. |
|
Create a gradient between 0 and 1, using as many graduations between 0.5 and 1 as possible pros arguments, and as many graduations between 0.0 and 0.5 as possible cons arguments. |
|
Avoid division by 0 by offsetting the number of activated arguments. |
|
Compare the number of (squared) alive pros minus alive cons with the known maximum number of activated pros and cons. |
|
Simply return the ratio of (alive) pros over pros + cons. |