---
title: Can a Trip Itinerary Be One Click? — I Had an AI Plan Five Nights in Okinawa, Then Checked It on the Road
url: https://oosioo.com/en/p/%EC%97%AC%ED%96%89-%EC%9D%BC%EC%A0%95%EB%8F%84-%EB%94%B8%EA%B9%8D%EC%9D%B4-%EB%90%A0%EA%B9%8C
date: 2026-11-19T13:34:13+00:00
author: SYSOP
summary: An AI had already built a page for a five-night family road trip around Okinawa, with maps, a leg-by-leg driving table and a daily timetable. This time I generalised the job: a generator that takes the places you want to see, where each day ends and how many days you have, and lays out a route and timetable for each day around opening hours, travel times and visit lengths. Road times came once from OSRM and were cached; opening hours for 32 places came from each venue's official information. Given the same 21 places and lodging, the generator cut total driving from 745 to 705 minutes. Planned without opening hours, it put Busena Marine Park last in the day and overran closing by 45 minutes. A plan built on raw routing times had 8 h 45 min of driving on paper and 11 h 50 min once corrected. Plenty went wrong: four coordinates were 1 to 6 km off, a bug that served lunch twice wrongly flagged the existing plan as 45 minutes late, and the optimiser once called a plan two hours late for the airport acceptable. Working the existing page's 28 legs backwards, five didn't match its stated '× 1.35, round up to 5 minutes'. The 40 minutes saved came at the cost of a sunset; once told about sunset, the generator produced almost the same groupings as the existing plan. A table for checking real leg times after the trip is included.
---
# Can a Trip Itinerary Be One Click? — I Had an AI Plan Five Nights in Okinawa, Then Checked It on the Road

![The five-day Okinawa route the generator produced. Each day is a different colour, linking the aquarium, castle ruins and bridge in the north, the capes and theme village on the west coast, and the caves, sacred site and peace park in the south. On the right is one day's timetable](/uploads/6267af8ed86c8b4f.webp)

Planning a trip is fun and tedious in equal parts. Pinning the places you want to see on a map is the fun part. After that it turns into work. When does this aquarium close? How long from the castle ruins to the bridge? Where do we eat lunch? Is four places in a day too many? You open a map app and plot routes two points at a time, open each venue's website to check its hours, and add up times in a spreadsheet. Five days and twenty places will eat an evening.

I once handed that tedious part to an AI. I had it plan a whole five-night family trip to Okinawa, and it produced a web page with maps, a leg-by-leg driving table, a timetable for each day and a comparison of places to stay. It looked convincing. But convincing is not the same as correct. Are the drive times right? Does it ever arrive somewhere after closing? Was there a better order? This time I took that page apart, built a general itinerary generator that does the same job, and pitted the two against each other. Then I travel the itinerary for real and check the plan against what actually happened.

## What I set out to do

1. Pull the places, legs and times out of the existing itinerary page the AI had made, and turn them into numbers.
2. Build a **generator that lays out a route and timetable for each day** from a list of places to visit, where each day ends, whether you have a car, and how many days you have. Treat it as a small optimisation problem: cut driving while respecting opening hours, closing days, time spent at each place, and lunch.
3. Fetch travel times once from a public road-routing engine (OSRM), store them, and reuse them. Copy opening hours from each venue's official information and record the sources.
4. Feed the generator the same places and lodging as the existing plan and compare. Then turn the knobs: what breaks without opening hours, without the travel-time correction, or with one day fewer?
5. After the trip, compare actual leg times with the plan. That section gets filled in afterwards.

The research, data collection, generator, experiments, figures and the interactive playground below were all written and run by an AI agent on a laptop. The mistakes are collected under "Where it went wrong."

## The itinerary page that already existed

Start with the page that kicked this off. It is a six-day loop of one island by rental car. The first three nights are at a beachside lodging in Onna on the central west coast, with day trips to the north and the middle of the island. The last two nights move to the west coast of Naha for the south. Each day on the page had three things.

- **A map.** The day's route drawn along the roads, with numbered stops.
- **A leg-by-leg driving table.** Twenty-eight lines like "Churaumi Aquarium → Nakijin Castle ruins, Prefectural Route 115, 8.7 km, 30 min." About 408 km of driving in total.
- **A timetable.** A minute-by-minute schedule such as "10:00 Churaumi Aquarium (2 h) → 12:00 lunch at Ocean Expo Park → 13:00 to Nakijin Castle ruins (30 min)."

The page also said how the drive times were made: "road-route values with a 1.35× margin for Japanese speed limits and congestion." The routes came from OSRM, an open-source routing engine that computes the fastest car route over OpenStreetMap road data. The page said it multiplied those times by 1.35 and rounded up to the next 5 minutes.

It reads like a plan a person made. Each day goes to the farthest point first and picks things up on the way back to the lodging. Cape Manzamo and Senagajima are timed for sunset. There are rainy-day alternatives and driving tips. That made me more curious. Is this actually a good itinerary, or just a plausible one?

## What kind of problem is trip planning?

Turn itinerary planning into a computation and the skeleton is simpler than you'd expect.

- Each **place** has a time you spend there, an opening time and a last-entry time, and days it is closed.
- Each **day** has a start point and an end point, a start time, and a latest time to be back. On days you change lodging, the start and end differ.
- **Between every two places** there is a travel time.
- The goal is to **drive less, never arrive somewhere closed, and not get back late**. If time runs out, some places have to go.

Mathematicians call this the **team orienteering problem with time windows**. Orienteering is the sport where you use a map and compass to visit as many scored checkpoints as you can within a time limit. Unlike the travelling salesman problem, which visits everything, it also decides what to leave out. "Team" stands for the multiple days, and "time windows" for opening hours. With twenty places, the visiting orders alone number about 2.4 billion billion. Add the assignment of places to days and checking them all is out of the question. So you use a heuristic that finds a "good enough" answer quickly.

## Building the generator

The generator has three parts.

**Ingredient 1: a travel-time matrix.** The airport, two lodgings and 32 candidate places make 35 points. I fetched car travel times and distances for every pair from the public OSRM demo server **exactly once**. The demo server's terms are "no more than one request per second, no heavy use," so a single matrix request (35 × 35 cells) did it, and the result went to a file. The road shapes for drawing on the map have to be fetched one pair at a time, so those came slowly, 1.1 seconds apart. They are stored too, and the playground never calls the server.

Travel times get the same correction as the existing page: multiply the OSRM value by 1.35 and round up to 5 minutes. OSRM assumes you drive every road at a fixed speed. It has no traffic lights, no parking, no congestion, so it tends to come out short. Whether 1.35 is the right factor is examined later.

**Ingredient 2: opening hours for 32 places.** I took the 21 places on the existing plan and added candidates such as Katsuren Castle ruins, American Village, Nago Pineapple Park and Cape Hedo. For each one I copied from the official site (or a municipal or tourism-board page if there was none) the seasonal opening, closing and last-entry times, regular closing days, any official recommended visit length, and any "so many minutes by car from the airport" note. Capes, bridges and beaches that never close are marked always open. Rules that need an actual calendar date, such as "closed on the fourth Sunday of the month" or lunar-calendar closures, only raise a warning.

**A simulator that plays out one day.** Give it a day and a visiting order and it runs the clock. It starts at the departure time and adds travel. Arriving before opening means waiting; arriving after last entry is a violation; still being there at closing time is a violation. Once it is past noon, a 60-minute lunch is inserted. If the stop is somewhere you can eat, such as a market or a food court, the time spent there doubles as lunch. If getting back to the lodging runs past the day's deadline, that is a late return.

**Annealing to find the order.** First, places are inserted one at a time into whichever day and slot costs least, giving a starting plan. Then it is shaken at random, a little at a time. Move a place to another day, swap two places, reverse a stretch within a day, drop a place or put one back. Improvements are accepted. Changes for the worse are accepted occasionally early on, and less and less as it goes. This is **simulated annealing**, named after cooling metal slowly. The score adds driving minutes, waiting for opening, violation penalties, late returns and penalties for places left out. Ten random starts of 30,000 shakes each took 1.7 seconds.

## Head to head with the existing plan

To keep it fair, the conditions match the existing page. The places are the 21 the plan visits, with the visit lengths written in its timetable. The lodging, and each day's start and end points and times, are the same. The first day is only an evening drive to the lodging, so I left it out and compared days two to six. Opening hours use the November timetables, the same month as the existing plan. The existing plan went through the same simulator and was scored by the same rules.

![Left: the existing page's routes. Right: the generator's. The northern day and the west-coast day group the same places; they split in the south. The existing plan gives the southeast caves and sacred site one day, and Shuri Castle, the Peace Memorial Park, Cape Kyan and Senagajima another. The generator keeps the day that starts at the airport light, with Senagajima, Itoman and the outlet, and folds the southeast and southwest into one loop the next day](/uploads/80b810de33b6b551.webp)

| | Existing page | Generator |
|---|---|---|
| Total driving (five days) | 745 min (12 h 25 min) | **705 min (11 h 45 min)** |
| Violations (closed, past closing, late return) | 0 | 0 |
| Places fitted | 21 | 21 |
| Time back each day | 17:30 · 18:20 · 17:15 · 18:15 · 15:25 | 18:15 · 17:40 · 17:05 · 18:05 · 15:10 |

The result is both underwhelming and interesting.

- **The existing plan had zero violations.** It never visits a closed place, never misses a last entry, never gets back late. Some of that comes for free, since it uses the same travel-time skeleton (OSRM × 1.35), but for a timetable stitched together by hand it was clean.
- **The generator saved 40 minutes.** That is just over 5%. The northern day (Churaumi, Nakijin, Kouri, Tinu) and the west-coast day (Busena, Cape Zanpa, Ryukyu Mura, Manzamo) came out as exactly the same four places as the existing plan, only in a different order. On those days geography decides the answer, whoever does the planning.
- **The difference is in the south.** The existing plan does the southeast (Okinawa World, Ou Island, Hamabe no Chaya, Chinen Cape, Sefa-utaki) on the day it starts at the airport, then goes from Shuri Castle down the southwest coast the next day. The generator keeps the airport day light with Senagajima, Itoman and the outlet, all next to the airport, and does the southeast plus the Peace Memorial Park and Cape Kyan as one loop the next day. Shuri Castle moves to the last day, next to Kokusai-dori. The result is one packed day with seven stops.
- **It wobbles a little with the seed.** Over eight different random seeds, six runs gave 705 minutes and the other two 710 and 725. Annealing does not guarantee the optimum, but at this size it lands on almost the same answer.

So the generator won, but not by much. The real story is what those 40 minutes were traded for, and that is under "Where it went wrong."

## Playground: plan your own

Pick the places you want below and press "Plan it." Each day's route appears on the map, with a timetable underneath. The default is the existing plan's 21 places. You can change the number of days, the first day's weekday, which month's opening hours to use, rental car versus public transport (rough), the travel-time factor, and where each day ends. The number next to each place is minutes spent there. Violations get a red tag, and closures that depend on the date (fourth Sunday of the month, lunar calendar) get a yellow "check date" tag. The line below shows, for comparison, how a "nearest first, in order" plan does under the same conditions. Travel times are the stored OSRM values, so the playground never calls an outside server.

```map /embed/trip-plan-en.html 4:3
Trip itinerary generator: pick places and get a route and timetable for each day (map tiles © Esri, routes © OpenStreetMap contributors, OSRM)
```

## Turning the knobs

![Left: total driving and violations by method for five days and 21 places. Existing plan 745 min, 0 violations; nearest-first 785 min, 1; planned without opening hours 705 min, 2; planned without the correction 710 min, 2; generator 705 min, 0. Right: places fitted when there is one day fewer. Nearest-first 15, without opening hours 18 with 2 violations, generator 18 with none](/uploads/0cae08db955c7ae0.webp)

**Without opening hours.** I ran the same generator with opening hours removed, as if every place were open 24 hours, then scored the result against the real timetables. Driving stayed at 705 minutes, but two violations appeared. One was Busena Marine Park. The west-coast day started at Manzamo and put Busena last, arriving at 16:45. From November to March the underwater observatory's last entry is 17:00. You get through the gate, but 90 minutes there runs 45 minutes past closing. The other was Okinawa World, placed last of seven southern stops with a 16:15 arrival; last entry is 16:00. Both spots look reasonable on a map. Busena is right next to the lodging, so drop in on the way back. Loop the south and finish at the cave. Without the timetable, a person would plan it the same way.

![Top: the itinerary planned without opening hours, scored against the real timetables. Busena Marine Park at the end of day 3 (arrives 16:45, last entry 17:00, still there at closing) and Okinawa World at the end of day 5 (arrives 16:15, last entry 16:00) are marked red. Bottom: the itinerary planned with opening hours. Busena moved to the first slot of the morning, and Okinawa World to the first slot of the southern day](/uploads/7134dd9fb72887e5.webp)

With opening hours included, the generator moves each of them to **first stop of the day**. Driving stays at 705 minutes. Same distance, violations gone.

**Without the correction (× 1.0).** Trusting the raw OSRM values gives a plan with 525 minutes (8 h 45 min) of driving on paper. Measure that plan again at × 1.35 and it becomes 710 minutes (11 h 50 min), with days arriving 50 and 35 minutes late. A day plan cannot absorb 30% more driving. Go the other way and plan at a generous × 1.6, and you get 840 minutes on paper, which is 730 at × 1.35. The more slack you build in, the looser the routing gets.

**One day fewer.** I cut the five days to four and required the last day to reach the airport by 16:00. Not all 21 places fit. The generator kept 18 and dropped Senagajima, Shuri Castle and the outlet. The "nearest first, in order" method stopped at 15, and the six it dropped were Ou Island, Hamabe no Chaya, Chinen Cape, Sefa-utaki, the Peace Memorial Park and Cape Kyan, the entire southern cluster. Nearest-first looks efficient day by day, but whatever is left for the end is scattered far away and gets thrown out wholesale. That is why choosing what to drop is the heart of the orienteering problem.

**Without a car.** Public transport is approximated without timetables as "car time × 1.8 plus a 15-minute wait per leg." Total travel rose to 1,260 minutes (21 hours), and Churaumi, Senagajima and Okinawa World dropped out of the 21. This is a rough estimate. With no bus timetables in it, read only the order of magnitude: without a car, plan on cutting the list by about half.

## Where it went wrong

This is the longest section of this episode. It lists, in order, the values that were actually wrong while building the generator, the inconsistencies found in the existing page, and whether the "winning" result really won.

### 1. Four sets of coordinates were off by 1 to 6 km

While adding candidate places, the AI wrote down the latitude and longitude of the 11 new ones from memory. When the first matrix came back, one value in OSRM's "distance to nearest road" looked odd: Bios Hill, at 885 m. Most others were within 100 m. So I checked all 32 against OpenStreetMap's place search (Nominatim).

| Place | Off by |
|---|---|
| Bios no Oka (Bios Hill) | **6.1 km** |
| DMM Kariyushi Aquarium | 2.6 km |
| Okashigoten Yomitan main store | 2.2 km |
| Orion Happy Park | 1.2 km |

Bios Hill was pinned 6 km from where it really is. DMM Kariyushi Aquarium sits inside a shopping mall south of the airport but was pinned 2.6 km north. The Okashigoten main store is right next to Cape Zanpa but was 2 km south. All 21 places from the existing plan were within 300 m, because their coordinates came over from the existing page, where they had already been checked once. Every error was in a place added this time.

A distance to road of 885 m raises a flag. But a coordinate that is 6 km wrong can still sit right next to some other road, and then the distance to road comes out short. DMM's was 47 m and Okashigoten's 37 m. Looking at snapping distance alone catches only one of the four. In the end I added a separate check against the place search and fetched the matrix again with corrected coordinates.

### 2. It served lunch twice

The first time the existing plan was scored, one violation came up: the day from Shuri Castle along the southwest coast reached the lodging **45 minutes late**. The existing page's timetable for that day ends with an 18:25 arrival. One of them was wrong.

Following the timetable line by line, the culprit was the simulator. Leaving the Peace Memorial Park, it reaches Cape Kyan at 12:45. The simulator decided "it's past noon and no lunch yet" and inserted a 60-minute lunch at Cape Kyan. But the next stop is Michi-no-Eki Itoman, where the existing plan eats lunch at the fish market. It had served lunch twice. The fix was a rule: "if a place to eat is coming up, wait until 13:00." The violation disappeared and the arrival came out at 18:15, within 10 minutes of the page.

There was another bug of the same family. The northern day should end at 17:10 but came out at 18:30. The existing plan gives Churaumi Aquarium 180 minutes, which include "lunch at Ocean Expo Park." The simulator did not count the aquarium as a place to eat, so it inserted lunch again at the next stop, Nakijin Castle ruins. I marked the aquarium and park restaurants as a place to eat, and made any stay that spans noon count as lunch. After that it came out at 17:30. The remaining 20 minutes are the 15-minute Kouri Bridge → Tinu Beach leg that the existing timetable left out, plus 5 minutes of rounding (see 5 below).

Had the comparison been run with the broken scorer, the sentence would have been "the existing plan has a violation and the generator has none." The existing plan was not wrong; the scorer was. Before using your own model to mark down someone else's plan, you need a step that lines up, row by row, the times the plan claims with the times your model recomputes.

### 3. It called a plan that reaches the airport two hours late "fine"

The first result of the four-day experiment fitted 20 of 21 places with two violations. Opening them up, the last day reached the airport at **17:55**, on a day that has to be at the airport by 16:00. That is 1 hour 55 minutes late. The day before also got back to the lodging 30 minutes late. On a day with a fixed airport time, that is not an itinerary.

The cause was the size of the penalties. Dropping a place cost 500 points; a late return cost 4 points a minute. Even 115 minutes late was only 460 points, so "better to get back late than drop a place" was the mathematically correct answer. The machine did what it was told. When I changed the penalty to 4 points a minute for the first 15 minutes and 40 points a minute after that, the generator dropped Senagajima, Shuri Castle and the outlet and reached the airport at 15:45.

An optimiser respects only what is written in its penalty table. "You can never miss the airport time" is common sense to a person, but unless you write it down as a number the machine doesn't know it. That is why the existing plan put the final day's airport time in bold.

### 4. I lumped the seasons into two

The first version of the playground picked opening hours from just two timetables, April–September and October–March. While organising the research, it became clear that every place draws its seasons differently.

- Busena Marine Park: winter hours run November to March (last entry 17:00)
- Sefa-utaki and Cape Manzamo: winter hours run November to February
- Shurijo Castle Park: winter hours run December to March, so November is on summer hours and it stays open until 19:00
- Nakijin Castle ruins: open until 19:00 only from May to August; 18:00 the rest of the year

Lump it into "October–March" and Busena in October and Shuri Castle in November both get the wrong timetable. The playground now lets you pick a month (1 to 12) and looks up each place's schedule for that month. Places that vary by weekday are handled too: Hamabe no Chaya stays open an hour longer at weekends, and the prefectural museum is open until 20:00 on Fridays and Saturdays and closed on Mondays.

### 5. The existing page's numbers didn't match its own description

The existing page said "OSRM value × 1.35, rounded up to 5 minutes." The distances on all 28 legs matched OSRM to 0.1 km, so it used the same routes. But working the times backwards, only 23 of the 28 legs followed the description.

![Page estimate (vertical) against OSRM route time (horizontal) for the existing page's 28 legs. Most sit on the × 1.35 line. Three legs, Naha Airport → Onna lodging, Tinu Beach → lodging and Cape Zanpa → Ryukyu Mura, were rounded to nearest rather than up. Two, lodging → Shuri Castle and Cape Kyan → Michi-no-Eki Itoman, carry 5 minutes more than the formula](/uploads/fe4d24762ade5d03.webp)

- **Three legs were rounded to the nearest 5, not up.** Airport → Onna lodging: OSRM 70.8 min × 1.35 = 95.6 min, which rounds up to 100, but the page says 95 (1 h 35 min). Tinu Beach → lodging (65.2 → 65) and Cape Zanpa → Ryukyu Mura (25.2 → 25) are the same. Calling the routing engine again gave the same values.
- **Two legs are 5 minutes longer than the formula.** West Naha lodging → Shuri Castle (19.6 min → page 25) and Cape Kyan → Michi-no-Eki Itoman (20.0 → 25). It looks like extra slack was added by hand for city driving. The page says nothing about it.
- **One leg disagreed with itself in three places.** For Kouri Bridge → Tinu Beach, the driving table's description says "5 minutes along the north shore of the island" and its time column says "15 min." The timetable leaves the drive out entirely: it reaches Kouri Bridge at 15:05, spends "Kouri Bridge and Tinu Beach (1 h)," and leaves for the lodging at 16:05.

Each one is a five-minute matter. Still, "the numbers don't match the method described" is a pattern you see often in AI-made documents. Instead of carrying the computed result straight through, something gets adjusted along the way, and the adjustment never makes it into the description. Measuring the real times on the trip will show which version was closer.

### 6. Is 1.35 right? Checked against ten official notes

The 1.35 factor was the existing page's choice, and the generator kept it. To see whether it holds up, I collected the "about so many minutes by car from Naha Airport" notes on venues' official sites. Ten places gave one.

![Minutes from Naha Airport for ten places. Grey is raw OSRM, teal is × 1.35, and the red diamonds are the venues' official notes. Churaumi: official 120 · OSRM 118 · × 1.35 159. Kouri Bridge 90 · 102 · 138, Okinawa World 30 · 30 · 40, Senagajima 10 · 10 · 14: the official figure is close to raw OSRM. But DMM Kariyushi Aquarium is 20 · 11 · 15 and Katsuren Castle ruins 80 · 52 · 70: even × 1.35 falls short](/uploads/7996dfe640833b78.webp)

| Place | Official | Raw OSRM | × 1.35 |
|---|---|---|---|
| Churaumi Aquarium (expressway) | 120 min | 118 min | 159 min |
| Kouri Bridge (expressway) | 90 min | 102 min | 138 min |
| Nago Pineapple Park (expressway) | 90 min | 86 min | 117 min |
| Okinawa World | 30 min | 30 min | 40 min |
| Senagajima | 10 min | 10 min | 14 min |
| Sefa-utaki | 50 min | 42 min | 57 min |
| Bios no Oka | 75 min | 57 min | 76 min |
| Katsuren Castle ruins | 80 min | 52 min | 70 min |
| DMM Kariyushi Aquarium | 20 min | 11 min | 15 min |
| Nakijin Castle ruins | 165 min | 109 min | 148 min |

The cases split in two. For **long expressway trips**, the official figure is almost the same as raw OSRM: Churaumi is 120 against 118. Multiplying by 1.35 inflates it by nearly 40 minutes. **Short trips through town** go the other way. For the DMM aquarium, OSRM says 11 minutes and the official note says 20. Even 1.35 is not enough. The road calculation has no time for getting out of the airport and into a mall car park. The median of official ÷ raw OSRM was 1.11.

But the official notes don't share a standard either. Nakijin Castle's 165 minutes appears to be by ordinary roads, without the expressway, while Kouri Bridge, also in the north, gives 90 minutes by expressway. Some include slack, some are free-flowing times. So this table cannot fix a "correct factor." It shows one thing: **no single factor can fit both long expressway runs and short city hops.** The existing plan's extra 5 minutes on two city legs probably came from the same instinct. Turn the playground's correction knob between 1.0 and 1.6 to see how much the plan shifts. The real answer will come from the numbers measured on the road.

### 7. "Verified" opening hours weren't all verified

I tried to fill in all 32 places' hours from official sources and couldn't.

- **Ryukyu Mura**'s official site refused automated access. 9:30–17:00 (last entry 16:00) is copied from the official site's wording as it appeared in search results. Other listings give a 16:30 last entry.
- **Busena Marine Park**'s official site gives only last-entry times. Closing was estimated as "last entry + 30 minutes." The "45 minutes past closing" in the experiment above rests on that estimate. The 17:00 last entry is official, so "you get in, but it may close before you finish 90 minutes" is solid.
- **Michi-no-Eki Itoman**'s hours split between 9:00–18:00 and 9:30–19:00 depending on the source. **Hamabe no Chaya**'s official site blocked automated access, and the operator's Japanese and English pages gave different weekend hours.
- **Cape Manzamo** officially opens 8:00–19:00 from November to February. The existing page's "open until 19:00 in November" copied that number. But the same official site says viewing the cliffs is **"until sunset."** 19:00 is the hours for enquiries at the facility. After dark there is nothing to see at Manzamo, even with the gate open. The existing plan put Manzamo at sunset, so in practice there was no problem. But anyone who trusted "until 19:00" and slotted it in late in the evening would be standing on a dark cliff.
- **Temporary notices sit outside the regular timetable.** Even while I was researching, several venues had posted notices that differed from their regular hours: repairs closing the inner areas for a stretch, the whole site closing on particular days, opening pushed back to midday for an event. The generator knows only regular timetables. Checking each venue's notices right before you leave is still a job for a person.

### 8. The 40 minutes saved were traded for sunset

Look again at the 40 minutes the generator saved. The west-coast day got lucky. The generator also put Manzamo last, there from 16:00 to 17:50. It sits on the way back to the lodging, so distance alone put it in the final slot. The southwest was different. The existing plan stays at Senagajima's Umikaji Terrace from late afternoon until 18:00 to watch the sun go down over the western sea. The generator moved Senagajima to **10:15–13:30** on the day that starts at the airport. On distance, that is the right call; it is right next to the airport. But Senagajima in the morning is just a row of shops beside a runway. A good part of the 40 minutes came from here.

The generator had no concept of "sunset." So I added a soft condition to Manzamo and Senagajima, "it's good to be there overlapping 17:00–18:00," with 1 penalty point per minute of miss, and ran it again. The result:

- Total driving **720 minutes** (15 more than the 705 without the condition, still 25 less than the existing plan)
- Northern day: Churaumi, Nakijin, Kouri, Tinu, the same four as the existing plan
- West-coast day: Busena, Ryukyu Mura, Cape Zanpa, **Manzamo (last)**, the same four, with Manzamo at the end
- South: Senagajima returned to the **end of its day, 14:25–17:40**, after the outlet

Tell it about sunset and the generator's plan walked over to the existing plan. The existing plan's odd-looking choices, going to the farthest place first and leaving sunset spots for the end, weren't inefficiency. They served a goal that wasn't written in the table. An optimiser that minimises driving doesn't know what nobody told it. And people often forget that they have to tell it.

### 9. Even "the same conditions" was a little wrong

The comparison used the existing plan's visit lengths as they stood, but some interpretation crept in. Cape Zanpa and the Okashigoten main store are one 60-minute stop in the existing plan, so they stayed together. The "1 hour" at Kouri Bridge and Tinu Beach was split into 30 minutes each. Senagajima's stay is 195 minutes as in the timetable (including the hot spring and sunset). The airport legs on the existing plan's first evening and fourth morning were left out of the comparison. The moment you transcribe a plan like this, it is already "the existing plan as my model understands it." The double-lunch bug in point 2 came out of exactly that translation.

## The people who do this for real

Trip planning is an old problem on the computing side.

- **The tourist trip design problem (TTDP).** In 2014, Greek researchers Gavalas and colleagues published a survey of algorithms for tourist trip design in the *Journal of Heuristics*. It covers dozens of variants with interests, opening hours, budgets and modes of transport. In 2016, Gunawan, Lau and Vansteenwegen surveyed the variants and applications of the orienteering problem again in the *European Journal of Operational Research*. Time windows, multi-day problems and tourist itineraries all belong to this lineage.
- **The City Trip Planner.** In 2011, Vansteenwegen's group at KU Leuven in Belgium published a web itinerary generator for five Belgian cities (*Expert Systems with Applications*). It took your interests, chose attractions, and built multi-day routes on the fly with opening hours and a **lunch break**. Its skeleton is almost the same as this generator's. It already existed in 2011.
- **Language models and itineraries.** The TravelPlanner benchmark (arXiv 2402.01622), from researchers at Ohio State University and elsewhere, gave 1,225 travel requests to language-model agents and checked whether the plans kept every budget, transport and accommodation constraint. In the paper's first experiments, a GPT-4-class model met all constraints in 0.6% of plans. That led to approaches where the language model doesn't write the itinerary itself but organises the constraints and hands them to a classical automated planner (TRIP-PAL, arXiv 2406.10196, and others). This project uses the same division of labour. The AI wrote the code, gathered the data and found the mistakes; the order came from a simulated-annealing optimiser.
- **Map and travel services.** Many services are adding conversational itinerary features. They look like chat, but matching travel times and opening hours is usually done by the map company's routing engine and place database. Whoever holds live traffic and up-to-date hours and temporary closures holds the real asset here, and that is exactly where this generator is weakest.

## What it can't do

- **No live traffic.** OSRM knows nothing about congestion. Coast roads on a holiday, Naha at rush hour and a rainy day all get the same time. A blanket 1.35 factor is all there is.
- **No parking or walking.** The walk from the aquarium car park to the entrance, or from the Sefa-utaki ticket office to the shrine, is folded into the visit length.
- **No temporary closures or special hours.** It knows only regular timetables. Fourth-Sunday and lunar-calendar closures only raise warnings, since there are no dates.
- **Public transport is a rough estimate.** No bus timetables or transfers.
- **It doesn't know your taste.** Sunsets, when a child gets tired, going indoors when it rains, a second beach in one day being one too many. It only knows these if they are written into the penalty table, and once you've written them down you have already half-planned the trip yourself.
- **No guarantee of the optimum.** Depending on the seed, annealing landed between 705 and 725 minutes. That's good enough at this size, but with dozens of places it would need a more careful search.
- **Some opening hours weren't officially confirmed.** Ryukyu Mura, Hamabe no Chaya, Michi-no-Eki Itoman, Ayahashi-kan, and Busena's closing time (point 7).

## Checking it after the trip

[To be filled in after the trip: actual leg times vs plan, places skipped, rain/traffic factors]

"Planned" is the existing page's estimate (OSRM × 1.35, with some hand adjustment). "Raw OSRM" is the road calculation for the same leg. The "actual" column will be filled in from driving logs and photo timestamps after the trip.

| Day | Leg | Distance | Raw OSRM | Planned | Actual | Difference |
|---|---|---|---|---|---|---|
| 1 | Naha Airport → Onna coast lodging | 59.8 km | 71 min | 95 min | | |
| 2 | Onna coast lodging → Churaumi Aquarium | 34.1 km | 54 min | 75 min | | |
| 2 | Churaumi Aquarium → Nakijin Castle ruins | 8.7 km | 19 min | 30 min | | |
| 2 | Nakijin Castle ruins → Kouri Bridge | 14.8 km | 26 min | 35 min | | |
| 2 | Kouri Bridge → Tinu Beach | 4.6 km | 9 min | 15 min | | |
| 2 | Tinu Beach → Onna coast lodging | 30.7 km | 48 min | 65 min | | |
| 3 | Onna coast lodging → Busena Marine Park | 1.4 km | 4 min | 5 min | | |
| 3 | Busena Marine Park → Cape Zanpa | 31.6 km | 51 min | 70 min | | |
| 3 | Cape Zanpa → Ryukyu Mura | 9.3 km | 19 min | 25 min | | |
| 3 | Ryukyu Mura → Cape Manzamo | 13.1 km | 19 min | 30 min | | |
| 3 | Cape Manzamo → Onna coast lodging | 11.1 km | 18 min | 25 min | | |
| 4 | Onna coast lodging → Naha Airport | 60.1 km | 71 min | 100 min | | |
| 4 | Naha Airport → Okinawa World | 18.2 km | 30 min | 45 min | | |
| 4 | Okinawa World → Ou Island | 3.5 km | 8 min | 15 min | | |
| 4 | Ou Island → Hamabe no Chaya | 2.1 km | 8 min | 15 min | | |
| 4 | Hamabe no Chaya → Chinen Cape Park | 7.5 km | 15 min | 20 min | | |
| 4 | Chinen Cape Park → Sefa-utaki | 0.8 km | 3 min | 5 min | | |
| 4 | Sefa-utaki → West Naha lodging | 23.0 km | 39 min | 55 min | | |
| 5 | West Naha lodging → Shurijo Castle Park | 6.6 km | 15 min | 25 min | | |
| 5 | Shurijo Castle Park → Peace Memorial Park | 16.4 km | 30 min | 45 min | | |
| 5 | Peace Memorial Park → Cape Kyan | 9.0 km | 18 min | 25 min | | |
| 5 | Cape Kyan → Michi-no-Eki Itoman | 7.6 km | 15 min | 25 min | | |
| 5 | Michi-no-Eki Itoman → Senagajima | 5.9 km | 10 min | 15 min | | |
| 5 | Senagajima → West Naha lodging | 8.0 km | 15 min | 25 min | | |
| 6 | West Naha lodging → Naminoue Shrine | 0.8 km | 2 min | 5 min on foot | | |
| 6 | Naminoue Shrine → Tsuboya & Kokusai-dori | 2.9 km | 7 min | 10 min | | |
| 6 | Tsuboya & Kokusai-dori → Ashibinaa Outlet | 9.1 km | 16 min | 25 min | | |
| 6 | Ashibinaa Outlet → Naha Airport | 6.0 km | 10 min | 15 min | | |

[To be filled in after the trip: places skipped or changed from the plan and why, whether opening hours, lack of time or weather]

[To be filled in after the trip: unplanned factors such as rain, congestion and parking and their effect; a summary by leg type (long expressway / short city) of whether the 1.35 correction held]

## So, does it add up?

Building the generator was close to a one-click job. From data collection to playground took a few hours. Finding and organising 32 venues' opening hours on official sites by hand would have taken a whole evening on its own. Under the same conditions it produced a route 40 minutes shorter than the existing plan in 1.7 seconds, and it showed straight away what mistakes you make without opening hours and what you have to drop when you lose a day.

But the most useful sentence from this episode came from where the generator lost, not where it won. The 40 minutes it saved were traded for a sunset, and once told about the sunset, the machine walked over to the person's plan. Along the way a coordinate was 6 km off, the scorer served lunch twice, and the optimiser called a plan two hours late for the airport fine. All three are mistakes that don't show in the result. They were caught only because the generator's times were checked line by line against the existing plan.

A trip itinerary mixes "calculation" with "purpose." The calculation can be one click. The purpose has to be spelled out. And the final check, whether 1.35 was the right factor, gets measured from the driver's seat. Those numbers go into the table above after the trip.

