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

Adaptation encapsulates all the functionalities of GIMME. It is the highest level class, responsible for initializing and executing adaptation iterations.
As instances of Adaptation can be initialized and executed whenever, adaptations can dynamically be reconfigured with different arguments. No direct coupling exists between the player and task models and Adaptation and so, even if, e.g., the number of players or tasks changes, the module can be executed.
Adaptation(
player_model_bridge: PlayerModelBridge,
task_model_bridge: TaskModelBridge,
configs_gen_alg: ConfigsGenAlg,
name: string
): void| Name: expected type | Default value | Description |
|---|---|---|
| player_model_bridge: PlayerModelBridge | - | The connector for the player data models. |
| task_model_bridge: TaskModelBridge | - | The connector for the task data models. |
| configs_gen_alg: ConfigsGenAlg | - | The group formation (coalitions structure generation) algorithm to be used. |
| name: string | - | A name for the Adaptation (for debug or if identification is needed). |
iterate(): dict { groups: int[][], profiles: InteractionsProfile[], avgCharacteristics: PlayerCharacteristics[], tasks: int[] }This method triggers the beginning of a new iteration using the current Adaptation 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. |
bootstrap(num_bootstrap_iterations: int): voidThis method performs a bootstrap on the current adaptation process, simulating the learners progression over a number of iterations.
set_name(name: string): voidThis method is a setter for the member name.
get_name(): stringThis method is a getter for the member name.
__select_task(possible_task_ids: int[], best_config_profile: InteractionProfile, avg_characteristics: PlayerCharacteristics): intThis method returns a new task tailored to a group through its profile and average state. It returns the ID of that task in the TaskModelBridge.
__simulate_reaction(player_id: int): PlayerStateThis method simulates the reaction of a given player to the task attributed to their group, and returns the simulated PlayerState.
__calc_reaction(state: PlayerState, player_id: int): PlayerStateAn auxiliary method of simulateReaction.
configs_gen_alg = RandomConfigsGenAlg(
player_model_bridge=player_bridge,
interactions_profile_template=prof_template.generate_copy(),
preferred_number_of_players_per_group=preferred_num_group_players
)
course_adapt = Adaptation(name="Test Adaptation",
player_model_bridge=player_bridge,
task_model_bridge=task_bridge,
configs_gen_alg=configs_gen_alg)
# do 50 iterations of statisticsCourseAdapt and print each chosen configuration
for i in range(50):
print(course_adapt.iterate()["groups"]) # print chosen configurationAdaptation
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