This is a Mastermind implementation, but it is surprisingly limited by adding the constraint that the code cannot contain duplicate colours. With a sequence of four colours to guess, and a range of six colours to select from, this drops the possible number of codes from 1296 to 360.