Basically, but doing only this results in only ever connecting to hubs if you have a cap on simultaneous connections. So I randomize to sometimes get fringe relays to rank higher. If you keep good stats you start to find out which relays are dead or don't have the data you want, which greatly reduces the number of possible relays you have to choose from. I haven't implemented the data tracking part of that though.