Your algorithm could try to maximize the overall score (for instance you may assign
12
points to a '
priority 1' hit,
6
points to a '
priority 2' hit,
3
point to a
'priority 1' hit,
0
points if the assigned project wasn't in the priority list of the student).
While for a small number of items (students, supervisors,...) even a brute force approach would fit, you may have a look at the
Simulated Annealing[
^] algorithm.