-
Notifications
You must be signed in to change notification settings - Fork 1
ConfigsGenAlg

ConfigsGenAlg is an abstract class for the group organization algorithms. These algorithms are usually called coalition structure generation algorithms. This class also manipulates learner constraints. Such constraints inform the system about learners that should be joined or separated.
Note: Some of these approaches were renamed since the current master deployment.
A constraint is represented by a dictionary { players: int[], type: string {"JOINT","SEPARATE"} } with the following entries:
| Name: expected type | Description |
|---|---|
| players: int[] | The list of players that are associated to the constraint. |
| type: string {"JOINT","SEPARATE"} | The type of constraint. |
+ ConfigsGenAlg(playerModelBridge: PlayerModelBridge,
interactionsProfileTemplate: InteractionsProfile,
taskModelBridge: TaskModelBridge,
preferredNumberOfPlayersPerGroup: int = None,
minNumberOfPlayersPerGroup: int = 2,
maxNumberOfPlayersPerGroup: int = 5,
jointPlayerConstraints: string = "",
separatedPlayerConstraints: string = ""): void| Name: expected type | Default value | Description |
|---|---|---|
| playerModelBridge: PlayerModelBridge | - | The connector for the players data model. |
| interactionsProfileTemplate: InteractionsProfile | - | A template for creating interaction profiles. When creating interaction profiles, the template informs the system about the number of interaction dimensions to be considered as well as their designations. |
| taskModelBridge: TaskModelBridge | - | The connector for the tasks data model. |
| preferredNumberOfPlayersPerGroup: int | None | A preferred group size to consider. When filled (not None), the configurations will try following a fixed group size. Whenever such cannot be achieved, the system distributes the remaining learners by the already formed groups. |
| minNumberOfPlayersPerGroup: int | 2 | The minimum group size to consider. |
| maxNumberOfPlayersPerGroup: int | 5 | The maximum group size to consider. |
| jointPlayerConstraints: int[][] | - | Informs the system about the learners that should be assigned to the same group. |
| separatedPlayerConstraints: int[][] | - | Informs the system about the learners that should be assigned to different group. |
| allPlayerConstraints: [] | - | All learner constraints registered by the system (see above the representation of a constraint). |
+ init(): voidAbstract method to be used for initializing a configuration algorithm if data is stored between iterations.
+ reset(): voidAbstract method to be used for resetting the configuration algorithm if data is stored between iterations.
+ organize(): dict { groups: int[][], profiles: InteractionsProfile[], avgCharacteristics: PlayerCharacteristics[], tasks: int[] }Purely virtual method used to generate and return a group configuration.
Returns a dictionary with the following entries:
| Name: expected type | Description |
|---|---|
| groups: int[][] | An array of groups, with each group represented as an array of IDs. |
| profiles: InteractionsProfile[] | The profiles for each group, in the order that the groups appear in groups. |
| avgCharacteristics: PlayerCharacteristics[] | The average learning states of each group, in the order that the groups appear in groups. |
| tasks: int[] | The tasks assigned for each group, in the order that the groups appear in groups. |
+ addJointPlayersConstraints(players: int[]): voidAdds a constraint informing the system that the learners in players should be assigned to the same group.
| Name: expected type | Default value | Description |
|---|---|---|
| players: int[] | - | The list of learner IDs that are associated to the constraint. |
+ addSeparatedPlayersConstraints(players: int[]): voidAdds a constraint informing the system that the learners in players should be assigned to different groups.
| Name: expected type | Default value | Description |
|---|---|---|
| players: int[] | - | The list of learner IDs that are associated to the constraint. |
+ resetPlayersConstraints(): voidRemoves all constraints from the system.
+ getPlayerConstraints(): <constraint>[]Retrieves all current group formation constraints. See above for the representation of constraints.
# fromStringConstraintToList(constraints: string): <constraint>[]Converts a string to constraints as represented by the system (see above).
| Name: expected type | Default value | Description |
|---|---|---|
| constraints: string | - | The string to be parsed for constraints. |
# randomConfigGenerator(playerIds: int[], minNumGroups: int, maxNumGroups: int): int[][]An auxiliary method that generates a random group configuration.
| Name: expected type | Default value | Description |
|---|---|---|
| playerIds: int[] | - | The IDs of the learners considered for group organization. |
| minNumGroups: int | - | The minimum number of groups to form. |
| maxNumGroups: int | - | The maximum number of groups to form. |
| Expected type | Description |
|---|---|
| int[][] | An array of groups, with each group represented as an array of IDs. |
regAlg = KNNRegression(playerModelBridge = playerBridge, numberOfNNs = 5)
intProfTemplate2D = InteractionsProfile(dimensions = {"dim_0": 0, "dim_1": 0})
configsAlg = PureRandomSearchConfigsGen(
playerModelBridge = playerBridge,
interactionsProfileTemplate = intProfTemplate2D.generateCopy(),
regAlg = regAlg,
persEstAlg = ExplorationPreferencesEstAlg(
playerModelBridge = playerBridge,
interactionsProfileTemplate = intProfTemplate2D.generateCopy(),
regAlg = regAlg,
numTestedPlayerProfiles = numTestedPlayerProfilesInEst,
qualityWeights = PlayerCharacteristics(ability=0.5, engagement=0.5)),
numberOfConfigChoices = numberOfConfigChoices,
preferredNumberOfPlayersPerGroup = preferredNumberOfPlayersPerGroup,
qualityWeights = PlayerCharacteristics(ability=0.5, engagement=0.5)
)
print(configsAlg.organize())
# Example return for a 10 learner class: {'groups': [[6, 0, 2, 7], [1, 5, 4, 3], [9, 8]], 'profiles':
#[<InteractionsProfile.InteractionsProfile object at 0x7f426050bad0>, <InteractionsProfile.InteractionsProfile object
#at 0x7f426050bb10>, <InteractionsProfile.InteractionsProfile object at 0x7f426050bcd0>], 'avgStates':
#[<PlayerStructs.PlayerState object at 0x7f426050bb50>, <PlayerStructs.PlayerState object at 0x7f426050bc10>,
#<PlayerStructs.PlayerState object at 0x7f426050bbd0>]}Adaptation
Group Configuration Generation
- ConfigsGenAlg
- RandomConfigsGenAlg
- PureRandomSearchConfigsGenAlg
- EvolutionaryConfigsGenAlg
- ODPIPConfigsGenAlg (exact)
- CLinkConfigsGenAlg (legacy)
Preferences Estimation
Quality Evaluation Algorithms
- QualityEvalAlg
- Group-Based Quality Evaluation:
- Regression-Based Quality Evaluation:
- Tabular Quality Evaluation:
Auxiliary Structures
- InteractionsProfile
- PlayerCharacteristics
- PlayerState
- Personality (Inherent Preference):
- PlayerStatesDataFrame
Model Bridges
Player Data Trim