I accidentally overcomplicated the script as I will probably only be calculating one game at a time
This is using the Elo system: https://en.wikipedia.org/wiki/Chess_rating_system#Linear_approximation Whoops I just realised you could simply go onto the fide website :P