A State Aggregation Approach for Solving Knapsack Problem with Deep Reinforcement Learning

Reza Refaei Afshar, Yingqian Zhang, Murat Firat, Uzay Kaymak

Research output: Contribution to journalConference Article in journalAcademicpeer-review


This paper proposes a Deep Reinforcement Learning (DRL) approach for solving knapsack problem. The proposed method consists of a state aggregation step based on tabular reinforcement learning to extract features and construct states. The state aggregation policy is applied to each problem instance of the knapsack problem, which is used with Advantage Actor Critic (A2C) algorithm to train a policy through which the items are sequentially selected at each time step. The method is a constructive solution approach and the process of selecting items is repeated until the final solution is obtained. The experiments show that our approach provides close to optimal solutions for all tested instances, outperforms the greedy algorithm, and is able to handle larger instances and more flexible than an existing DRL approach. In addition, the results demonstrate that the proposed model with the state aggregation strategy not only gives better solutions but also learns in less timesteps, than the one without state aggregation.

Original languageEnglish
Pages (from-to)81-96
Number of pages16
JournalProceedings of Machine Learning Research
Publication statusPublished - 2020
Externally publishedYes
Event12th Asian Conference on Machine Learning, ACML 2020 - Bangkok, Thailand
Duration: 18 Nov 202020 Nov 2020


  • Combinatorial Optimization Problems
  • Deep Reinforcement Learning
  • Knapsack Problem
  • State Aggregation


Dive into the research topics of 'A State Aggregation Approach for Solving Knapsack Problem with Deep Reinforcement Learning'. Together they form a unique fingerprint.

Cite this