How is the Rating calculated?
Solution 1:
Every player has a rating point value that defaults to 1,000. Each time you win a battle against an opponent, you receive more points and when you lose a game, you lose points as well. Ranking is only calculated when you play a ranking game, not when you play against the AI.
The amount that you receive is calculated based off of the rank of your opponent. Basically, the higher the number of rating points they have, the more points you earn when you beat them and less you would lose in the case of a loss. Likewise, the higher your rank over your opponent, the fewer points you would gain when you win and the more you would lose if you lost the game. [source]
I've done a lot of digging and it doesn't look like the exact formula has been officially provided. However, one could probably reverse-engineer the formula if they did a bit of coordinated research with a couple opponents and tracked everyones ratings before and after each game, using the Scrolls chat-bot.
This data is maintained and updated by an IRC chat-bot that monitors all communication on the (assumed) official IRC channels. When a player wins or loses, the IRC chat-bot records the information in it's database and updates the players rank.
For more information on the chat-bot, see here.