Sequence X consists of N pegs each randomly assigned on of M colours. One each go, the player places N coloured pegs in a line. If they exactly match sequence X, the game terminates. Otherwise, the player is told how many pegs in their sequence are the same colour as the pegs in the same position in sequence X, and how many of their pegs have a colour which is one of the coulours contained in sequence X.
On average, after how many goes would the game end, assuming perfect play?