Code Hunt is a web based game created by Microsoft Research to teach people how to code. The premise is that people are playing Code Hunters who go into the wild to capture fragments of lost code. Of course, the the wild code is incomplete and players will have to fix the error in order to make the capture.
A leaderboard has been included as part of the game, mostly for people to see how their coding skills compare to others. Points are scored for coding efficiency and elegance of the solution. The tutorial encourages shorter and simpler solutions; the kind of code that is important for making a good program.
Unlike most other educational games, Code Hunt does not present a static set of problems to be solved. Instead it presents a blank slate or constantly changing test cases. Meaning that the game allows for multiple solutions as your coding abilities improve.
Aspiring software engineers can give the game a try here.