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

The task model bridge connects the execution of the GIMME processes to the task data storage. After creating a child class, the programmer is required to implement several methods so that the algorithms can fetch task data.
TaskModelBridge(): voidget_all_task_ids(): string[]A method called whenever a list of all task ids are needed. Must return an array.
get_task_interactions_profile(taskId: string): InteractionsProfileA method called whenever the InteractionsProfile of a certain task is needed. Must return an InteractionsProfile.
get_min_task_required_ability(taskId: string): decimalA method called whenever an estimation for the difficulty percentage of the task is needed. Must return a decimal.
get_min_task_duration(taskId: string): DateA method called whenever an estimation for the duration of the task is needed. Must return a Date.
get_task_init_date(taskId: string): DateA method called whenever the initial date of a task is needed. Must return a Date.
get_task_final_date(taskId: string): DateA method called whenever the final date of a task is needed. Must return a Date.
get_task_difficulty_weight(taskId: string): decimal {0.0..1.0}A method called to find the importance given to the difficulty when selecting a task. Must return a decimal number between 0.0 and 1.0.
get_task_profile_weight(taskId: string): decimal {0.0..1.0}A method called to find the importance given to the interaction profile when selecting a task. Must return a decimal number between 0.0 and 1.0.
get_task_diversity_weight(taskId: string): decimal {0.0..1.0}A method called to inform how much group diversity is adequate when selecting a task. Must return a decimal number between 0.0 and 1.0.
from GIMMECore import TaskModelBridge
class CustomTaskModelBridge(TaskModelBridge):
def __init__(self):
self.tasks = []
def clear_tasks(self):
self.tasks = []
def register_new_task(self, task_id, description, min_required_ability, profile, min_duration, difficulty_weight,
profile_weight):
new_task = TaskModelMock(task_id, description, min_required_ability, profile, min_duration,
difficulty_weight, profile_weight)
if int(task_id) < len(self.tasks):
self.tasks[task_id] = new_task
else:
self.tasks.append(new_task)
def get_all_task_ids(self):
return [str(task.id) for task in self.tasks]
def get_task_interactions_profile(self, task_id):
return self.tasks[int(task_id)].profile
def get_min_task_required_ability(self, task_id):
return self.tasks[int(task_id)].min_required_ability
def get_min_task_duration(self, task_id):
return self.tasks[int(task_id)].min_duration
def get_task_difficulty_weight(self, task_id):
return self.tasks[int(task_id)].difficulty_weight
def get_task_profile_weight(self, task_id):
return self.tasks[int(task_id)].profile_weight
def get_task_init_date(self, task_id):
return self.tasks[int(task_id)].initDate
def get_task_final_date(self, task_id):
return self.tasks[int(task_id)].finalDate
def get_task_diversity_weight(self, task_id):
return 0.5Adaptation
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