Skip to content

Genetic

vanoss222 edited this page Feb 2, 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 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 as w(p) > w(p+1) and summation of w(p) = 1, where n = priority and n > 0, or else weight(n) = 1.

Raw Fitness Function

Figure 1: Backtracking Algorithm


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 as normalised weight(s) = w(p) / total of filters.

Final Fitness Function

Figure 2: Backtracking Algorithm

Clone this wiki locally