I’m not a MiniZinc expert but liked that I could describe the problem at a high level:

Reply to this note

Please Login to reply.

Discussion

GPT-4 was able to iteratively better understand the problem domain. I started by fixing mechanical errors:

and then moved into fixing semantic errors:

GPT-4 eventually got me to a place where I could quickly add constraints to the problem domain. Here’s my final objective function:

Using MiniZinc with GPT-4 was pleasant. I would try again with a more realistic example from daily life. If you want to see the full code, I did a longer write up: https://buttondown.email/aostiles/archive/flight-optimization-with-minizinc-and-gpt-4/