-
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 in newest versions (see version 1.6.5. for the previous names).
A complete group configuration returned by a ConfigsGenAlg is 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. |
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. |
For efficiency, this class enables the encoding of a group to an integer, making use of its binary representation. For this representation, the enabled bits of a number represent the player ids in the group.
ConfigsGenAlg(player_model_bridge: PlayerModelBridge,
interactions_profile_template: InteractionsProfile,
preferred_num_players_per_group: int = None,
min_num_players_per_group: int = 2,
max_num_players_per_group: int = 5,
joint_player_constraints: string = "",
separated_player_constraints: string = ""): void| Name: expected type | Default value | Description |
|---|---|---|
| _player_model_bridge: PlayerModelBridge | - | The connector for the players data model. |
| _interactions_profile_template: 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. |
| _min_num_players_per_group*: int | 2 | The minimum group size to consider. |
| _max_num_players_per_group*: int | 5 | The maximum group size to consider. |
| _joint_players_constraints: int[][] | - | Informs the system about the learners that should be assigned to the same group. |
| _separated_players_constraints: int[][] | - | Informs the system about the learners that should be assigned to different group. |
| _all_constraints: [] | - | All learner constraints registered by the system (see above the representation of a constraint). |
*A preferred_num_players_per_group may be passed instead, informing 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.
organize(): <group configuration>Used to generate and return a group configuration (see above).
add_joint_players_constraints(players: int[]): voidAdds a constraint informing the system that the learners in players should be assigned to the same group.
add_separated_players_constraints(players: int[]): voidAdds a constraint informing the system that the learners in players should be assigned to different groups.
reset_players_constraints(): voidRemoves all constraints from the system.
get_player_constraints(): dict<constraint>Retrieves all current group formation constraints. See above for the representation of constraints.
get_completion_percentage(): decimal(auxiliary) Returns the current completion percentage of the algorithm.
_random_config_generator(player_ids: int[], min_num_groups: int, max_num_groups: int): int[][]Generates a random group configuration.
| Expected type | Description |
|---|---|
| int[][] | An array of groups, with each group represented as an array of IDs. |
_verify_coalition_validity(config: int[],
player_joint_requirements: int[][],
player_separated_requirements: int[][], players_without_group: int[]): int[]Verifies if a group (coalition) follows constraints, and returns an updated group (used in _random_config_generator).
_from_string_constraint_to_list(constraints: string): <constraint>[]Converts a string to constraints as represented by the system (see above).
_convert_coalition_from_byte_to_bit_format(coalition_in_byte_format: int[][], coalition_size: int): intConverts a group as represented by the system to a binary representation (see above).
_get_group_from_bit_format(coalition: int): int[]Converts a group as represented by a binary number (see above) to the conventional system representation.
_convert_from_byte_to_ids(coalition: int[]): int[]Receives a group and converts its flexible player ids to numeric ones.
_convert_from_ids_to_bytes(coalition: int[]): int[]Receives a group and converts its numeric player ids to the system ones (represented by a string).
_convert_set_of_combinations_from_bit_format(set_of_combinations_in_bit_format: int[]): int[][]Converts a set of groups in binary format to a set of player id lists.
_compute_coalitions_restrictions(): (int[],int[])Returns a pair informing players to be joined (first member) and separated (second member).
_convert_cs_bytes_to_dict(cs_in_byte_format: int[][],
coalitions_profiles: InteractionsProfile[][],
coalitions_avg_characteristics: PlayerCharacteristics[][]): dict { groups: int[][], profiles: InteractionsProfile[], avgCharacteristics: PlayerCharacteristics[], tasks: int[] }Joins different lists as a dictionary with the group configuration system format (see above).
#Initialization of configs generation
int_prof_2d = InteractionsProfile({"dim_0": 0, "dim_1": 0})
configs_alg = ConfigsGenAlg(
player_model_bridge=player_bridge,
interactions_profile_template=int_prof_2d.generate_copy(),
preferred_num_players_per_group=4
)
...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