How do I implement a gamification system like WPMU (badges, points, etc)

How do I implement a gamification system like WPMU (badges, points, etc)