The solver averages 4.42 guesses across all 1296 possible codes.
Includes an interactive game where you can see the optimal next move.