arXiv:2611.12597cs.CLNov 2026

Manuscript Offprint

arXiv:2611.12597

Unmasking Four Knapsack Problems in the Traveling Thief Benchmark

Mohammed Mizan Alanazi, Mahdi Khemakhem

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

The traveling thief problem (TTP) asks a thief to choose a tour and a packing together, and the benchmark of 9,720 instances of Polyakovskiy et al. (2014) is the standard test set for comparing TTP heuristics. We show that four of these instances are not TTP instances at all. Their files give a renting rate of 0.00, so the tour has no effect on the objective and each instance reduces to a 0-1 knapsack problem. One of them belongs to the 60 categorized instances on which new methods are usually compared, and on it five of nine published methods report exactly the same value. The cause is the format of the files, which keep the renting rate with two decimals, while the rule of the generator gives a rate close to 0.003 on these instances. The same rounding may shift the rate of 949 other instances by more than 1%. Since the tour and the packing used by the generator were not published, the original rates cannot be recovered. We therefore define new rates with the same rule, applied to a fully specified reference solution that we publish, and we show with a published heuristic that the corrected instances behave as TTP instances again. We also give reference results on the corrected instances and recommendations for future studies. Finally, we present ttplib, a new open-source Python library that loads any of the 9,720 instances, including the corrected ones, without downloading the whole benchmark.

Keywords: Traveling thief problem, Benchmark instances, Renting rate, Rounding error, 0-1 knapsack problem, Open-source library

1 Introduction

In the traveling thief problem (Bonyadi et al. 2013), a thief visits every city once and fills a knapsack with items found along the way. We use the formulation of the benchmark (Polyakovskiy et al. 2014a). An instance has nn cities, numbered 0,…,n−10, \ldots, n-1 with the depot at city 0, and mm items. Item jj has a profit pjp_j and a weight wjw_j, and it lies in city aj≠0a_j \neq 0. The knapsack holds at most WW, the rent is RR per unit of time, and the speed of the thief falls linearly with the carried weight cc,

v(c)=vmax⁡−νc,ν=vmax⁡−vmin⁡W,(1)v(c)=v_{\max}-\nu c,\qquad \nu=\frac{v_{\max}-v_{\min}}{W}, \tag{1}

from vmax⁡v_{\max} when empty to vmin⁡v_{\min} when full. A solution is a tour π\pi that visits every city once and returns to the depot, written as the sequence of cities π0,π1,…,πn\pi_0, \pi_1, \ldots, \pi_n with π0=πn=0\pi_0 = \pi_n = 0, together with a set SS of picked items with ∑j∈Swj≤W\sum_{j \in S} w_j \leq W. Edge ss of the tour goes from πs\pi_s to πs+1\pi_{s+1}, for s=0,…,n−1s=0,\ldots,n-1. We note dsd_s for its length, which is the Euclidean distance rounded up to the next integer, and csc_s for the weight carried on it, which is the total weight of the items picked in the cities π0,…,πs\pi_0,\ldots,\pi_s. The objective, to be maximized, is the profit minus the rent paid for the travel time,

Z(π,S)=P(S)−RT(π,S),P(S)=∑j∈Spj,T(π,S)=∑s=0n−1dsv(cs).(2)Z(\pi,S)=P(S)-RT(\pi,S),\qquad P(S)=\sum_{j\in S}p_j,\qquad T(\pi,S)=\sum_{s=0}^{n-1}\frac{d_s}{v(c_s)}. \tag{2}

The benchmark of Polyakovskiy et al. (2014a)1^1 crosses 81 instances of the TSP library with four numbers of items per city, three types of knapsack and ten capacity levels, which gives 9,720 instances. The capacity level, from 01 to 10, is the last part of the name of an instance. It was used in the IEEE CEC 2014 competition (Polyakovskiy et al. 2014b). Since then, few studies have used the full set, and different studies have chosen different subsets (Wagner et al. 2018). The full set is too large for the usual protocol of ten runs of ten minutes per instance, which would take about 1.8 years of computing time for a single method. Most recent comparisons therefore use 60 categorized instances sampled from the 9,720, a sample introduced by El Yafrani and Ahiod (2016) following the sample instances of the CEC 2014 competition and used, for example, by El Yafrani and Ahiod (2018) and Namazi et al. (2019, 2023). This sample takes twenty TSP instances, from eil76 with 76 cities to pla33810 with 33,810 cities, so that it covers small, medium and large instances. On each of them, it takes one TTP instance of each of three categories, which represent three different kinds of difficulty. Category A has one item per city, a bounded strongly correlated knapsack and the smallest capacity (level 01), so few items can be picked and the tour has a large weight in the objective. Category B has five items per city, an uncorrelated knapsack with similar weights and a medium capacity (level 05). Category C has ten items per city, an uncorrelated knapsack and the largest capacity (level 10), so the packing has the most choices. Published values exist for many methods on these 60 instances, which is the main reason why new methods are compared on them. Sarkar

1^1The original files of the 9,720 instances are available at https://cs.adelaide.edu.au/~optlog/CEC2014COMP_InstancesNew/, accessed on 27 October 2026.

and Rajendran (2024) survey the variants of the problem and the methods proposed for it.

The rent RR links the two parts of the problem. If RR is large, the travel time dominates the objective. If RR is small, the profit dominates. If R=0R=0, the second term of Eq. (2) vanishes and Z(π,S)=P(S)Z(\pi, S) = P(S) for every tour π\pi. Maximizing P(S)P(S) under the capacity constraint is the 0-1 knapsack problem. Any tour can be used, and the best solution is an optimal packing of the knapsack part (Wagner et al. 2018). Some tables of instances in the literature list a rent of 0.00, for example for two of the dsj1000 instances in Ali et al. (2021), and Nikfarjam et al. (2024) left aside the first dsj1000 instances because their rent is zero, which turns them into knapsack problems. To the best of our knowledge, no study has explained where these zeros come from, listed all the instances concerned, examined the effect of the zero rent on published results, or proposed a correction.

We discovered this case while working on a new method to solve the TTP. On the instance of category A built on dsj1000, repeated runs returned exactly the same value, 144,426, which is the optimal profit of the knapsack part, and the file of this instance gives R=0.00R=0.00. We also noticed that, on this instance, most of the methods compared in recent studies report values very close to this optimum, and five of them report exactly the same value. We then read all 9,720 files to find every instance with this problem, and to measure how far the way the rent is stored affects the others.

This note aims to make the problem known to the community and to give a simple way to fix it. Section 2 describes the four instances and explains why their rent is zero. Section 3 defines new rents and gives reference results on the corrected instances. Section 4 presents the corrected files and ttplib, a new library that we developed, and Section 5 concludes with recommendations.