Show HN: Solve the best fantasy team with MiniZinc
github.com
Show HN: Solve the best fantasy team with MiniZinc
1–4 of 4 posts
Re: Show HN: Solve the best fantasy team with MiniZinc
#2With HiGHS the solve-time went from 1m7s on my machine (M1 Max) to just 7.23s. The model is solved at the root node with this change, as opposed to 1430 nodes without it.
Using OR-Tools 9.7 with free search enabled (see Configuration editor in the MiniZinc IDE) with the new model took 10.3 seconds. With 10 threads it is solved in 1.56s.
Re: Show HN: Solve the best fantasy team with MiniZinc
#3Interesting model! Testing it locally, I could see that one issue in the model is that there is a lot of symmetry to the results. Enforcing that players in the team are ordered was not useful and did not help. Enforcing that the team positions were ordered helped a lot though, by extracting the `[position[p] | p in team]` expression as a separate array `team_position` and enforcing increasing on it. With HiGHS the so…
Re: Show HN: Solve the best fantasy team with MiniZinc
#4Interesting model! Testing it locally, I could see that one issue in the model is that there is a lot of symmetry to the results. Enforcing that players in the team are ordered was not useful and did not help. Enforcing that the team positions were ordered helped a lot though, by extracting the `[position[p] | p in team]` expression as a separate array `team_position` and enforcing increasing on it. With HiGHS the so…
Thank you that is such a useful change! I wondered about symmetry but had no idea how to break it.
With that change, it is also possible to add symmetry breaking on the player identifiers within each type of player position.
These two changes taken together makes the HiGHS solver taker around 3.2s on my machine, and OR-Tools with 10 threads takes 1.28s.