Comment

Comment by TheCoreh

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

parent TheCoreh 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton