The algorithm is a good trade-off between time and value of w allowing to reach a solution even for large values of N.
Furthermore, the heuristic function choosen is a good way to represent the distance from the goal.
Including also the basic greedy version of the algorithm allows to understand what is the improvement you deployed and what is also the scale of enhancements in terms of w, visited node and bloat.
Major
Since you used a Greedy approach, you were not able to find the optimal solution, because you locally searched for the best next state (in your case, the elements with the largest distance from what you have already seen).
Minor
In order to reduce the number of inner loop in the main function, it would have been better to build a set from the list generated by the problem so as to reduce the number of duplicated elements.
The algorithm is a good trade-off between time and value of w allowing to reach a solution even for large values of N. Furthermore, the heuristic function choosen is a good way to represent the distance from the goal. Including also the basic greedy version of the algorithm allows to understand what is the improvement you deployed and what is also the scale of enhancements in terms of w, visited node and bloat.
Major
Minor