Efficient itinerary recommendation via personalized POI selection and pruning

Personalized itinerary recommendation has garnered wide research interests for their ubiquitous applications. Recommending personalized itineraries is complex because of the large number of points of interest (POI) to consider in order to construct an itinerary based on visitors’ interest and preference, time budget and uncertain queuing time. Previous studies typically aim to plan itineraries that maximize POI popularity, visitors’ interest and minimize queuing time. However, existing solutions may not reflect visitor preferences because when creating itineraries, they prefer to recommend POIs with short prior visiting periods. These recommendations can conflict with real-life scenarios as visitors typically spend less time at POIs that they do not enjoy, thus leading to the inclusion of unsuitable POIs. Moreover, constructing itineraries based on selected POIs is a challenging and time-consuming process. Existing approaches involve searching through a large number of non-optimal, duplicate itineraries that are time-consuming to review and generate. To address these issues, we propose an adaptive Monte Carlo tree search (MCTS)-based reinforcement learning algorithm EffiTourRec using an effective POI selection strategy by giving preference to POIs with long visiting times and short queuing times along with high POI popularity and visitor interest. In addition, to reduce non-optimal and duplicated itineraries generation, we propose an efficient MCTS search pruning technique to explore a smaller, more promising portion of solution space. Experiment results in real theme park datasets show clear advantages of our proposed method over baselines, where our method outperforms the current state-of-the-art by 20.89 to 52.32% in precision, 8.36 to 21.35% in F1-score and 40.00 to 67.64% in execution time.


Introduction
Tourism is one of the popular leisure activities for humans where the aim is to visit interesting attractions in new locations. Visiting all the attractions is typically not possible as visitors tend to have limited time budgets. Thus, a critical task for visitors is to plan an itinerary that contains popular and interesting POIs, which must be completed within the visitor's specific time limit. This personalized tour planning is complex due to various constraints: (i) the degree to which a visitor has a preference for popular POIs, POIs aligned to his/her individual interests or some combination of popularity and interest-aligned POIs; (ii) visitors do not like to queue, but if they have to, they prefer the POI/attraction to last longer than conveys the earlier visitors interest; and (iii) visitor has limited time budget to complete the tour. In particular, neglecting queuing time and solely maximizing visitor's interest can create a frustrating experience for visitors as they spend an unnecessarily long time queuing rather than enjoying the attractions. In contrast, if visitors focus mainly on POIs with short queuing times, this can also create a frustrating experience and possibly miss preferred attractions in their itineraries. Considering these issues, it is difficult to manually construct suitable itineraries that satisfy these constraints. Therefore, an efficient and personalized tour/itinerary recommendation approach is needed to maximize visitor's preferences, POI popularity and minimize queuing time within the visitor's time budget.
We will repeatedly use three kinds of time duration terminology to introduce these important concepts: queuing time, visiting time and traveling time in Fig. 1. Queuing time means the time to wait to enter a POI, visiting time means the time visitors spend at the POI after getting access, and traveling time measures the amount of time to travel from a POI to another.
Previous research has focused on developing itinerary recommendation algorithms based on an optimally scheduled path based on POI popularity [48], group pleasure [20,38], mandatory POI categories [5,35], demographic features [6] and geographical check-in impact [8]. The prior studies [40] and [12] show that traveling time and visiting time are important factors for tour planning. However, these approaches did not consider the queuing time of POIs. Considering queuing time, Lim et al. [36] proposed a Monte Carlo tree search (MCTS)-based algorithm whose objective is maximizing the POI popularity, user interest and minimizing the queuing time. However, they prefer a short visiting time POI that indicates earlier visitors do not like it very much, which may lead to inappropriate POI recommendations when there is queuing to access POIs.
As an illustration, Fig. 2a shows the POIs average visiting times of California Adventure Theme Park in the USA. The results suggest that visitors prefer POIs with long visiting times rather than ones with short visiting times. As a proxy of user's interests, we use the number of visitors to gauge the general interest of each POI. Figure 2b shows the Pearson correlation between the number of visitors and visiting time of each POIs. The correlation coefficient is 0.77, which means the number of visitors and visiting time are positively correlated. Thus, visiting time could be a consideration for visitors to prefer specific POIs. We hypothesize that visitors have to wait in a queue to enter a POI. In the California Adventure theme park scenario, visitors have to spend on average more than 60% time as queuing time. In research on the psychology of waiting in queues [9,43], people will wait longer for more valuable service. If the queue times are roughly the same across POIs, then all things being equal, they prefer the POI with a longer average visiting time to justify the wait. To consider this psychology, in our proposed method, longer visiting POIs have been preferred in the itinerary recommendation along with shorter queuing time. Previous methods [2,35,36] directly or indirectly preferred to recommend POIs with shorter prior visitor visit duration, as they aim to visit as many POIs in the time budget to maximize the predicted interest and popularity. However, in light of our analysis, it suggests this might lead to POIs, which are of less interest to visitors. In addition, previous methods consider all POIs with the same significance in their evaluation metrics, i.e., precision, recall and F1-score calculation, because all these metrics count the number of POIs. They do not consider visiting time, thus in Fig. 2a, POI 9 and POI 14, whose visiting time is one minute and fourteen minutes, respectively. They are considered equal in desirability. In addition, visitors have to endure long queuing times before being able to enjoy the attraction/ride. However, selecting POIs with shorter visiting times may increase recall value, but it can use a large proportion of time on queuing, which can make visitors bored. In this paper, we have given special consideration to visiting time that results in our approach may recommend less number of POIs to the visitors within budget time than the existing research. However, these POIs are likely of higher interest to visitors as our evaluation shows that our precision and F1-scores, computed against ground truths, are significantly higher than other works.
The problem of personalized itinerary recommendation considering visiting and queuing time involves optimizing over POIs across time. The current approach of using integer programming to optimize is not sufficient due to its long-running times. This paper proposes EffiTourRec algorithm to construct POI itineraries for the visitors based on enhanced MCTS with an effective heuristic and efficient pruning technique. An effective heuristic is introduced that suggests POIs optimized to the visitor's interest, POI popularity, prior visitors visiting time and queuing time. To reduce non-optimal itineraries generation, we introduced a rewardbased pruning strategy that makes our approach efficient than the existing algorithms. The main contributions of this paper are discussed as follows: -We propose a new POI selection heuristic for personalized itinerary recommendation by considering visitors' various preferences, i.e., POIs popularity, visitors interest, prior visitors visiting, queuing and traveling time.
-We introduce an effective itinerary reward function-based level of trade-off among prior visitors visiting time, POI popularity, visitor interests and queuing time. -We propose adaptive MCTS-based reinforcement learning algorithm EffiTourRec to make visitor itinerary recommendation more effective and efficient by using the new POI selection heuristic and reward function strategy. -In addition, to improve the time efficiency of our proposed method, we use MCTS pruning technique to reduce search space by filtering out non-optimal and duplicate itineraries in the early stages. -We evaluate our proposed algorithm on five theme parks datasets to show our proposed method's effectiveness and efficiency against various state-of-the-art baselines. We test on theme parks datasets because that is what [36] did to compare the itinerary recommendation with queues. -Experiment results demonstrate the effectiveness of our proposed method over baselines; our method outperforms the current state-of-the-art by 21 The remaining parts of this paper are organized as follows. Section 2 describes the related works while some preliminary concepts are discussed in Sect. 3. Problem definition is formulated in Sect. 4. Our proposed EffiTourRec method is described in Sect. 5. Experiments to evaluate the proposed method's performance compared with the existing baselines are demonstrated in Sect. 6. Finally, we conclude our proposed method with some future directions in Sect. 7.

Related work
Personalized itinerary recommendation research has recently attracted significant attention due to its various applications. There are a variety of existing research works that cover different aspects of the itinerary recommendation problem. In the following subsections, we discuss various related works and highlight the difference between our work and the existing works.

General itinerary recommendation
Many existing research works on itinerary recommendation [10,11,33] are based on orienteering problem (OP) [22,49] whose main aim is to maximize a global reward point within user-defined time budget. POI popularity is frequently used as a global reward in theme park [23,51] and city [24,33] itinerary recommendation. Many significant tourism-related works utilize geo-tagged photographs [10,27] for identifying popular POIs to analyzing tourist interest. While these recommendations are interesting, they do not use visitor's personalized interest preferences as a fact of global reward points. Yoon et al. [54] introduced an efficient and balance intelligent tour recommendation using global positioning system (GPS) itineraries. Lim et al. [37] described a social media data-based tour recommendation and itinerary planning models in detail as a survey study.

Personalized itinerary recommendation
Research in itinerary recommendations has focused on discovering different types of itinerary recommendations based on the impacts of various constraints. These existing works' objectives are to recommend itineraries based on visitors' interest preference [50], particular POI visit order [21], group pleasure [20,38], mandatory POI categories [5,35], demographic features [6], geographical check-in impact [8], etc. Lim et al. [40] introduced PersTour system for personalized itinerary recommendations based on trip constraints and visitor interest preferences using modified ant colony optimization [15] algorithm. Debnath et al. [12] presented a time-aware and preference-aware routes recommendation system. Quan et al. [18] presented a spatial-temporal context-aware mixture model to a user within a geospatial range. Travel time is one of the important factors of tour planning. To focus on travel time, Irina et al. [14] designed an adaptive orienteering problem with stochastic travel times (AOPST) that finds the path between the reward POIs in an integral component of the decision space. Time constraints-based framework pir T [25] proposed a personalized itinerary in which social network features and social relationships are used to define visitor preference. Zhixue et al. [34] introduced a hybrid heuristic-based RS-H 2 A algorithm that applies a random simulationbased hybrid evolution strategy in a time-dependent stochastic environment to handle risk awareness of the tourists. A collaborative filtering-based WMF-CR [46] approach has been proposed to the personalized landmark nontrivial recommendations using geo-tagged photographs. Bowen et al. [16] developed a crowdedness-aware route recommendation model for predicting the passenger transfer volumes of a specific location at a specific time duration. These itinerary recommendation approaches do not consider the queuing time of attractions.

Personalized itinerary recommendation with queuing time awareness
The queuing time has significant effects on a personalized recommendation system where a visitor has to wait a long time to get rides, i.e., a theme park tour. The theme park ride access requires a long waiting time which can generate a frustrating experience for the users. Lim et al. [36] incorporated queuing time to geo-tagged photographs and proposed the PersQ algorithm by modifying the Monte Carlo tree search (MCTS) for recommending personalized itineraries. The PersQ algorithm's objectives are maximizing the POI popularity, user interest and minimizing the queuing time. However, the method shows that recommended POIs are inversely proportioned to prior visitor's visit duration. In the actual scenario, POIs visit duration expresses visitors' interest that should be proportion for POIs selection of an itinerary.
The PersQ [36] algorithm first used MCTS in itinerary recommendation like single-player game [42]. Before that, most of the researchers applied Monte Carlo tree search for two-player games. MCTS space exponentially increases with the number of iterations and nodes in the tree. Different kinds of pruning techniques: probability-based [17,44], heuristic-based [45] reduce MCTS space in two players game. Neil et al. [4] designed a single-player game whose objective is to transform an initial phase into a set of goal conditions phase using automatic move pruning. Although our work is based on MCTS, it differs from the earlier research works. In our work, we consider a different heuristic for potential POI selection and a new reward function for ensuring visitor's preferences in the itinerary recommendation. In addition, our proposed personalized itinerary recommendation system is like one-player game, and we apply an efficient pruning technique in adaptive Monte Carlo Tree Search to reduce the tree search space.

Top-k POI recommendation
Most of the top-k POI recommendation works are based on collaborative filtering (CF) or matrix factorization approaches. Their main objective is to make a ranked list and recommend top-k POI to the visitors. User-based collaborative filtering (UBCF) for itineraries [53] has been proposed to recommend a set of top-k POIs for visitors considering the social influence and spatial influence. Kotiloglu et al. [32] proposed "Filter-First, Tour-Second" framework where the first phase finds the top-k optional set of POIs using CF [13] that are added to mandatory visited POIs to create a possible recommendation. An iterative heuristic approximation (IHA) [55] method is proposed that makes attractions set based on profits and recommends these attractions to the visitor until the budget time is reached. Hu et al. [26] proposed travelogues and check-in information based multi-source data to capture user's interest and find top-ranked itineraries and recommend that to the users.

Sequences of locations
A set of locations are ordered to generate an itinerary recommendation where the order of locations is important. Baral et al. [1] proposed a context-aware personalized POI sequence recommendation approach by extending the recurrent neural network and its variants. Multisource-based personalized travel sequence recommendation [28] has been presented, which can recommend a travel sequence rather than individuals POIs using heterogeneous metadata. Lou et al. [41] focused on sentimental characteristics of POIs and then recommended these POIs using SPR algorithm. The geographical position has a remarkable impact on POI recommendation [53] that visitors tend to visit nearby POIs around their homes or office. The research works [7,52] proposed probability-based recommendations that a closer distance between visitors and locations has a higher probability for a recommendation. To explore the impact of spatial, temporal and social influence, STSCR [19] model has been proposed to handle user's behaviors properly in sequential attractions recommendation.

Discussion of differences with previous works
Our proposed EffiTourRec algorithm differs from these previous works in various aspects. Table 1 shows the main features of tour itinerary recommendation works and the significant constraints faced by existing methods. First, unlike top-k POI recommendations, our proposed method recommends a set of POIs and constructs an itinerary considering the traveling time between POIs, visiting time of POI, queuing time of POI and completing this itinerary within user-defined time budget. Second, in contrast to existing works, our proposed visitor personalized interest is proportional to visitors' prior visit duration (e.g., more spending time means more interest). While existing works' personalized interest is inversely proportional to the prior visit duration (e.g., more spending time means less interest), visitors can board. Third, we formulate a personalized itinerary reward function by giving prior visitors' timebased POI visit preferences. In contrast, existing works did not differentiate long and short POIs visiting time that has significant meaning in itinerary recommendation shown in Fig. 2. Fourth, previous algorithms were not concerned about various time ratios with total expending time. We have shown the performance analysis based on various time ratios between our proposed approach and existing baselines. Last but not least, shorter itinerary construction time is an important feature of the itinerary recommendation system because visitors would prefer to get their itinerary recommendations without excessive delays. Thus, our proposed EffiTourRec algorithm uses an efficient pruning technique to reduce the search space and makes the system more than 40% time efficient than the existing baseline algorithms.

Preliminaries
Suppose that there are some visiting POIs in a city or theme park. To recommend these POIs based on visitor interest, POIs popularity and time constraints, we introduce the following terms, some of which have been defined previously.

Definition 1
Point of Interest (POI): Let a set of tourist points be P = { p 1 , p 2 , p 3 , · · · , p n } in the theme park or city. Each point p i ∈ P can have properties, e.g., points area, points category, travel time from other POIs, visiting time and queuing time.

Definition 2
Popularity of POI (PoP): Let a POI attraction be p i ∈ P, the popularity of p i is defined as the number of times p i has been visited by the visitors U and it is defined as: where δ(u, p i ) = 1 if the visitor u ∈ U visits POI p i in his/her tour, otherwise δ(u, p i ) = 0.
Nowadays, photo sharing and social media sites provide many avenues for users to share photographs of their daily experiences, many of which involve interesting places they have visited. Thus, visitors are interested in taking photographs in their preferred attraction and the number of taking pictures reflects the level of interest of any attraction. Although POI popularity is the same for all visitors, the interest relevance of a POI differs from visitor to visitor. Each visitor will have their independent interest preferences. We can find user's interest in particular categorical POIs in three different ways: (i) number of taken photographs; (ii) amount of spending time; and (iii) number of repeated visits. Therefore, in this paper, we consider user interest based on the number of taken photographs, which has been applied in the baseline algorithm PersQ [36]. User's interest feature selection may change the efficiency of the proposed and baselines algorithms. Effective user interest features selection or concatenation approach of multiple features to express users interest may be another research direction. However, this research's main aim is to propose an effective and efficient itinerary recommendation considering similar features like baselines.

Definition 3
Interest of POI (IoP): Suppose that C represents the set of all POI categories and each p i ∈ P is associated with a certain category c ∈ C. Furthermore, F is the set of photographs taken by visitor u in these POIs. Therefore, the interest level of visitor u in category c is defined as: where λ(c q = c) = 1 if the visitor u takes photograph q which category is c q in a POI that belong to category c, otherwise λ(c q = c) = 0. The intuition of this definition is that the visitor takes more photographs of a POI (category) if he/she likes it.
where |W | is the number of visitors who visit the POI p i .

Definition 7
Travel Duration of POI (TDoP): Suppose a visitor u completes his/her visit at POI p q at time t d up q and start/arrival visit at POI p r at time t a up r , then we define the travel duration of two sequential POI from p q to p r as T DoP( p q , p r ) = t a up r − t d up q .

Definition 8
Queuing time of POI: In general, each POI p i ∈ P can also be associated with a queuing time after arriving at POI p i , e.g., queuing to buy a ticket, to ride a roller coaster, etc. Suppose that visitors W ⊆ U who visit POI p i and t is the visiting time, then we can designate the queuing time as a function of timestamps t and POI p i as follows.
where μ( p i ) = 1 if visitor u visit POI p i at timestamps t, otherwise μ( p i ) = 0. In short, we find the queuing time at POI p i based on the total time spent at an attraction subtracted by its average visiting time.

Problem definition
We define the personalized itinerary recommendation problem, with the main objectives of maximizing the popularity, visitor interest, visiting time of each POI visited/recommended and minimizing the queuing and travel times. As visitor interest is determined by the visitors spending time and visitors taking photographs of visiting attractions, it is relevant to construct a personalized itinerary. We denote this problem as the EffiTourRec problem. Another objective is to recommend attractions to the visitor in a shorter time than the existing systems. Given a set of POIs P = { p 1 , p 2 , p 3 , · · · , p n }, a time budget T , a starting POI p 1 and destination POI p n . Our main goal is to recommend itinerary I = { p 1 , · · · , p n } that maximize the total reward ensuring the itinerary is completed within the given time budget T . The reward function is calculated based on POI popularity, visitors' interest, visiting time and queuing time of POI p j as follows.
where Path t p i , p j = 1 if visitor visits p i and p j as a sequence in an itinerary history, and Path t p i , p j = 0 otherwise. PoP( p j ) represents the popularity of POI p j , while I oP(c p j ) indicates user interest based on number of taken photographs in the category of POI p j and V DoP( p j ) indicates the prior visitors average visiting time of p j . Moreover, Queue t p j conveys average queuing time at timestamp t in POI p j . The main objective of this research is to maximize popularity, interest, visiting time and minimize queuing time. Therefore, we maximize popularity, visitor interest and prior visiting time as the numerator and queuing time as the denominator in Eq. 6. To emphasize the balance among popularity, interest and visiting time, we use multiplication among them. The idea is similar to probability multiplication, which is known to work well when different measures are independent and have equivalent value ranges.
Moreover, the following constraints are aggregated to solve the Eq. 6.
Constraint 7 ensures that the recommended itinerary starts at a particular POI p 1 and ends at specific POI p n .
Constraint 8 indicates that all selected POIs in an itinerary are connected and no POIs are included more than once.
Constraint 9 confirms that the recommended itinerary will be completed within budget time T. Here, the time function is calculated based on travel time, visiting time and queuing time using the following Eq. 10.
The main goal of this research is to propose an effective and efficient personalized itinerary recommendation system that can conduct practical and significant tourism parameters, e.g.,

Proposed EffiTourRec method
In this section, we introduce our proposed approach. We design an adaptive Monte Carlo tree search (MCTS)-based Efficient Tour Recommendation (EffiTourRec) system for personalized itinerary recommendation using realistic effective heuristic and efficient pruning technique. The main purpose of using adaptive MCTS is that it can be adaptive to run only a fixed number of iteration or a fixed amount of time and has been shown [36] to be a good search strategy for showing itinerary paths. Figure 3 depicts our proposed EffiTourRec recommendation system working steps. At the first step, the system takes the data from the input databases, which consists of a POI network, visiting sequence and queue information. Second, the EffiTourRec system finds a set of POIs for the visitor by using an effective heuristic. These POIs create a personalized itinerary recommendation that visitors get maximum entertainment by maximizing visitors' interest, POI popularity, visiting time and minimizing queuing time. Our proposed effective heuristic method is applied to select potential POI at the adaptive Monte Carlo tree search selection step. We also applied an efficient pruning technique that allows us to explore a smaller, more promising portion of the solution space, thus our method requires a shorter running time. The following subsection formalizes the concepts and presents a detailed description of adaptive MCTS that is used in our proposed EffiTourRec method.

Monte Carlo tree search
Monte Carlo tree search (MCTS) is a well-known reinforcement learning algorithm that not only has been successfully applied to artificial intelligent (AI) games (e.g., chess, go, Othello) [3] but also has been applied in personalized itinerary recommendation [36]. In the personalized recommendation system, each move from a node to a child node is considered as a variable cost, such as tour time, in contrast to the uniform cost of board games. This variable cost is time dependent because queuing time at the same attraction depends on the crowd, which is high at peak time and low at the off-peak time. Thus, the itinerary recommendation result is measured by the complex reward function that aims to maximize POIs popularity, visitors' interest, visiting time and minimize queuing time instead of board game binary reward win or lose. MCTS and our approach run over a number of iterations and each iteration consists of four steps.
Selection step is used for traversing the POIs from starting POI to last visit POI. After that, the expansion step is used to decide how many and which POIs are considered as the next potential POIs in the itinerary recommendation. Then, the simulation step is used to complete the itinerary recommendation starting POI to ending POI. Finally, the reward function of Monte Carlo evaluation is propagated back to the starting POI using a back-propagation strategy. We describe each part of our proposed adaptive MCTS steps in detail.
Step 1: Selection: At each iteration, the MCTS begins at starting POI as a tree root node and moves recursively through the tree child node to expand based on the tree policy until it reaches destination POI or unvisited POI. In the most common tree policy, the next node is selected by the upper confidence bound tree (UCT) [29], which is improved and applied in the personalized itinerary recommendation by the PersQ [36] algorithm, using an additional heuristic for selecting the next potential POI p j .
In Equation 11, the first part potential POI used a heuristic to select the next potential POI to favor the POIs with higher popularity and interest but with the lower associated traveling, visiting and queuing time. The second part path reward used for existing path rewards based on POI popularity, visitor interest and queuing time from starting POI to POI p i . These two parts express the exploitation of itineraries from source to potential candidate POI p j . The exploitation ensures the best itinerary path is found thus far. The third part, exploration controls the number of POIs that have not been visited previously. The parameter C p fixed the value of exploration of POIs which the best value is 1 √ 2 determined by Kocsis and Szepesvári [30] as it satisfies Hoeffiding's inequality.
We observe that the proposed UCT in the earlier PersQ suffers from three shortcomings. First, the PersQ [36] system did not consider visitor visiting time as visitors' interest or preferences, it only considers the number of visitors who visited the POI and the number of taken photographs in that POI as the visitor interest. Second, PersQ cannot differentiate the persons' interest who spend more time in an attraction than the others because the popularity of attraction is measured by the number of visitors, not their spending time. Third, in the proposed PersQ algorithm next potential POI selection is inversely proportional to prior visit time, which means if prior visit time is large, then POI selection probability will be less. This is contradictory with real-world behavior because prior visit time is typically proportional to the visitors' interest. That means if prior visitors spend more time in a POI, they will likely like it very much.
To overcome these three shortcomings, we propose an effective heuristic-based potential POI selection method which is based on the POI popularity, visitors' interest, POI visiting time and POI queuing time.
The main reason for the effectiveness of our proposed method compared to the existing PersQ method is due to its exploitation part. Exploration part is the same for both methods. The exploitation part consists of two parts that ensure the best itinerary path is found from starting POIs to current POI p i and select next potential POI p j , respectively. In the first part, potential POI ensures the selected p j maximize popularity, visitor interest and prior visitors' preferences and minimize queuing time and traveling time. Here, POI popularity depends not only on specific user previous visits but also on previous users' repeated visits. Similarly, POI visiting time does not depend on signal users, and it also depends on other users spending time on that particular POI. That is why user interest measured by the number of taken photographs does not depend on POI popularity and POI visiting time. On the other hand, POI popularity and POI visiting time are not dependent each other. Thus, we consider these three factors and there are potential overlaps between them. Maximizing these three factors, we cover potential overlap and balance the multi-factors preferences, which finds the strong relationship among the factors. It will cover both user's interest independent and dependent factors. We have used multiplication among these features that objectives are maximizing values. This multiplication value tends to be affected by one feature which value is very large. To avoid this unexpected trend, we use normalization and all factors values within 0 to 1 range. In the second part, path reward mentions that the existing itinerary from starting POI to current POI p i is the best itinerary based on the reward function. The reward function measures itinerary rating considering POIs popularity, visitors' interest, prior visitors' preferences and queuing time. Figure 4 illustrates a toy example that highlights the difference between our proposed and existing heuristics. Assume that visitor u completes POI A visit. The next POI to be visited will be selected based on UCT values among these three POIs. Consider path reward and exploration are the same at this moment. Therefore, the value of UCT to select the next potential POI depends on the only potential POI part. The existing PersQ selects next potential POI C because it potential POI value is larger than others. In the above discussion, it is clear that the existing PersQ method always recommends minimum visiting, travel and queuing time in which visitor spends only 5 minutes for enjoying POI C and 35 minutes for traveling and queuing purposes. This recommendation spends much waiting and traveling time. In contrast, our proposed method recommends POIs whose visiting time is maximum and traveling and queuing time are minimized. Hence, a visitor spends 15 minutes to enjoy POI D and 25 minutes for traveling and queuing purposes that Fig. 4 The example illustrating the effectiveness of our proposed heuristic compared to the existing PersQ heuristic. It shows that prior visiting time is proportion to user interest in itinerary recommendation makes visitors happier than the state of the art PersQ. For the readers' easy understanding, we consider all POIs popularity is same and visitor interest to all these three categories are uniform.
Step 2: Expansion: If the selected POI is not the ending POI, then one POI is added to the itinerary to represent this move by selecting one unvisited POI child, which is selected randomly. All these unvisited POIs are not significant. There are some POIs with long queuing times that can make visitors bored. To avoid these POIs, we have used a pruning technique that will be described in detail in the next section.
Step 3: Simulation: The selection and expansion steps are repeated until the visitor reaches the destination POI or exceeds the time budget. If the process continues and does not reach the destination POI within a fixed budget time, then the system cannot create a recommended itinerary. These itineraries, which are not ending with destination POI, are not considered as successful itineraries.
Step 4: Back-propagation: The itineraries of simulation results are backpropagated from the current POI to starting POI through the ancestor-selected POIs, updating the reward function until it reaches the starting POI. We choose a reward function that reflects the POI popularity, interest, visiting time and queuing time. The reward function is associated with each iteration, and it differs from the existing PersQ [36] algorithm, and it is defined as: In this reward function, our main objectives are to maximize POI popularity, user interest and visiting time and minimize queuing time. This function is more effective than the existing function because the existing reward function does not consider visiting time as a factor to determine the reward function.

Efficient move pruning
MCTS runs a fixed number of iterations and each iteration generates an itinerary, which may be successful or unsuccessful. An itinerary that ends at the specified destination POI is a successful itinerary, while one that fails to do so is an unsuccessful one. All these successful itineraries do not achieve the same reward points. Therefore, the itineraries that achieve non-optimal we want to avoid to reduce unnecessary search and expansion time. On the Fig. 5 The example illustrating the efficiency of our proposed pruning technique. It prunes MCTS space which makes non-optimal and duplicate itineraries other hand, the proposed method can generate the same successful itineraries multiple times, which is again redundant and time-consuming. To solve these time-consuming itinerary generations, we propose a new MCTS pruning technique that can prune duplicate itineraries and non-optimal itineraries at the early stage. This pruning technique reduces search space remarkably without the loss of successful itineraries. This pruning reduces time complexity or space complexity and makes the system more efficient.
We consider cumulative itinerary reward point (IR) and cumulative itinerary time (IT) data structures to remove these low-quality and duplicate itineraries. The cumulative itinerary reward point and cumulative itinerary time are represented by I R i p j and I T i p j , where i indicates the itinerary POIs length and p j mentions POI in the itinerary. Then, whenever the algorithm creates a new itinerary from starting POI to destination POI, its prune factor (PF) defined by the ratio of cumulative reward points and itinerary time will be checked. If the itinerary consists of the same POIs at the same length position with less or equal prune factor value compared to the existing optimal one, the algorithm prunes search space considering low rewarded itinerary or duplicate itinerary using the following equation.

MC T S Prune
where current_P F i n j and existing_P F i n j mention current prune factor and existing prune factor at POI n j in position i, respectively. The following equation represents the prune factor.
where I R i p j mentions cumulative itinerary reward and I T i p j indicates the cumulative itinerary time from starting POI to POI p j and i presents the length of the creating itinerary.
We further elaborate on this pruning technique using the following example. Suppose that, in . Then, the algorithm creates a second itinerary A → C as POI C is not visited yet as the second POI in the itinerary. After that, when POI E is selected as the next potential POI it creates low prune factor (17/9 = 1.89) than the existing POI E prune factor (17/7 = 2.43) at the third position in the first itinerary. Thus, the system can prune remaining MCTS traversing, which generates low-quality itineraries. In this same process, the algorithm can prune remaining tree search whether they find a low prune factor at POI C and POI E in third and fourth itineraries, respectively. This approach ensures low-quality itineraries generation are pruned early, making our proposed system faster without losing any information. Besides this, sometimes MCTS generates duplicate itineraries with the same prune factor. Suppose the fifth iteration generates a duplicate itinerary. In that case, the algorithm can prune this itinerary generation whenever it finds that the prune factor of POI D is the same as the existing value. Therefore, the system can avoid huge tree searching using this pruning technique. This example exhibits that itinerary reward and time are small in which the ratio value may be the same for different levels. In reality, it is infrequent to find the same prune factor in different levels of itineraries because the prune factor depends on five constraints, e.g., POI popularity, visitor interest, traveling, visiting and queuing time. In this way, our proposed MCTS pruning technique reduces the MCTS space, making the algorithm more efficient than the existing system.

EffiTourRec algorithm
Algorithm 1 shows an overview of our proposed EffiTourRec algorithm in which inputs are POIs information (e.g., popularity, queuing time, visiting time and traveling time, etc.) represented by P = { p 1 , p 2 , · · · , p n }, starting POI p 1 ∈ P, ending POI p n ∈ P, starting time t s and time budget T for completing the visitor itinerary. The output of this algorithm is recommended itinerary I = { p 1 , · · · , p n }, which starts from POI p 1 at time t s and reaches at POI p n within the time limit t s + T .
To apply MCTS in our itinerary recommendation system, we consider the root node as the starting POI of an itinerary and its child nodes as next potential POIs that can be visited. The start of Algorithm 1, it initializes three similar trees for measuring the amount of spending time, reward points and prune POI named T visits , T reward and T pr une by the emptyTree ( in lines 1 and 2). The emptyTree root node is POI p 1 and child nodes are set of POIs p i ∈ P, up to a depth of |P| (the number of POI in the visiting theme park). Here, the traversal of POI from root to leaf represents an itinerary I = { p 1 , p 2 , · · · , p n }, with p 1 as the selected POI at depth 1, p 2 at depth 2, and so on until it reaches leaf p n at depth n. Initially, I list set is empty at line 3 that is used to store a set of exploring itineraries from iteration 1 to max Loop. This algorithm runs a fixed number of iterations maxLoop in line 4. Each iteration (lines 4-29) executes a single run of adaptive MCTS and generates a possible recommended itinerary. The possible itinerary I temp is initialized by first visiting p 1 at line 5. Then, line 6 set current POI is staring POI p 1 , next POI is empty, and expending time totalTime and temp Reward are zero. The procedure SelectNextPOI() selects next potential POI using effective upper confidence bound heuristics until the visitor expending time exceeds the given budget time or next POI selects ending p n in lines 7-19. This SelectNextPOI() method in line 8 reflects the selection and expansion steps of our proposed adaptive MCTS and describes further in Algorithm 2. Every time the selected POI appends to the temporary itinerary and visitors expending time and temporary itinerary reward update in lines 9-11. Then, the temporary itinerary is checked whether it has been explored already or has generated low quality or duplicate itinerary in line 12. If it generates low quality or duplicates itinerary, the search stops and prunes the remaining POI traversing in line 13. On the other hand, if the temporary itinerary is new or creates a high-quality itinerary, select next POI as the current POI and continue until it reaches budget time or find the destination POI as selected POI in lines 15-18. After that, BackPropagation() method updates visited POIs in T visits based on the recommended POIs in temporary itinerary I temp at line 20. If the temporary itinerary I temp . At first, the algorithm counts the number of visitors who visit p i based on T visit tree at line 1. Initially, the next potential POIs, upper confidence bound and existing itinerary are initialized in lines 2-4. To select the best next potential POI, each p j connected with p i but does not exist in the current creating itinerary I temp calculates upper confidence bound and finds a best potential POI in the lines 5-16. Each POI p j connects to POI p i counts the number of visitors at line 6. Then, the total reward of these POIs is measured based on is greater than the previous bound, it has been stored as maximum upper bound and considered the p p as the next selected POI in lines 12-15. Finally, the algorithm returns the best potential next selected POI p p within all connected POIs at line 17.

Experiments
In this section, we present and discuss the experimental datasets, baseline algorithms and evaluation metrics. For these comparisons, our proposed EffiTourRec algorithm and the existing baseline methods are implemented in the R language. The experiments are run on 2.50 GHz Intel Core i5 with 8GB RAM, in Windows 10.

Datasets
For our experiments, we used geo-tagged photographs in five real theme parks from August 2007 to August 2016 that was used in [36]: Disney Land, Epcot, California Adventure, Disney Hollywood, Magic Kingdom. These datasets were collected in four steps: First, Flickr API 1

Baseline algorithms
In the personalized itinerary recommendation system, practical constraints play a significant role in effective and efficient tour planning. Our main baseline is the existing work PersQ [36] as it also considers POI popularity, visitor interest, starting and ending POIs and time constraints including traveling, visiting and queuing time simultaneously. Moreover, there are various state-of-art baselines in which all these constraints are considered separately. The baseline algorithms related to our proposed algorithm are as follows.
-Personalized Tours with Queuing Time Awareness (PersQ) [36]: Itinerary starts at starting POI, selects potential POIs based on maximum popularity and interest, minimizing queuing time and completes the itinerary at ending POI within a time budget. -Personalized Tour Recommendation (PersTour) [39]: This algorithm recommends itineraries based on POI popularity and time-based visitor interest within budget time. -Tour Recommendation with Interest Category (TourRecInt) [35]: The algorithm introduces mandatory visit POI category-based tour recommendation system in which visitors are most interested in visit frequently visited POIs category. -Trip Builderer Algorithm (TripBuilder) [2]: The main objective is to define visitor interest by the spending time of visited POI of a certain category, corresponding to his/her total visiting time. -Iterative Heuristic Approximation (IHA) [55]: A heuristic-based recommendation system that starts with a tour staring p i , completes at p n and repetitively adds new POI into the itinerary until the budget time is reached. -User-Based Collaborative Filtering for Itineraries (UBCF) [53]: One of the popular userbased collaborative filtering variations is proposed to recommend a set of top-k POIs for another user to utilize user interest similarities.

Performance evaluation
To evaluate the performance of our proposed EffiTourRec algorithm and existing baseline algorithms, we consider visitors who have at least two visit sequences and each sequence has at least three visiting POIs, including starting and ending POIs. Then, we apply the leaveone-out evaluation [31] strategy into these sequences where one visit sequence is used for evaluation and the other visit sequences are used to determine visitor preferences. For each visit sequence, we use starting and ending POIs as input to the algorithm and the budget time is determined by the actual time spent in the visit sequence. After that, we evaluate the performance of our proposed algorithm against the various baselines using the following standard metrics [36,39]. to itinerary total time, defined as: -Queuing Time Cost Ratio (QT C R): The ratio of queuing time an itinerary I , relative to itinerary total time, defined as: -Queue Time Popularity Ratio (QT P R): The ratio of queuing time an recommended itinerary, relative to the popularity of an itinerary I , defined as:

Results and discussion
In this section, we describe our proposed EffiTourRec algorithm results compared to the existing baseline algorithms.

Precision, recall and F1-score
The main evaluation process of an itinerary recommendation method is how well the recommended itineraries satisfy visitors' requirements. The evaluation metrics precision, recall and F1-scores measure how well the recommended POIs match with real-life user preferences.
The results in Fig. 6 show the overview of the average precision, recall and F1-score, respectively, in five theme parks, for our proposed EffiTourRec and the baseline algorithms. The results show that the proposed EffiTourRec outperforms the six baselines in terms of precision and F1-scores. In terms of recall scores, the proposed method outperforms all baselines except PersQ in California Adventure and Magic Kingdom datasets among the five datasets. Now, we explain the performance of our EffiTourRec algorithm and the baseline algorithms in detail.
The first column of Fig. 6 depicts the proposed EffiTourRec algorithm performance on the itinerary precision score is maximum 79.10% in Hollywood and minimum 62.90% in Disney Land dataset, whereas the best baseline algorithm performs maximum 64.23% in Hollywood and minimum 43.31% in California Adventure. Our proposed algorithm shows improvement results compared to the baselines maximum 52.32% (the proposed method is 65.97% and existing PersQ is 43.31%) in California Adventure dataset and minimum 20.89% ( EffiTourRec method is 70.61% and existing PersQ is 58.41%) in Epcot dataset.
The second column of Fig. 6 presents the itinerary recall score performance analysis on our proposed EffiTourRec algorithm and baselines. The results show that the proposed method underperformed 5.87% to 11.11% than the existing PersQ algorithm, whereas it outperformed than the other baselines. The main reason for these results is that PersQ algorithm prefers minimum visiting times POIs. Even though these POIs may not show visitors' interest accurately, they create long itineraries that may be likely makes recall value high. To distinguish our performance analysis, we focus on F1-score that provides a balanced representation of itinerary precision and recall scores.
The third column of Fig. 6 illustrates the result of F1-scores for all theme parks and EffiTourRec outperforms all baselines from 8.36% to 21.35%. The results show that the proposed method underperforms on tour recall scores but outperforms on F1-score scores. The results improve performance minimum 8.36% in Epcot dataset (proposed EffiTourRec method is 60.90% and best existing PersQ is 56.2%) to maximum 21.35% in Disney Hollywood dataset (proposed EffiTourRec and best existing PersQ are 55.70% and 45.86%, respectively). These results prove that the recommended itineraries of our proposed EffiTourRec algorithm are highly significant to the real-life visitors than the other baselines.

Popularity, interest and rank of POI
The evaluation metrics' popularity and interest reflect how well the visitors like these recommended POIs and how well the category of recommended POIs match with real-life visited POIs category, respectively. The results in Table 3 show that the maximum average popularity of POI of our proposed EffiTourRec method is 3822 in Disney Land dataset, whereas the existing best PersQ method is 2860. On the other hand, the minimum average popularity of the proposed method is 2376 in Epcot dataset, which is also best among all baseline algorithms. The results show that our proposed algorithm recommends the most popular POI for all theme parks datasets compared to the baselines, while PersQ offers the second-best performance. It shows that our proposed EffiTourRec creates itineraries based on POIs that are 23.30% to 81.17% more popular than the existing baselines.  Table 3 illustrates proposed EffiTourRec method recommends the highest interest scores for three datasets among the five theme parks, while PersQ and IHA algorithms lead POI interest for one theme park.
Besides these, ranking expresses the user's interest and POI popularity values as a function to show the POIs ranks. We can see that our proposed method's average POIs rank value is best compared to the other baselines. We consider an effective heuristic to maximize popularity, user interest, and visiting time, along with minimizing queuing time. In this evaluation, we consider rank value from 1 to 12, and the smallest rank value expresses the better result.

Visiting, travel and queuing time metrics
Time constraints are important parameters for an itinerary recommendation because every visitor has specific time limits. Thus, the recommended itinerary should be more effective in which the visitor gets maximum visiting time to visit POIs rather than traveling and queuing time to access that POI. These time metrics indicate the effectiveness of visitor spending time.
Visiting time cost ratio (VTCR) represents the proportion of POI visiting time compared to the total spending time of visitors. Table 4 shows the comparison of VTCR for the five datasets among our proposed method and existing six baseline methods. All results show that our proposed EffiTourRec algorithm outperforms the baselines with an increment of 6.69% to 44.93% in VTCR. The main reason for these performances is that our proposed potential POI selection focuses on visiting time as a proportion factor to show the visitor preferences.
Travel time cost ratio (TTCR) means the part of the traveling time from one POI to another POI with the total spending time of visitors to complete their itineraries. Most of the datasets travel time cost ratio is 5-7% as traveling time makes up a small part of the itinerary in this The queuing time cost ratio (QTCR) in Table 4 presents visitors waiting time ratio with total expending time. More QTCR means the recommended itinerary spends more time as waiting time than the visitor preferences POI visiting time. The table clearly shows that queuing time is an important factor in visitors' theme park travel because it requires more than 58% budget time for all datasets. Thus, less value of QTCR elicits the visitors spend less time as waiting time. Therefore, it points out that the proposed method EffiTourRec outperforms all baselines with a reduction of queuing time. Table 4 depicts the queue time popularity ratio (QTPR) of itineraries. We know that long queuing time makes visitors disappointed, which means the small value of the queuing time popularity ratio indicates visitor preferences. The results show that the proposed method outperforms QTPR than the existing baseline algorithms in the five datasets, reducing 6.97% to 23.56%. The maximum queuing time (MQT) conveys the queuing time association of each POI in an itinerary. The larger value represents that the recommended POI is more similar to queuing time than the less valued queuing time. It shows that our proposed method outperforms all baseline algorithms except the disland dataset, where UBCF performs well than the proposed method.
In the above analysis, we see that our proposed EffiTourRec method outperforms 37 evaluation values for different datasets, whereas existing PersQ outperforms 6 values and IHA and U BC F outperform one evaluation value. Thus, it is clear that the superior performance of EffiTourRec is due to its effective itinerary creation approach using POI popularity, user interest, queuing and visiting times.

Runtime analysis between existing methods and EffiTourRec
Previously, we have shown the effectiveness of our method. This part analyzes why our method run time is faster than the baselines. The result on Table 5 shows that the proposed algorithm EffiTourRec finds recommended itineraries from theme park datasets more efficiently than the existing baselines. The existing IHA and UBCF algorithm recommend top-k POIs based on heuristic and they do not make these POIs as an itinerary recommendation nor they consider the various practical spatial and temporal constraints which are associated with the itinerary plan. Thus, in this itinerary planning, we do not consider these two algorithms (IHA and UBCF) time complexity analysis. We consider time comparison among our proposed algorithm and other baseline algorithms that recommend itinerary paths. We have used adaptive Monte Carlo tree search with effective heuristics to select potential next POI for creating itinerary paths in our proposed method. We also used MCTS search pruning that avoids non-optimal and duplicate itineraries generation. Thus, the time efficiency of the proposed EffiTourRec algorithm is the best among all baseline algorithms for all datasets. We set max Loop = 1000 as the value allows the algorithms to complete itinerary in a reasonable time.
The results show that the run time of algorithms to find a successful itinerary changes with the number of sequences and number of POIs. The run time is proportional to the number of sequences and the number of POIs. Table 5 shows that the average itinerary constructing time of the proposed method is only 0.16 minutes at Hollywood dataset that consists of 13 POIs. The execution time depends on number of POIs and number of sequences in each dataset. The run time of different datasets shows that the proposed EffiTourRec algorithm finds personalized recommended itineraries more efficiently than the existing baseline algorithms. We can see the ratio(%) efficiency values with the best existing algorithm and our proposed EffiTourRec algorithm in the last column of Table 5. It is clear that the proposed algorithm is The bold numbers express the best result

Number of moves analysis between EffiTourRec and Existing Method
Number of moves indicates the efficiency of the algorithms. If number of moves is less number that means it requires less time to generate an itinerary to the visitor. The number of potential POI moves of proposed EffiTourRec and existing PersQ algorithms are viewed in Table 6 for five datasets. All the values show that our proposed algorithm requires fewer number moves than the existing algorithm. The last row of the table 6 depicts the number of moves reduce ratio in percentage. We can see that our proposed algorithm efficiently prunes unnecessary moves using pruning rules and makes our model time efficient. It shows that compared to PersQ algorithm, our proposed method is able to reduce the number of moves by 42.63% to 62.89% in various datasets.

Effectiveness and efficiency analysis based on MaxLoop
In this work, the execution time and other evaluation metric values change with MaxLoop values change, which is significant for our proposed EffiTourRec and existing PersQ algorithms. These two algorithms used adaptive Monte Carlo Tree Search considering MaxLoop, whereas other baseline algorithms are maximum loop-free. The effects of the maximum loop iteration threshold on F1-score, execution time and the number of moves of our proposed method and existing method are shown in Fig. 7 Fig. 7 shows Disney Hollywood dataset results. First, second and third figure in Fig. 7 depicts F1-score, the execution time of a successful itinerary and the total number of moves, respectively.

Discussion
The vast application of personalized itinerary recommendation system increases due to the importance of tour planning researches in real life theme parks tours or unknown city tours. The proposed EffiTourRec algorithm outperforms because of its effective heuristic and efficient pruning technique. In the proposed heuristic, we focus on POI popularity, user's interest, travel time, visiting time and queuing time which are essential fundamental factors. Previous studies were concerned about the shortest visiting time POI visit priority, but they did not notice each POI queuing time relatively high. That is why the queuing time ratio increases instead of the POI visiting time ratio, which makes visitors bored. On the other hand, the user's interest measurement depends not only on the number of POI visits and the taken photographs but also on spending time on that particular POI. Existing models did not consider spending time impact to measure users interest. These two issues make our algorithm more effective than the baselines. Moreover, we use the pruning technique, which avoids low rewarded POI path exploration and avoids repeated exploration in the early stage. This technique saves a huge number of moves and time. Tables 5 and 6 show the time and move efficiency, respectively. These results present the best performance of our proposed EffiTourRec algorithm over the baseline algorithms. The baseline algorithms were included to depict only effectiveness based on evaluation metrics, which did not consider the efficiency measurement of these algorithms. To compare the time efficiency of our proposed algorithm and existing baseline algorithms, we show that our proposed algorithm is at least fifty percent faster than the baseline algorithms. Moreover, the proposed algorithm is able to reduce around fifty percent of POI moves because of its efficient pruning technique. However, our proposed method is able to consistently recommend itineraries that consist of higher precision, recall, F1-score and visiting time, and lower queuing time. Moreover, the itineraries recommended by the EffiTourRec algorithm utilize the visiting time more efficiently than the existing baselines.

Conclusion and future work
In this work, our main goal is to propose an effective and efficient itinerary recommendation that users get the maximum reward within budget time. We have designed a new algorithm EffiTourRec to recommend personalized itineraries based on adaptive Monte Carlo tree search using effective heuristic and efficient pruning techniques. Our proposed EffiTourRec shows that visitors' preferences proportion to prior visit time along with POI popularity and visitor interest. We evaluate experimental results on five theme park real datasets and show that proposed algorithm outperforms the state of the art in terms of tour precision, recall, F1-score, visiting time, queuing time, POI popularity and visitor interest alignment of POI visits. It also shows that proposed method is 40.00% to 67.64% faster than the existing baselines and prunes 42.63% to 62.89% moves than the existing algorithm. To our knowledge, it is the first work in personalized itineraries recommendation that considered both effectiveness and efficiency evaluation metrics simultaneously.
In our future work, we will consider dynamic queuing time managements and queuing capacity in each POI, instead of static queuing time management. We also intend to address a visitor's dynamic sentiment and activity-based interests for personalized tour recommendations.

Funding Open Access funding enabled and organized by CAUL and its Member Institutions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. Jeffrey Chan is a Associate Professor at RMIT University, Melbourne, Australia. He has a BEng, BSci and Ph.D., all from the University of Melbourne, and has interned at the National Institute of Informatics in Japan. He was previously a senior postdoctoral fellow at the Digital Enterprise Research Institute in Ireland and a research fellow at the University of Melbourne. He has over 100 publications in graph mining, social network analysis and data mining and his research interests are in Data Analytics, Analysing Graphs and Social Networks and learning about new and exciting research. Xiuzhen Zhang is a Professor in the School of Science (Computer Science and IT), RMIT University, Australia. She has received the Ph.D. degree in computer science from The University of Melbourne, Australia. She has been working in data mining and machine learning for more than 15 years and has published more than 100 papers in reputable journals and conferences including the IEEE Transactions on Knowledge and Data Engineering, KDD and PAKDD. She has been a PC member for international and Australian conferences including KDD, PAKDD, DEXA and ADC. Her research has been supported by Australian Research Council, Victorian State government, and industry grants.