2 Added the case when both player know both hands

What do you mean by best strategy? Given that the players don’t know the hand of the other player, it is impossible to know what will be a winning strategy.

For example, let’s suppose that I’m the first player and that my hand is {1, 4}.
If the hand of the other player is {4}, I win if I play 4 and I lose if I play 1.
But if the hand of the other player is {2, 3, 5}, I lose if I play 4 and I win if I play 1.

So if my hand is {1, 4}, there is no winning strategy, it depends on the hand of the other player.

(if I understood the rules correctly)

Edit: If you consider that both player know both hands, then the game is finite with perfect information, so you can draw the graph of all possible outcomes and determine recursively the winning and losing positions (as with all finite games with perfect information).

But perhaps there is a winning strategy more easily computable, I don’t know, I will try to see if there is one.

1

What do you mean by best strategy? Given that the players don’t know the hand of the other player, it is impossible to know what will be a winning strategy.

For example, let’s suppose that I’m the first player and that my hand is {1, 4}.
If the hand of the other player is {4}, I win if I play 4 and I lose if I play 1.
But if the hand of the other player is {2, 3, 5}, I lose if I play 4 and I win if I play 1.

So if my hand is {1, 4}, there is no winning strategy, it depends on the hand of the other player.

(if I understood the rules correctly)