The relay score is an arbitrary number that is given to each relay based on a few performance points. Its goal is to figure out what is the most responsive and fastest relay.
Right now the score only takes into account, average connection time, average response time, and average connection length
Its not perfect and I need to include negative scores, so it knows to stop connecting to relays that are offline but it works for now.
the code for calculating the score is here https://github.com/hzrd149/nostrudel/blob/master/src/services/relay-scoreboard.ts#L155-L187