Approximate Approaches To The Traveling Thief Problem: Hayden Faulkner, Sergey Polyakovskiy, Tom Schultz, Markus Wagner
Approximate Approaches To The Traveling Thief Problem: Hayden Faulkner, Sergey Polyakovskiy, Tom Schultz, Markus Wagner
Approximate Approaches To The Traveling Thief Problem: Hayden Faulkner, Sergey Polyakovskiy, Tom Schultz, Markus Wagner
ABSTRACT thief uses a knapsack of limited capacity and pays rent for it
This study addresses the recently introduced Traveling Thief depending on the overall travel duration. To make the two
Problem (TTP) which combines the classical Traveling components interdependent, the speed of the thief is made
Salesman Problem (TSP) with the 0-1 Knapsack Problem dependent (non-linearly) on the weight of the items picked
(KP). The problem consists of a set of cities, each containing so far. The thief has to visit all cities once and collect items
a set of available items with weights and profits. It involves so that the overall profit is maximized. While it is possible
searching for a permutation of the cities to visit and a deci- to generate solutions for the TTP by combining solutions
sion on items to pick. A selected item contributes its profit for the individual components, such approaches do not nec-
to the overall profit at the price of higher transportation essarily result in near-optimal solutions: (1) each solution
cost incurred by its weight. The objective is to maximize for the TSP hinders the best quality that can be achieved in
the resulting profit. the KP component because of the impact on the profit that
We propose a number of problem-specific packing strate- is a function of travel time, and vice versa (2) each solution
gies run on top of TSP solutions derived by the Chained for the KP component influences the tour time for TSP as
Lin-Kernighan heuristic. The investigations provided on different items impact the speed of travel differently due to
the set of benchmark instances prove their rapidity and ef- the variability of the weights of items.
ficiency when compared with an approximate mixed integer A range of different approaches to the problem have been
programming based approach and state-of-the-art heuristic developed recently. For example, Mei et al. [6] focus on large
solutions from the literature. TTP instances with relatively simple approaches. They an-
alyze the computational complexity of different algorithms
and suggest asymptotic speed-ups. The resulting algorithm
Categories and Subject Descriptors significantly outperforms the three iterative and constructive
G.1.6 [Optimization]: Miscellaneous; I.2.8 [Problem algorithms originally presented in [10]. Bonyadi et al. [4] are
Solving, Control Methods, and Search]: Scheduling the first to attempt to solve both components of the TTP
in parallel, instead of sequentially. The authors design a co-
Keywords evolutionary approach called CoSolver in which modules
responsible for either the TSP part or the KP part communi-
Traveling thief problem; local search; multi-component cate with each other. The proposed CoSolver outperforms
problems a heuristic similar to the constructive heuristic SH from [10].
Mei et al. [7] also investigate a co-evolutionary approach and
1. INTRODUCTION compare it to a memetic algorithm, with the result of the
Recently, a new benchmark problem called the Traveling memetic algorithm outperforming the co-evolutionary one.
Thief Problem (TTP )has been introduced [3] in an attempt Recently, Polyakovskiy et al. [11] investigated a non-linear
to provide an abstraction of problems with multiple inter- knapsack problem that occurs when packing items along a
dependent components. The underlying idea of TTP is to fixed route and taking into account travel time. They ad-
combine the Traveling Salesman Problem (TSP) and the dress the complexity of the problem and show that even the
Knapsack Problem (KP). They both have been intensively capacity unconstrained version is N P-hard. Subsequently,
studied for many years and are the core problems in the they propose exact and approximate mixed integer program-
field of optimization. The TTP comprises a thief stealing ming (MIP) solutions that are able to produce (near-) opti-
items with weights and profits from a number of cities. The mal results for instances of a moderate size.
Despite the state-of-the-art techniques there remains
Permission to make digital or hard copies of all or part of this work for personal or
potential for TTP-specific algorithms based on different
classroom use is granted without fee provided that copies are not made or distributed paradigms. In this article, we provide a set of structurally
for profit or commercial advantage and that copies bear this notice and the full cita- diverse algorithms to effectively solve the entire range of ex-
tion on the first page. Copyrights for components of this work owned by others than isting TTP instances.
ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or re-
publish, to post on servers or to redistribute to lists, requires prior specific permission This article is set out as follows. In Section 2 we outline
and/or a fee. Request permissions from [email protected]. the important features of the Traveling Thief Problem. In
GECCO 15, July 11 - 15, 2015, Madrid, Spain Section 3 we describe our three local search routines, based
c 2015 ACM. ISBN 978-1-4503-3472-3/15/07. . . $15.00 on which we construct heuristic searches in Section 4. Sec-
DOI: http://dx.doi.org/10.1145/2739480.2754716
tion 5 adopts the MIP based approximate approach of [11]
and yields another high-quality technique. In Section 6, we
present and compare their results with the state-of-the-art
solutions. We finish with some concluding remarks.
Algorithm 3
accordingly. However, as soon as the packing plan P yields Bitflip (,P )
Z < Z , the previous packing plan P is restored and the set Z = Z(, P )
algorithm returns back to consider the items again starting set P = P
with item Ik M . In addition, the frequency is halved. for each item Im M do
This strategy helps to identify the moment when no further if Im 6 P then
solution improvement is possible while keeping the algorithm add item Im , P = P {Im }
computationally fast. The heuristic terminates either when else
no further improvement is possible or the limit value of 1 is remove item Im , P = P \ {Im }
reached for .
To reach a better packing performance, we run the packing compute the objective value Z (, P )
routine routine Pack (,) iteratively for different values of if Z > Z then
the exponent . Algorithm 2 explains the structure of the set Z = Z
solution process. The algorithm PackIterative (,c,,q) set P = P
return P
is fed by the starting exponent value c R+ , and a de-
viation value R+ which defines the current studying
interval for potential exponent values as (c , c + ). In
addition, an integer q is given as a limit on the number of not necessarily be optimal for a given tour. Therefore, we
iterations. The algorithm starts with evaluating objective present two local search operators to complement the pack-
values obtained by Pack (,) in case of = c and in cases ing plan generation from Section 3.1.
of two terminal values = c and = c + . At each The BitFlip operator is a simple greedy hillclimber with a
iteration, the algorithm compares the corresponding objec- low runtime. Its pseudocode is shown in Algorithm 3. The
tive values Zl , Zm and Zr , and selects the further interval operator iteratively evaluates the outcome of flipping each
for investigation. Specifically, it switches its attention to bit position corresponding to item Im M in the packing
smaller values if (Zl > Zm ) (Zl > Zr ) or to larger values if plan P . If flipping a bit improves the objective value (Z >
(Zr > Zm ) (Zr > Zl ). Subsequently, the routine updates Z ), the change is kept, otherwise P remains unchanged. A
the best packing plan P found so far. In addition, it nar- single iteration of the operator ends when all bit flips have
rows the potential interval for a search setting = /2 and been attempted once. Multiple passes can result in further
changes the current exponent value c to c or c + , de- improvement of the objective value.
pending on which produces the largest objective value. The
searching process continues until the number of iterations 3.3 Insertion
performed reaches its limit or improvement in the objective The insertion operator takes advantage of the situation
value is less than , where is a small threshold constant. where a valuable item at a particular city is picked up early
and it is worth trying to delay the item pickup by modifying
3.2 Bitflip the tour . Figure 2 shows an example where city x2 is
The previously presented packing approach is not guaran- inserted later in the tour, after city x7 . In this case the result
teed to find a globally optimal TTP solution as (1) it does is a slightly longer tour, however the items at x2 are now
not modify the tours, and (2) the packing plan it finds may later in the tour and hence contribute a lower carrying cost.
Heuristic S4: run CLK, then PackIterative, then
repeat Insertion until converged;
Heuristic S5: repeat S1 until time is up.
Because Bitflip and Insertion are deterministic, we can
stop the heuristics S2 and S4 once the objective value does
not change.
Figure 2: A graphical example of insertion: The solid black (1+1)-EA is a simple alternative to the greedy Bitflip,
line represents the initial tour option, while the red dashed line which was previously used in [10]: given a packing plan, we
represents a modified tour where city x2 has been inserted after
flip each item with probability 1/m. If the TTP solution
city x7 . The red tour can have a higher objective score due to
a valuable (but heavy) picked item at city x2 . with the new packing plan has a higher objective value, we
use it as the next starting point. We terminate it once the
CPU time is used up.
Algorithm 4 Since we expect the different routines to be able to escape
Insertion (,P ) each others local optima, we also define the following slightly
for a = n 1 do more complex heuristics:
compute Z = Z(, P )
Heuristic C1: run CLK, then PackIterative, then
for b = a 1 1 do
repeat one Bitflip pass, one Insertion pass until
set =
converged;
insert city xa between xb and xb1 in tour
compute Z = Z( , P ) Heuristic C2: run CLK, then PackIterative, then
if Z > Z then repeat one Bitflip pass, one (1+1)-EA pass, one
set Z = Z Insertion pass;
set = Heuristic C3: run CLK until 10% of the time is used,
if b = 1 then then apply PackIterative, select the best of those,
set = then one Bitflip pass, one Insertion pass;
return
Heuristic C4: run CLK until 10% of the time is used,
then apply PackIterative, select the best of those,
then one Bitflip pass, one (1+1)-EA pass, one In-
There is a tradeoff between increasing the tour length and sertion pass;
hence travel time and carrying cost for all items before the
insertion point, and decreasing the carrying cost of the items Heuristic C5: repeat C1 until time is up;
of the inserted city. The insertion pseudocode is shown in Heuristic C6: repeat C2 until time is up.
Algorithm 4. The operator searches over all cities in reverse
tour order (xn x1 ), evaluating the effect of inserting each The heuristics C1 and C2 are straight-forward extensions
city at all positions before its own position in the tour . of S2 and S4, with the hope that the two routines comple-
If an insertion for a city xa is found that produces a greater ment each other. Heuristics C3 and C4 use 10% of their
objective value than (1) the current tour and (2) all other CPU time to sample better starting points. This allows us
insertions for a , then the tour is stored as . Once the to investigate the benefits of a better starting point over
tour has been completely checked for better positions for xa performing more iterations of the routines. Lastly, C5 and
then becomes the new tour and the process begins C6 are the restart variants of C1 and C2, with which we can
with the next city xa1 . Again, multiple passes can result observe the advantage of restarts to make the best use of
in further improvement of the objective value. the available computation time.
Note that in typical good solutions to the TTP many items Note that we limit (1+1)-EA to 10,000 iterations in these
are picked up towards the end of the tour. The intuition complex heuristics, whereas it is unlimited in the simple
is that it is not too harmful to the overall objective value ones. In addition, note that we decided to execute only sin-
if items are picked up late, since the speed of the thief is gle passes of Bitflip and Insertion per iteration due to
typically low at that point in time. We begin our insertions their computational complexity. With this interleaving of
at the end of the tour since this is a time consuming search the two routines, none of them will use a disproportionate
operation for very large instances. amount of time. This is important particularly for the in-
stances in which there are a large number of cities and items.
usw unc bsc usw unc bsc usw unc bsc usw unc bsc usw unc bsc usw unc bsc usw unc bsc usw unc bsc usw unc bsc usw unc bsc usw unc bsc usw unc bsc
7 88.0 99.2 99.2 99.2 99.2 99.2 99.2 95.6 This work has been supported by the ARC Discovery Project
3 98.2 99.2 99.3 99.3 99.3 99.3 99.3 99.5
582
DP130104395.
7 99.2 99.9 100 100 100 100 100 99.8
3 96.1 98.6 99.0 98.9 99.3 99.0 99.5 98.5
7 98.2 99.1 99.2 99.2 99.3 99.2 99.3 99.2 References
195
3 95.9 98.9 98.5 98.5 98.8 98.5 98.7 98.8 [3] M. R. Bonyadi, Z. Michalewicz, and L. Barone. The
7 96.3 97.9 97.6 97.7 97.9 97.7 97.8 98.6 travelling thief problem: The first step in the transi-
3 95.3 99.1 99.2 99.2 99.5 99.3 99.5 98.7
7 96.0 99.7 99.6 99.5 99.8 99.5 99.7 98.7 tion from theoretical problems to realistic problems. In
783
3 98.0 99.7 99.6 99.7 99.4 99.5 99.8 94.8 IEEE Congress on Evolutionary Computation (CEC),
7 97.0 99.5 99.4 99.4 99.3 99.1 99.5 94.5 pages 10371044. IEEE, 2013.
7820
3 98.0 99.7 99.4 99.4 98.5 98.0 99.5 99.0 York, NY, USA, 2014. ACM.
7 98.3 99.7 99.5 99.4 98.9 98.5 99.6 99.4
3 97.0 99.1 99.2 99.1 97.2 97.2 99.2 98.2 [5] S. Martello, D. Pisinger, and P. Toth. Dynamic pro-
3038
7 97.6 99.6 99.3 99.2 98.4 97.7 99.3 99.0 gramming and strong bounds for the 0-1 knapsack prob-
3 98.1 99.6 99.3 99.3 99.0 99.0 99.3 96.7 lem. Management Science, 45(3):414424, Mar. 1999.
7 97.0 99.2 98.7 98.8 98.6 98.2 98.9 95.8
30370
3 97.1 99.6 99.2 99.1 98.9 98.8 99.3 99.0 [6] Y. Mei, X. Li, and X. Yao. Improving efficiency of
7 97.8 99.5 99.3 99.3 99.2 98.9 99.3 99.2 heuristics for the large scale traveling thief problem.
3 94.8 98.9 98.2 98.3 97.6 97.6 98.6 98.3 In Simulated Evolution and Learning (SEAL), volume
7 96.2 99.1 98.6 98.4 98.5 97.9 98.6 98.6
3 97.1 99.2 98.4 98.6 97.3 97.4 97.5 93.5 8886 of LNCS, pages 631643. Springer, 2014.
7 96.7 98.9 97.9 98.1 96.6 96.7 96.7 93.9 [7] Y. Mei, X. Li, and X. Yao. On investigation of interde-
35544
3 97.2 99.2 98.6 98.7 97.4 97.6 98.3 98.4 proach to characterize algorithm performance for the
7 97.4 99.2 98.6 98.4 97.9 97.8 98.5 98.8 traveling salesperson problem. Annals of Mathematics
3 95.3 98.3 97.8 97.8 95.6 95.9 97.1 97.6
7 96.2 98.9 98.1 98.0 96.7 96.7 97.9 98.5 and Artificial Intelligence, 69(2):151182, 2013.
3 91.3 97.9 95.5 94.0 93.9 92.0 98.3 94.4 [9] S. Nallaperuma, M. Wagner, and F. Neumann. Param-
7 91.0 97.9 94.2 95.3 93.8 91.7 96.5 94.1
101427
3 70.6 73.5 71.4 71.5 71.2 70.9 73.3 75.8 eter prediction based on features of evolved instances
7 95.1 98.2 96.4 96.0 95.3 95.5 99.9 98.4 for ant colony optimization and the traveling salesper-
3 90.4 97.5 93.7 93.3 92.5 91.8 96.2 95.9 son problem. In Parallel Problem Solving from Na-
33810
7 92.2 98.0 94.7 93.9 93.9 93.5 98.1 97.4 ture PPSN XIII, volume 8672 of LNCS, pages 100109.
3 92.2 97.3 93.8 93.3 92.5 92.4 99.1 93.9
7 92.6 97.1 94.9 94.3 92.6 93.3 96.9 94.6 Springer, 2014.
338090
3 94.7 98.3 95.3 95.5 95.8 95.0 97.8 98.0 [10] S. Polyakovskiy, M. R. Bonyadi, M. Wagner,
7 95.0 98.4 96.0 96.1 96.2 95.7 98.5 98.7
3 91.3 97.7 93.5 92.8 92.1 92.3 98.3 96.4 Z. Michalewicz, and F. Neumann. A comprehensive
7 93.9 98.3 94.4 95.1 94.1 94.6 99.5 98.3 benchmark set and heuristics for the traveling thief
3 95.8 98.3 96.3 95.8 95.9 96.4 97.6 - problem. In Genetic and Evolutionary Computation
7 96.1 97.8 96.8 95.9 96.3 97.1 98.4 - Conference (GECCO), pages 477484. ACM, 2014.
338090
3 97.6 97.5 92.1 92.0 97.6 97.3 - - LNCS, pages 330344. Springer, 2015.
7 97.9 97.9 94.6 94.5 97.8 97.7 - 98.5
3 95.7 97.5 91.8 92.7 96.3 95.3 - - [12] G. Reinelt. TSPLIB - A Traveling Salesman Problem
7 96.6 96.9 93.2 93.2 96.5 96.3 - 97.9 Library. ORSA Journal on Computing, 3(4):376384,
avg 95.2 98.2 97.0 96.9 96.9 96.8 87.2 84.9 1991.
avg-85900 95.0 98.3 97.5 97.4 97.0 96.8 98.1 97.0
[13] K. Smith-Miles, J. van Hemert, and X. Y. Lim. Un-
Table 1: Approximation ratios achieved. n is the number of derstanding TSP difficulty by learning from evolved
cities, m the number of items, t stands for the three KP types,
and F stands for the KP size. avg is the average ratio achieved
instances. In Learning and Intelligent Optimization
across all 72 instances, avg-85900 across the top 60 instances. (LION), pages 266280. Springer, 2010.