Solve 4x4 Mastermind in exactly 5 steps Background
Mastermind is a game of code-breaking for two players. One of the players is codemaker (Alice) and the other is codebreaker (Bob).
4x4 means that the player should guess the length-4 sequence made of four alphabets (say RGBY). The hidden sequence may have duplicate letters, so there are \$4^4 = 256\$ possibilities in total.
At the start of the game, Alice sets up a hidden code, which Bob should guess correctly within a set number of turns. At each turn, Bob presents a guess, and Alice tells Bob how many of the positions are correct, and how many of the letters are correct but at a wrong position. For example, if the hidden code is RRYG and Bob guessed BRGY:
          Code: R R Y G
         Guess: B R G Y
       Correct: R(2nd-2nd)
Wrong position: Y(3rd-4th), G(4th-3rd)

Then Alice tells Bob the two counts 1, 2. (Note that the first R in the code does not contribute to the counts because the second R in the guess was already consumed as Correct.) Bob repeats the guess with different sequences, until the guess is identical to the code (getting 4, 0) or he runs out of turns.
Challenge
The Dream World mastermind solver features four specific guesses so that the unique answer can be derived from their outcomes in all cases. The guesses are as follows:
1. R G G R
2. B B R R
3. Y Y G R
4. G B B Y

Given the outcomes of the four combinations above (four pairs of integers), output the unique hidden code.
You can assume the input is valid and the answer exists. You can choose to output any four distinct values (numbers/characters) in place of RGBY.
Standard code-golf rules apply. The shortest code in bytes wins.
NB: Fetching the results from the linked website is a standard loophole, and therefore forbidden.
Test cases
Each pair in the input represents (correct, misplaced). Note that the answer can be one of the four predefined guesses (generating a (4, 0) in the input).
(2, 0), (2, 0), (1, 0), (0, 0) =&gt; R R R R
(2, 1), (1, 0), (1, 2), (1, 1) =&gt; G G Y R
(0, 2), (0, 2), (0, 3), (1, 2) =&gt; G R Y B
(2, 0), (0, 0), (2, 0), (0, 2) =&gt; Y G G G
(1, 1), (4, 0), (1, 0), (1, 1) =&gt; B B R R
05AB1E, 38 33 32 bytes
-6 bytes thanks to Kevin Cruijssen!
For each possible output this generates the input and selects the matching one. Colors are encoded as B=0, G=1, R=2, Y=3.
3Ý4ãʒU•˜ÐÐÛ•4в4äεœεX-0¢}¬Dràα‚}Q

Try it online!
Commented:
3Ý4ã              # Generate all possible outputs
3Ý                # range [0 .. 3]
  4и              # to the 4th cartesian power

ʒU ... Q          # filter the possible outputs
                  #   where the following equals the input
                  #   and assign the current output to variable X

•˜ÐÐÛ•4в4ä        # encode the 4 guesses
•˜ÐÐÛ•            # compressed integer 2517300803
      4в          # convert to base 4:
                  #   [2,1,1,2,0,0,2,2,3,3,1,2,1,0,0,3]
        4ä        # split into 4 groups:
                  #   [2,1,1,2],[0,0,2,2],[3,3,1,2],[1,0,0,3]
       &#32;
εœεX-0¢}¬Dràα‚}   # compute the score for each guess
ε             }   # map over the guesses ...
 œ                #   take all permutations
                  #     the first will be the original guess
  ε    }          #   map over the permuations ...
   X-             #     subtract the current output
     0¢           #     count the 0's
        ¬         #   get the head without popping
                  #     this is number of correct positions (c)
         D        #   duplicate it       =&gt; c, c, [...]
          r       #   reverse the stack  =&gt; [...], c, c
           à      #   take the maximum&#32;
                  #     this is number of correct colors,
                  #     correct and misplaced (c+m)
                  #                      =&gt; c+m, c, c
            α     #   absolut difference =&gt; |c-(c+m)|, c = m, c
             ‚    #   pair up     =&gt; [c, m]