Day 2

Fitness function: One of the most important parts of the script is the Fitness function. Without it, there is basically only NONSENSE. The fitness function must in some way copy my own thinking, or most human-like empathic hardcoded in Math. While Neural Network could probably be teached, i have literally NO knowledge and such network feels IMPOSSIBLY COMPLICATED.

Most burning issue: is the weekend shifts. No doctor wants to have more shifts on weekends then absolutely necessary. Having too many IS a PROBLEM. Having none is OK. Having two within two weeks IS a PROBLEM. Having two, one at the beginning and one at the end of the month is MANAGEABLE. So how can i calculate this issue. I think i found a part of the fitness function for this by measuring the longest interval between the first weekend-like day (Friday – explanation under), Saturday, Sunday and mark it as IDEAL condition. If the first friday in a month has index in an array of 1 and the last sunday in month has index of 31, then the Holy grail interval is 30. The part of the fitness function for this issue will then find the lowest interval between two weekend-like shifts of each doctor and store them. If for example Doctor A has a shift on friday the 8th and Sunday on 17th, then the interval is 9. 1 % from 30 is 0.3. The interval we measured before is 9 divided by 0.3 = 30. So it could be 30% or 30 points for this specific part of the Fitness Function. On the other hand a doctor having the first friday shift and last saturday would score 97 % or 97 points out of 100. Almost perfect score. There is an issue though in this approach. It is not linear, since indexes of Monday through Thursday arent used. What would it mean? That there would be unused points in the 0-100 scale. While it doesnt necessarily create problems, linearity feels sort of better and could be handled by only assigning indexes to Fridays, Saturdays and Sundays and recounting towards them. In this way, the unused percentiles are greatly reduced and create a more smoother experience. So this MIGHT be the way to GO as far as Weekend day Interval part of Fitness Function goes.

  • Fridays: are bad, you are tired on Saturday after the shift and you have no day-off, because Saturday is your home time anyway. It basically makes your weekend one day shorter.
    • Index 1.25