Whac-a-mole or collecting items from a dynamic queue

In this problem we are given a queue of weighted items that can change over time. Every time step items from the beginning of the queue can be deleted, and new items can appear at the end. These operations are not known in advance. Every time step you can pick one of the available items. The goal is to collect as much as possible.

This problem has been studied by Marcin Bienkowski, Marek Chrobak, Christoph Dürr, Mathilde Hurand, Artur Jeż, Łukasz Jeż, Jakub Łopuszański, and Grzegorz Stachowiak.