Deep dive · Giti · ESPADPALM

Itinerary optimization algorithms: tourist trip design as an orienteering problem, and what language models add and break

Sequencing a day of visits is an old, well-solved operations-research problem. The unsolved part is the interface between what a traveller says and what a solver can optimise.

What changed

  • : Removed benchmark statistics repeated from our AI itinerary planning guide so this piece stays on the algorithms, and updated the formal-verification study to its NAACL 2025 publication.

Key takeaways

  • Tourist trip design is formulated as the orienteering problem with time windows: choose and order scored places to maximise value within a time budget and opening hours.
  • The orienteering problem is NP-hard, but fast heuristics such as iterated local search were developed specifically for interactive tourist-guide use.
  • Language models asked to sequence trips directly fail on feasibility, and their accuracy falls sharply as the number of cities grows.
  • Language models add real value upstream of the solver, by turning free-text preferences into scores, candidate sets and constraints.
  • The robust design is a division of labour: the model interprets and explains, the optimiser sequences, and an independent checker verifies.

Most of the public discussion of AI travel planners treats itinerary construction as a language task. It is not, or at least not mainly. Deciding which places to visit, in what order and at what time, given opening hours, travel times and a limited day, is a combinatorial optimisation problem with a research literature going back to the 1980s. The established itinerary optimization algorithms for it are fast and well understood. What the classical work never had was a good way to learn what a particular traveller values from a paragraph of free text, and that is where language models genuinely change the picture. This piece sets out the formulation, the algorithm families that solve it, and the boundary where language models help and where they quietly break things.

For the wider architecture of a travel planner, including retrieval and verification, see our pillar guide to AI itinerary planning.

From orienteering races to tourist trips

The orienteering problem takes its name from the sport. Competitors start at a control point, visit as many scored checkpoints as they can within a fixed time and must finish at the end point; the winner collects the most points. In its 1987 formulation, the problem is to choose a subset of locations and a route through them that maximises total score subject to the time limit[1]. Unlike the travelling salesperson problem, not every location has to be visited. Selection and routing are decided together, which is exactly the shape of a sightseeing day: there are always more good places than hours.

The orienteering problem is NP-hard, so exact solutions become impractical as instances grow, and most practical work relies on heuristics[2]. Surveys of the area record a family of variants: the team orienteering problem, where several routes are built at once; the version with time windows, where each location can only be visited in a given interval; and their combination[2]. The tourist trip design problem, as the tourism literature calls it, is built on these variants, and a dedicated survey of algorithmic approaches to it catalogues the extensions that real trips need[3].

The orienteering problem with time windows, in plain terms

The model that sits under most day-by-day itineraries can be stated without symbols.

  • Nodes. Candidate places, plus a start and end point (often the hotel). Each place has a score representing its value to this traveller, a visit duration and one or more opening windows.
  • Edges. Travel times between every pair of nodes, by the traveller's chosen modes.
  • Routes. One route per day, starting and ending at the given points. Multiple days make it a team problem, with each day acting as a team member[2].
  • Constraints. Each route fits within the day's available time; each visit starts within an opening window of that place; each place is visited at most once across the trip.
  • Objective. Maximise the total score of visited places.

Real trips add more. The tourist trip design survey discusses travel times that depend on the time of day, multiple resource limits such as a monetary budget alongside time, mandatory visits, and limits on how many places of a given category may be included, so that a day is not four churches in a row[3]. A later survey of orienteering variants adds stochastic travel and visit times, generalised scores that depend on several attributes of a place, and clustered and arc-based versions, with tourist trip design listed among the leading applications[4].

Each extension costs something in solver speed, so the modelling choice is a product decision. Time-dependent travel times matter in dense cities with heavy congestion; category limits matter for everyone; stochastic durations matter mainly for disruption-prone plans, which we cover in our piece on travel disruption replanning.

Itinerary optimization algorithms that work in practice

The algorithm families below are drawn from the survey literature[2][3][4]. The assessment of fit for interactive consumer use is our editorial judgement.

FamilyHow it worksStrengthWeaknessFit for interactive travel apps
Exact methods (branch-and-bound, branch-and-cut)Search the solution space with bounds that prune provably worse branchesProven optimumRun time grows quickly with instance sizeSmall instances, offline benchmarking of heuristics
Greedy constructionInsert the place with the best score-to-cost ratio until nothing fitsVery fast, simple to explainEasily trapped in poor solutionsInitial solution or fallback only
Iterated local searchAlternate an insertion step that adds places with a shake step that removes some to escape local optimaFast, good quality, easy to adaptNeeds tuning; no optimality proofStrong default for day plans and quick repairs
Tabu search, variable neighbourhood searchLocal moves with memory or changing neighbourhoodsGood quality on harder variantsMore complex to engineerMulti-day trips with many side constraints
Population methods (genetic, ant colony, particle swarm)Evolve or sample many candidate solutions at onceFlexible objectives, diversity of solutionsSlower, many parametersOffline generation of alternatives, multi-objective trade-offs

Iterated local search deserves particular attention because it was designed for this use. Its authors developed it for the team orienteering problem with time windows explicitly with mobile tourist guides in mind, where an answer is needed quickly, combining a simple insertion step with a shake step that removes visits to escape local optima[5]. For a product team, that matters more than squeezing out the last fraction of solution quality: travellers notice a plan that takes too long to appear, and they rarely notice a score that is slightly below optimal.

The orienteering problem never needed a language model; it needed someone to tell it what each place is worth to this traveller.

What language models add

The weakest link in classical tourist trip design was always the scores. Early systems derived them from questionnaires or category weights, which flattened the traveller into a handful of sliders. Language models change this at several points upstream of the solver.

  • Preference extraction. A paragraph such as "we like food markets, hate queues, travelling with a seven-year-old" can be turned into weights over place attributes, avoidance rules and pace limits.
  • Candidate selection. Instead of scoring every place in a city, a model can propose a relevant shortlist that the solver then sequences. The ITINERA system follows this pattern: a model decomposes the request and selects candidate points of interest, a cluster-aware spatial optimiser orders them, and the model writes the final itinerary[6].
  • Constraint formalisation. A model can translate a request into formal constraints for a solver. In one study, published at NAACL 2025, the model only wrote the constraints and a satisfiability solver did the reasoning; the same setup could also detect requests that no plan can satisfy and propose which constraints to relax[7]. This is the orienteering pattern in another guise: the model defines the instance, the solver searches it.
  • Explanation. Once a plan is fixed, a model is good at explaining why the solver chose it, which travellers value more than a raw score.

What language models break

Asking a model to do the solver's job produces predictable failures. Planning benchmarks built for language agents, TravelPlanner[8] and the trip-planning task of NATURAL PLAN[9], both find that models rarely return a complete plan that satisfies every constraint, and that accuracy falls sharply as the number of cities grows; the figures are discussed in our AI itinerary planning guide. The TravelPlanner paper is available in the ICML 2024 proceedings. The failure grows with exactly the dimension that defines the orienteering problem: the number of choices to be combined. A solver explores alternative selections and orderings and discards those that break a time window or the day's budget; a model that writes a plan in one pass performs no such search unless one is built around it.

Three subtler failures matter for hybrid designs too.

  1. Invented nodes. A model that proposes candidates can propose places that do not exist or no longer operate. The solver will happily schedule them. Candidate lists must be checked against the data store before optimisation.
  2. Unstable scores. The same request scored twice can yield different weights. If scores feed an optimiser, small changes can flip the plan. Caching extracted preferences per traveller and asking for confirmation stabilises results.
  3. Self-certification. A model asked whether its own plan is feasible tends to agree. The LLM-Modulo position argues that models should generate candidates and approximate knowledge, while independent verifiers make the feasibility call[10]. The position paper in the ICML proceedings is a useful read for any team tempted to skip the verifier.

A working division of labour

Putting this together, the split we recommend for production systems looks like this.

SubproblemLanguage modelOptimiser or rule engine
Understanding the requestOwns it; confirms back to the travellerNone
Candidate placesProposes and explains relevanceFilters against current data; rejects unknown places
Scores and weightsInfers from text and historyNormalises; holds stable across runs
Opening windows, travel times, budgetNoneOwns them, from structured data
Sequencing and day splitNoneOwns it (iterated local search or similar)
Feasibility checkNoneOwns it, independently of the generator
Narrative and reasonsWrites from the verified plan onlySupplies the facts it may use

This is the arrangement we are building into Giti, where each day of the plan comes with times, a map, costs and restaurants: the language layer listens and explains, and the timing and routing are left to machinery that can be checked.

Notes for builders

A few practical points that rarely appear in papers but decide quality in production.

  • Travel time matrices are the expensive input. Pre-compute them per city and mode, and refresh them on a schedule; time-of-day effects are worth modelling only where congestion is large.
  • Visit durations need priors. A model can estimate how long a family spends in a museum, but treat its estimate as a prior, then correct it with observed behaviour where you have it.
  • Diversity is a constraint, not an afterthought. Category limits per day prevent the most common complaint about generated itineraries, repetitiveness[3].
  • Keep slack. A plan packed to the minute is optimal on paper and fragile in practice. Reserve slack per day so the repair step in a disruption has room to work.
  • Benchmark heuristics offline. Run exact methods on small instances to measure how far your heuristic falls short, then decide whether the gap matters.

The broader engineering picture, from retrieval to evaluation, is gathered in our travel planning AI topic hub.

Frequently asked questions

Why model a sightseeing itinerary as an orienteering problem rather than a travelling salesperson problem?

Because a traveller cannot visit everything. The travelling salesperson problem visits every node; the orienteering problem chooses which nodes to visit and in what order to maximise value within a time limit. That matches a sightseeing day, where selection and sequencing interact. Opening hours add time windows, and multi-day trips become the team variant with one route per day.

Which algorithm should a travel app use to sequence a day of visits?

Iterated local search is a strong default. It was developed for the team orienteering problem with time windows with mobile tourist guides in mind, returns good solutions quickly and is easy to adapt to new constraints. Use greedy construction for a first solution, and exact methods offline on small instances to measure how far your heuristic is from the optimum.

Can a language model replace the optimisation step?

No. Benchmarks show language agents rarely produce plans that satisfy every constraint, and their accuracy drops sharply as the number of cities or stops grows. Models are valuable upstream, turning free-text preferences into scores and candidate lists, and downstream, explaining the plan. Sequencing and feasibility checking should be handled by an optimiser and an independent rule engine.

How do we turn vague traveller preferences into solver inputs?

Use the model to extract weights over place attributes, avoidance rules, pace and walking limits, and category caps, then show them back to the traveller for confirmation. Cache the confirmed preferences so repeated runs use the same values. Normalise scores before optimisation, because unstable weights between calls can flip the chosen plan even when nothing about the trip has changed.

Which orienteering extensions are worth modelling first?

Opening windows and category limits come first, because they prevent closed doors and repetitive days. A monetary budget alongside time is next for most consumer products. Time-dependent travel times matter mainly in congested cities, and stochastic durations matter for disruption-prone plans. Each extension slows the solver, so add them when the product clearly needs them.

References

  1. Golden, B. L., Levy, L., & Vohra, R. (1987). The orienteering problem. Naval Research Logistics, 34(3), 307-318. ideas.repec.org/a/wly/navres/v34y1987i3p307-318.html
  2. Vansteenwegen, P., Souffriau, W., & Van Oudheusden, D. (2011). The orienteering problem: A survey. European Journal of Operational Research, 209(1), 1-10. doi.org/10.1016/j.ejor.2010.03.045
  3. Gavalas, D., Konstantopoulos, C., Mastakas, K., & Pantziou, G. (2014). A survey on algorithmic approaches for solving tourist trip design problems. Journal of Heuristics, 20(3), 291-328. doi.org/10.1007/s10732-014-9242-5
  4. Gunawan, A., Lau, H. C., & Vansteenwegen, P. (2016). Orienteering problem: A survey of recent variants, solution approaches and applications. European Journal of Operational Research, 255(2), 315-332. doi.org/10.1016/j.ejor.2016.04.059
  5. Vansteenwegen, P., Souffriau, W., Vanden Berghe, G., & Van Oudheusden, D. (2009). Iterated local search for the team orienteering problem with time windows. Computers & Operations Research, 36(12), 3281-3290. doi.org/10.1016/j.cor.2009.03.008
  6. Tang, Y., Wang, Z., Qu, A., Yan, Y., Wu, Z., Zhuang, D., Kai, J., Hou, K., Guo, X., Zheng, H., Luo, T., Zhao, J., Zhao, Z., & Ma, W. (2024). ITINERA: Integrating spatial optimization with large language models for open-domain urban itinerary planning. Proceedings of EMNLP 2024: Industry Track. arXiv:2402.07204. arxiv.org/abs/2402.07204
  7. Hao, Y., Chen, Y., Zhang, Y., & Fan, C. (2025). Large language models can solve real-world planning rigorously with formal verification tools. In Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 3434-3483. Association for Computational Linguistics. doi.org/10.18653/v1/2025.naacl-long.176
  8. Xie, J., Zhang, K., Chen, J., Zhu, T., Lou, R., Tian, Y., Xiao, Y., & Su, Y. (2024). TravelPlanner: A benchmark for real-world planning with language agents. Proceedings of the 41st International Conference on Machine Learning, PMLR 235. arXiv:2402.01622. arxiv.org/abs/2402.01622
  9. Zheng, H. S., Mishra, S., Zhang, H., Chen, X., Chen, M., Nova, A., Hou, L., Cheng, H.-T., Le, Q. V., Chi, E. H., & Zhou, D. (2024). NATURAL PLAN: Benchmarking LLMs on natural language planning. arXiv:2406.04520. arxiv.org/abs/2406.04520
  10. Kambhampati, S., Valmeekam, K., Guan, L., Verma, M., Stechly, K., Bhambri, S., Saldyt, L., & Murthy, A. (2024). Position: LLMs can't plan, but can help planning in LLM-Modulo frameworks. Proceedings of the 41st International Conference on Machine Learning, PMLR 235. arXiv:2402.01817. arxiv.org/abs/2402.01817

Lina Okafor

Travel and craft editor, ESPAD AI Journal

Lina writes about itinerary optimisation, local knowledge and disruption recovery in AI travel planners, and about provenance, photography and cross-border trade for artisans.

Reviewed by the ESPAD AI editorial desk under our sourcing and review standards. Next scheduled review: .

ESPADPALM

Giti is the ESPAD AI model for travel planning ai.

Meet Giti All Travel planning AI articles