-
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 coupling exists between the player and task models and Adaptation and so, even if the number of players or tasks change, the module can be executed.
Adaptation()init(playerModelBridge, taskModelBridge, regAlg, configsGenAlg, name): voidThis module initializes the Adaptation, getting it ready for the execution of iterations.
| Name: expected type | Default value | Description |
|---|---|---|
| playerModelBridge: PlayerModelBridge | - | The connector for the players data model |
| taskModelBridge: TaskModelBridge | - | The connector for the tasks data model |
| regAlg: RegressionAlg | RegressionAlg() | The regression algorithm to be used in the adaptation iterations |
| configsGenAlg: ConfigsGenAlg | ConfigsGenAlg() | The configurations (coalitions structure) generation algorithm to be used in the adaptation iterations |
| name: string | A name for the Adaptation (for debug or if identification is needed) |
getName(): stringThis method returns the name of the associated Adaptation instance.
iterate(currIteration): Dictionary { groups: int[][], profiles: InteractionsProfile[], avgStates: PlayerState[])This method triggers the beginning of a new iteration using the current Adaptation configuration.
| Name: expected type | Default value | Description |
|---|---|---|
| currIteration: int | - | This iteration is the nth iteration |
organizePlayers(): Dictionary { groups: int[][], profiles: InteractionsProfile[], avgStates: PlayerState[])This method calls the configuration generation algorithm to return a new configuration.
selectTask(bestConfigProfile, avgState): intThis method selects a new task tailored to a group through its profile and average state. It returns the id of that task in the TaskModelBridge.
| Name: expected type | Default value | Description |
|---|---|---|
| bestConfigProfile: InteractionsProfile | - | the profile to consider |
| avgState: PlayerState | - | the average state to consider |
playerBridge = MockedPlayerModelBridge()
taskBridge = MockedTaskModelBridge()
statisticsCourseAdapt = Adaptation()
statisticsCourseAdapt.init(playerBridge, taskBridge, regAlg = KNNRegression(3), configsGenAlg = GIMMEConfigsGen(numberOfConfigChoices=50, preferredNumberOfPlayersPerGroup = 5, PlayerCharacteristics(ability=0.5, engagement=0.5)), fitAlg = WeightedFitness(), name="Statistics Course Adaptation")
#do 50 iterations of statisticsCourseAdapt and print each chosen configuration
for i in range(50):
print(statisticsCourseAdapt.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