Programming Comparisons: Pyramid


Pyramid is a solitaire variant, the rules of which are explained here.

The point of this exercise is to demonstrate elegant programming style, an intelligent computer player, and speed of execution. The program must minimally take a number of games to play as its argument, and exit printing a line of the form:

N games played in T.T seconds.  Average score: S.SS.
The score should be the average over all the games based on the scoring system given on the page above.

As a nice feature, some sort of verbose mode for individual game blow-by-blows would be a bonus.


Submissions

Submit Date Language Author Filename Lines Score* Time*
2006/02/17 Ruby David Bushong pyramid.rb 237 -6.8 25.76

* Score is based on average score over 1000 games. Time is number of seconds taken for 1000 games on an 800MHz Athlon.