
Thanks everybody for all the comments!
lycium
I downloaded if from EndEffect. They're really amazing! This wallpaper is called Micro.
Concerning the minumum number of guesses needed to break a code (4 pegs, 6 colors): in 1993, Kenji Koyama and Tony W. Lai calculated that the best strategy uses an average of 5625/1296 = 4.340 moves (with just one case needing a six move solution).
Ron Frazier
In the optimal algorithm, the guess that yields the most information about the secret code is submitted. It need not be correct (in the sense that it could be the secret code).
Politik
The optimal algorithm is quite slow. That's because it calculates the usefulness of every possible code each time it submits a guess. When you have 6 pegs and 6 colors, there are pow(6, 6) possible codes. For each of those 46656 codes the usefulness is calculated (we do not exclude codes that aren't possible anymore, because they still can yield a lot of information  see previous paragraph). This calculation again involves iterating over 46656 codes (this is needed to get the number of codes that are invalidated by our guess and a certain marker, and to calculate the chance we actually receive that marker when we submit the guess).
However, with a little tweaking (and, most importantly, rewriting it in a decent language :), it can probably be made a lot faster.
