Mishnah Sanhedrin 4,4:
"ושלש שורות של תלמידי חכמים יושבין לפניהם כל אחד ואחד מכיר את מקומו"
Three rows of the Sages sit before [the Sanhedrin of 71], every one of them knows his place
"בכל שורה מהם ג"כ כ"ג מסודרין ראשון ושני ושלישי עד סופם כפי מעלתם בחכמה"
23 of them in every row arranged the first, the second, the third till the last one according to their wisdom
To elaborate how-were-judges-appointed: it seems to be a tough task - to compare different Rabbis, at times when no prophecy and no Halachic books existed. According to Rambam it was the standard procedure when appointing all sort of Beis Dins from the tree of Mamonos straight to the 71 of the Great Sanhedrin.
In other words: if the Sanhedrin was elected in our days, how would you evaluate the Gdoylim of the 20th century: Chofetz Chaim, Chazon Ish, R' Elyashiv, R' Moshe Feinstein, R' Shteinman, R' Ovadia or the Lubavicher Rebe Z"Ls?
What was the procedure or tests to evaluate Rabbis' wisdom?
How often did those tests take place? How many time were they re-evaluated and re-seated?
What institution was in charge of this evaluation and how its members were elected?