Wikipedia has the nice section on optimal Mastermind strategies:
In 1977, Donald Knuth demonstrated that the codebreaker can solve the
pattern in five moves or fewer, using an algorithm that progressively
reduced the number of possible patterns. The algorithm works as
follows:
Create the set S of 1296 possible codes, 1111,1112,.., 6666.
...

We first present a complete description and analysis of an approach that
takes
Furthermore, we will show that with fewer guesses one cannot guarantee success.
Description and analysis of the algorithm
With a first guess 00000, the six possible answers are as follows:
Score 0: Then the hidden number is 11111. Done.
Score 1: Then we succeed with a total ...

The secret code is:
Explanation: At first glance, my gut instinct (soon to be proved wrong) told me this must be impossible! After all:
However, then I realised I had completely overlooked the possibility that:
Which colour could this be? Well, we know from guess#3 and guess#4 that we have to have:
So:
It now follows that the other three must be ordered ...

It is impossible with fewer than six guesses, because it could happen that the correct color is one that your friend never guesses. This strategy gets every combination with six guesses:
Always guess a combination that has not been ruled out yet.
If possible, choose a combination with a color that has not been guessed before.
If still possible, choose a ...

Start by guessing the following N digit numbers:
One of these guesses must give us a 50% response because
If we have a 50% guess, all we have to do is
After this, there are only 2 possible values for the hidden number:
This was $(N+1)+(N-1)+2\le2002$ guesses in total.

Your friend needs to find the correct plane out of 72 possibilities. Assuming each question he asks has to be a yes/no question (otherwise he could just ask "what colour is the plane?" etc., making it trivial!), each answer he gets gives him one bit of information. 72 in binary is 1001000, which is 7 bits, so at least 7 questions are needed.
He can get the ...

I play Mastermind with numbers instead of colours, because I first learned it in the second grade as Bagel Pico Fermi which uses numbers. For the rest of my answer, I will refer to red pegs as "bagels", and white pegs as "picos" (and holes without pegs as "fermis").
The system I tend to use is suboptimal but very easy to follow. It goes as follows:
Start ...

According to codebreaker-mastermind-superhirn.blogspot.co.uk
The exact year when the number guessing game Bulls and Cows was invented is not known. "Bulls and Cows has been played as a paper-and-pencil game for a century or more. I first played a computer version in 1968 on Titan, the Cambridge University Atlas" (John Francis, 2010 [dead link to "Bulls ...

Call the three clues 1, 2, 3. Looking at 1 and 3, we can deduce that
Therefore two of
are in the number. But it can't be
Looking at 2 we deduce that
Hence
Therefore looking at 1,
Thus the second last digit must be a
since A+B+C+D+E=10D+E.
Now the third digit must therefore be a
and the sum of the first four digits must be
Therefore we must have
...

Here are some of the cryptics:
1
States of mind of a weird sinful city
Branches tableware
Rumble of a Greek nocturnal bird
First, a mountain combined with the sound of laughter
2
Reasoning hidden in catalog icons
Polishes Sam & Sue initially
3
Heartless kissers fly by night
A flightless bird in France produces a bird
4
Bill is a potential ...

Any first move is equal, as long as it follows the pattern XXYY.
The way you number the holes in the first move is only a base reference point for the subsequent moves.
So, choose an arbitrary first move, name those first choices as they are named at the start of the stragey and then apply the complete strategy.
The article basically says "start with 1122,...

A simple strategy which is good and computationally much faster than Knuth's is the following (I have programmed both)
Create the list 1111,...,6666 of all candidate secret codes
Start with 1122.
Repeat the following 2 steps:
1) After you got the answer (number of red and number of white pegs) eliminate from the list of candidates all codes that would ...

My guess is 6. At least with the following guesses you can know the solution
0001
0123
2414
4502
1453
0115
I used a computer program to get this. My approach was first to match every move with every solution and see how many different pin configurations there were and take the first move that has the maximum value for this. After that take that 'best' ...

I've found the answers too complicate, so I share mine. Only three rules are needed:
501 — Two correct numbers in wrong places
135 — One correct number in the right place
167 — One correct number in wrong place

The Abyss Creature Chief said:
First I determined what the party consists of
Now that the party is determined the only way I could see how to approach this is try to assert one position as correct and see if it works out.