I have been lucky enough to be invited at the marvellous PGDay.eu 2012 conference in Stuttgart, which ended just yesterday.
My intention was to present the software, tidy up the code a bit (out of respect for the fellow PostgreSQL user :-) and then release it as free software, for the usual reasons, if there was any interest during the talk.
That being the case, I have named the program pgChess and published the code on GitHub so that the interested reader can verify my claim that the code weights just around 20KB.
I split the core of the code in two files: the pgchess library, which in turn invokes the 2podg library, which stands for “2-player open deterministic games”: open meaning that each player knows 100% of the status of the game, and deterministic because the whole game is determined uniquely by the choices that the players make.
Two (counter)examples: most card games are not open; Backgammon is not deterministic.
The strategy is quite simple, and is tailored on PostgreSQL features. As short as I can:
The reason for the talk is to show that PostgreSQL is an excellent framework to develop application prototypes quickly (which is not a big secret; but providing one more example reinforces the claim). And speed prototyping is one key summand that I recall from Simon Phipps in his remarkable keynote speech, whose slides I recommend when they will become available.
If you attended the conference, please consider giving feedback: who knows, you could win a free entrance for the 2011 conference!
Please note finally that my talk slides will be shortly published on the conference website, and that this article will be updated accordingly.