a naive approach would involve looking at the 2**n set of "which pins are remaining", but I think you can do this in quadratic time with dp with the observation that you can only take r_{ij} iff you knock down all the pins in between i and j, and that necessarily precludes taking r_{kl} for i < k < j < l, so you can do a sub-dp to find the optimal value of knocking down those in-between pins.
can we do better than quadratic for this related problem? wait, also, I think my solution only requires a linear scan in addition to the recursive call but if we're not careful I think it quickly becomes cubic.
This lends itself to a solution that doesn't use dictionaries or even lists. To decide whether you want to: skip the current pin, take the current pin alone, or take the current pin together with the previous, you only need to keep track of the previous pin's value, and the past two scores. For example, in Python:
(This solution still has a list with the input values, but it is only iterated over, so you could just as easily read those one-by-one from an input file, for an O(1) memory solution.)