ScoreKit implements the Elo rating system for calculating a player's relative skill. It was developed for Chess, but can be used in a myriad of two- and multi-player games.
It uses a strategy to provide the variability, so you can easily write your own variant and plug it into the same algorithm.