Hacker News new | ask | show | jobs
by TheCoreh 3203 days ago
What everyone else said, but if you want a "quick and dirty" way of doing it, you can just use a simple genetic algorithm:

- Start with a couple (say 100) completely random schedules

- Measure how good they are via a fitness function (say, start at 0 and everytime a constraint is violated add 1 point. You can be fancy and add different amounts depending on the type of constraint violated)

- Sort the schedules from lowest to highest

- Pick the top 20 or so

- Generate other 80 schedules by mutating the 20 you selected before, randomly shuffling the talks, and possibly mixing up different schedules together (crossover).

- Repeat for a couple thousands of generations, the population should quickly evolve towards better schedules

- You might get stuck on local minima, but for the most part you can just run it again several times from the start and it eventually won't get stuck

- Not guaranteed to give optimum results but should give decent enough results

1 comments

I was going to post exactly this. I always solve scheduling problems with GAs and get great results. It's easy to do and does not require any domain knowledge. It would probably take just a few hours to solve this using a GA, maybe even less.