I did a little research on how other people have solved the problem of satisfying players' preferences for which country they start with, and have done a little thinking of my own on the issue. I will share what I found here.
First of all, I should note that official rules state that countries should be distributed randomly, as is (presumably) already done here at phpDiplomacy. But I'll ignore that for the moment....
An excellent primer on the different methods for assigning countries is available at [http://devel.diplom.org/DipPouch/Zine/F1998M/Tarzan/assign.html]. Unfortunately, no algorithms are given there, but it is a quick and easy way to get around the philosophical issues that must be dealt with for each method of determining player assignment. Since phpDiplomacy is aimed at ease of use, and so has far more potential to be used by newer players than any other online Diplomacy system on the web right now, it is important to keep this aspect of phpDiplomacy's unique situation in perspective. Fairness is important in all of its forms, but most important here is keeping players happy. We must minimize situations where players are assigned countries that they do not want. This means Method 2 Variation B or a bottom weighted C is the way to go.
But we also must not neglect the importance of being able to choose ties for preferences, a random starting position, and a no preference option. This is where things get a bit tricky.
The order of execution is what is important here. Players who want a random country should be processed first, followed by those with a preference, followed by those who don't care. Random must come first, otherwise it will not be random.
(There is a possible argument here. Consider if six players pick random and one chooses anything but Italy, then it is possible for that one player to get Italy, even though no one else had a real preference for any individual country. But I feel this is acceptable, because these players wanted a true random starting position, whereas if they really didn't care, they could instead have chosen 'Don't Care', which would be a random position set _after_ all other players have gotten their preferences. (This is why 'Don't Care' should be default setting.) You might argue that this is 'rewarding' the players who want a random country; that argument would be correct, since if you pick random, you always get what you want, whereas if you pick England and have no other preferences, you may not get what you want. But I don't care--I don't feel like rewarding the 'Random' players in this way is a bad thing.)
After random is processed, then player preferences must be taken into account. I recommend the simplex algorithm method. (See [http://en.wikipedia.org/wiki/Simplex_algorithm_method].) This is what I would use if I were in charge of determining what method to utilize. If desired, I can create a simplified algorithm for optimizing a seven dimensional solution for the site. But I don't know coding very well, so I would need help translating from straight mathematics to practical code you can use on the site.
And finally the remaining countries would be assigned randomly to those players that chose 'do not care'.
Please note that DPJudge uses a system I _highly_ detest; it takes into account who inputs their preferences first in order to determine who gets what, and has no option for true randomization.
The following two rec.games.diplomacy threads may be of interest to those who also want to look into this:
http://groups.google.com/group/rec.games.diplomacy/browse_thread/thread/a46bb326f3d62461/f6c8f50a6b85259a#f6c8f50a6b85259a
http://groups.google.com/group/rec.games.diplomacy/browse_thread/thread/a06586526d5165b1/771960de312cc03d#771960de312cc03d
Other options include utilizing a brute force method, which only has to go through 7! combinations (5040), or a pseudo-brute force method, which picks 1000 or so random combinations and picks the best from those tried. These would be easiest to code, but would be hardest on the computation. Another option would be to remove the possibility of ties in players' preference setting, which would make the optimal solution extremely easy to find.
Please respond with any comments or criticism on the method I've described above.