I have the following Nim-like game (at least, it seems Nim-like to me).

There are $2k$ tokens in a row, $k \in \mathbb{N}$.

Each token $a_i$ has a value $ v_i \in \mathbb{N}$

All this information is revealed to both players in advance.

In each turn, the acting player needs to take one token *from on of the edges only!* - i.e: take $a_i$ such that: $i$ is either the lowest remaining available index or the highest.

What would be a winning strategy for the first player? (computable in "reasonable")

Example game:

Tokens: $a_1=7;a_2=3;a_3=1000;a_4=10;a_5=7;a_6=1000 $

(Here $k=3$)

Turn 1 - Player 1 take $a_6$.

Turn 2 - Player 2 takes $a_1$

Turn 1 - Player 1 take $a_5$.

Turn 2 - Player 2 takes $a_4$

Turn 1 - Player 1 take $a_3$.

Turn 2 - Player 2 takes $a_2$

Player 1 wins with 2007 points. Player 2 loses with 20 points.

Winning Ways for your Mathematical Playsby Elwyn R. Berlekamp, John H. Conway, and Richard K. Guy develops what's more or less a general theory of num-like games. That shoould probably be the first place to look for information. $\endgroup$