For a DQN algorithm, where my state is a list of values, say: [5, 3, 4, 7, 8, 2, 6]
How can I define an action space that allows me to move a value in the list from one position to another? For example, the action should tell to move the '7' to the first position in the list. Here assume that the reward is a function of the order of values in the list.
This is likely similar to how chess would be played, where the action is a combination of picking a piece and choosing a position to put it in.
Note: this is an overgeneralization of what I actually want to do, but conceptually this is representative enough.