You own a taco truck that's open 24/7 and manage five employees who run it. Employees work solo, eight-hour shifts. You decide the best way to set their schedule for the upcoming week is to create a bunch of random schedules and select one that looks best.
You build a 1000x21 array of random employee ids where element (i,j) gives the employee id working shift j for schedule i.
A Schedule is valid as long as no employee works two consecutive shifts. Get the row indices of all valid schedules.
Try with Google Colab :material-open-in-new: