0 votes
1 view
in AI and Deep Learning by (19.2k points)
Someday I was given such a question, two-player(A, B) and 4 slots, each player put "N" or "O" to these slots, who first spell 'NON' win this game. Is there a strategy player A or player B will be a sure success? I am not very familiar with this, so he gives some hints for the below case, B will succeed no matter what A puts.

[N(A puts) |_ | _ | N(B puts)]

First A put N at the first index of this array, then B put N at the last position. Then no matter what and where A puts, B will win.

So the question is if the slots are added to 7 slots, is there the same strategy?

[ _ |_ | _ | _ | _ | _ | _ ]

I thought a way similar to cases of four slots, however, it needs such preconditions. I am not sure whether there's some theory behind that.

[ N |_ | _ | N | _ | _ | N ]

1 Answer

0 votes
by (42.6k points)

It depends on what they need to do to achieve "success". The first player will always win this game. The winning act is _ _ _ N _ _ _

Since only 7 slots, so there are only 3 ^ 7 states of this game. So each state can be easily calculated by dynamic programming.

...