The algorithm finds a 'score' for each team, and goes through all the games in the season (0.4.1 includes the previous season, dropping 2 games each week, until it gets to week 8). It uses an Excel-solver-like algorithm to solve this score so that the sum of the error is as low as possible.
The algorithm comes from this book:
http://amzn.to/1QNLgQh