3 ms·
I've found GPT-3.5 to be quite bad at small traveling salesman type problems. I used the following prompt just now on https://chat.openai.com https://chat.open
by n4r9 3y ago
I've found GPT-3.5 to be quite bad at small traveling salesman type problems.
I used the following prompt just now on https://chat.openai.com https://chat.openai.com:
> Imagine that I take a road trip starting from Amsterdam, and visiting the cities Warsaw, Budapest, Brussels, Paris, and Berlin, then returning to Amsterdam. In what sequence should I visit those cities in order to minimise the total driving time?
> To minimize the total driving time for your road trip starting from Amsterdam and visiting the cities Warsaw, Budapest, Brussels, Paris, and Berlin, you should plan your route based on the most efficient sequence. One way to achieve this is by using a route optimization algorithm, like the Traveling Salesman Problem (TSP) solver. However, keep in mind that road conditions, traffic, and other factors can impact the actual travel time.
>Here's a sequence that aims to minimize the total driving time based on a general estimation of distances between the cities:
> Amsterdam
> Brussels
> Paris
> Berlin
> Warsaw
> Budapest
> Amsterdam (return)
>This sequence follows a route that minimizes the overall distance traveled. Remember to use a navigation tool or app to get real-time traffic updates and directions during your trip, as actual conditions might differ from estimates.
The result is not optimal. It takes 45 hours: https://www.google.com/maps/dir/Amsterdam,+Netherlands/Brussels,+Belgium/Paris,+France/Berlin,+Germany/Warsaw,+Poland/Budapest,+Hungary/Amsterdam,+Netherlands/@49.8749229,6.4017275,6z/data=!3m1!4b1!4m44!4m43!1m5!1m1!1s0x47c63fb5949a7755:0x6600fd4cb7c0af8d!2m2!1d4.9041389!2d52.3675734!1m5!1m1!1s0x47c3a4ed73c76867:0xc18b3a66787302a7!2m2!1d4.3571696!2d50.8476424!1m5!1m1!1s0x47e66e1f06e2b70f:0x40b82c3688c9460!2m2!1d2.3522219!2d48.856614!1m5!1m1!1s0x47a84e373f035901:0x42120465b5e3b70!2m2!1d13.404954!2d52.5200066!1m5!1m1!1s0x471ecc669a869f01:0x72f0be2a88ead3fc!2m2!1d21.0122287!2d52.2296756!1m5!1m1!1s0x4741c334d1d4cfc9:0x400c4290c1e1160!2m2!1d19.040235!2d47.497912!1m5!1m1!1s0x47c63fb5949a7755:0x6600fd4cb7c0af8d!2m2!1d4.9041389!2d52.3675734!3e0?entry=ttu https://www.google.com/maps/dir/Amsterdam,+Netherlands/Bruss...
The following sequence takes only 42: https://www.google.com/maps/dir/Amsterdam,+Netherlands/Brussels,+Belgium/Paris,+France/Budapest,+Hungary/Warsaw,+Poland/Berlin,+Germany/Amsterdam,+Netherlands/@49.8730413,6.4017263,6z/data=!3m1!4b1!4m48!4m47!1m5!1m1!1s0x47c63fb5949a7755:0x6600fd4cb7c0af8d!2m2!1d4.9041389!2d52.3675734!1m5!1m1!1s0x47c3a4ed73c76867:0xc18b3a66787302a7!2m2!1d4.3571696!2d50.8476424!1m5!1m1!1s0x47e66e1f06e2b70f:0x40b82c3688c9460!2m2!1d2.3522219!2d48.856614!1m5!1m1!1s0x4741c334d1d4cfc9:0x400c4290c1e1160!2m2!1d19.040235!2d47.497912!1m5!1m1!1s0x471ecc669a869f01:0x72f0be2a88ead3fc!2m2!1d21.0122287!2d52.2296756!1m5!1m1!1s0x47a84e373f035901:0x42120465b5e3b70!2m2!1d13.404954!2d52.5200066!1m5!1m1!1s0x47c63fb5949a7755:0x6600fd4cb7c0af8d!2m2!1d4.9041389!2d52.3675734!2m3!6e0!7e2!8j1691603220!3e0?entry=ttu https://www.google.com/maps/dir/Amsterdam,+Netherlands/Bruss...
I've not tested GPT-4 as I don't have any reason to pay for it, but I'd be interested to know if it has a similar problem. My hunch is that it will never be very good at solving graph-theoretic problems.