Skip to content

Genetic

FramedStone edited this page Feb 25, 2025 · 45 revisions

SassyNic uses Genetic Algorithm's fitness score section to further manipulate the pruned data from Backtracking.


All the fitness function(s) are manually crafted based on these 2 formula Raw Fitness & Final Fitness Function:

Raw Fitness Function

It's essentially calculated fitness score without applying penalty function, O in this case refers to each filter's Objective Function where each filter(s) will be applied with their own weight(s) based on their priority.

Each filter's weight will be distributed accordingly such that w(p) > w(p+1) and summation of w(p) = 1, where p = priority and p > 1, or else weight(p) = 1 if p = 1 and only if p != 0.

Raw Fitness Function

Figure 1: Raw Fitness Function Equation


Final Fitness Function

It's essentially calculated fitness score after applying penalty function, where each penalty function(s) can be applied with hard constraint(s) or soft constraint(s) or both.

  • hard constraint(s) will always return 0 if penalty are given, 1 if no penalty are given.
  • soft contraint(s) will return based on each R (restriction/constraint)'s normalised weight(s) in this case, such that normalised weight(s) = w(p) / total of filters and p > 1 or else normalised weight(p) = 1 if p = 1 and only if p != 0.

The Final Fitness Score's equation in this case would be Objective * (1 - Penalty).

Final Fitness Function

Figure 2: Final Fitnes Function Equation


Objective & Penalty Functions for each filters

Day Filter

Day Objective Function

Figure 3.1: Day Filter Objective Function

Day Penalty Function

Figure 3.2: Day Filter Penalty Function


Time Filter

Time Objective Function

Figure 4.1: Time Filter Objective Function

  • delta = deviation time frame

Time Penalty Function

Figure 4.2: Time Filter Penalty Function

Class Gap Filter

Final Fitnes Score for Class Gap Filter = Objective - Penalty.

Class Gap Objective Function

Figure 5.1: Class Gap Filter Objective Function

Class Gap Penalty Function

Figure 5.2: Class Gap Filter Penalty Function

Instructor Filter

Instructor Filter Objective Function

Figure 6.1: Instructor Filter Objective Function

Instructor Filter Penalty Function

Figure 6.2: Instructor Filter Penalty Function

Clone this wiki locally