You basically adapted the Dijkstra algorithm that was shown at lecture. It is in line with the requests and behaves the way it is supposed to: it reaches the optimal solution in reasonable time if N is small.
For big values of N we would never be able to find the exact solution or it would take too much time. Therefore, next time you can think of:
First applying a Greedy algorithm to find an upper bound of optimal solutions
And then use your Dijkstra algorithm to narrow even more the space of search
You had my same idea for calculating the costs, and I think it is the best way for such evaluation. I also think that the formulation of the state as a subset of the indexes of the list of lists is well thought-out.
Given that the code is very similar to the ones explained by the professor, it has been fairly easy to understand. But, if someone would read it without having followed the course it would take more time for them. Therefore, the readme should have been more verbose.
You basically adapted the Dijkstra algorithm that was shown at lecture. It is in line with the requests and behaves the way it is supposed to: it reaches the optimal solution in reasonable time if N is small.
For big values of N we would never be able to find the exact solution or it would take too much time. Therefore, next time you can think of:
You had my same idea for calculating the costs, and I think it is the best way for such evaluation. I also think that the formulation of the state as a subset of the indexes of the list of lists is well thought-out.
Given that the code is very similar to the ones explained by the professor, it has been fairly easy to understand. But, if someone would read it without having followed the course it would take more time for them. Therefore, the readme should have been more verbose.