Colorful dominoes game hides an exercise in propositional logic

Some SourceForge.net projects get hundreds of downloads a day. Some are updated monthly by teams of volunteers. And then there are projects like Dominoes on Acid. “I must say I don’t know if I appeal to either dominoes fans or people interested in mathematical logic,” says Matthias Benkmann, the program’s author. “I’m sure about only two fans of the game. The first is myself, and the second is the person who reported a bug two weeks ago, which prompted me to touch the program again after more than five years.”

Dominoes on Acid is a game superficially similar to the classic dominoes game. You get tiles with patterns on each end, and you can connect the ends of two tiles only when they show the same pattern. But instead of the standard two-color tiles spots, the tiles in Dominoes on Acid have (sometimes very complex) multi-colored patterns.

Dominoes on Acid is a solitaire variant of the game. You get a starting tile and an infinite supply of other tiles and have to build from the starting tile until you have reached a point where every branch of your structure ends with a blue-bottomed tile.

“That’s the game part, and if you want you never need to look further,” Benkmann says. “You can play the game and enjoy building colorful patterns with increasing complexity. But for the scientist the real gem is hidden under the hood. Every completed game of Dominoes on Acid corresponds to a strict mathematical proof in classical propositional logic. What makes this mapping so interesting is that you don’t need to understand propositional logic to play the game.”

Benkmann created the games as a programming project for a college computer science class in 2002, and updated it twice shortly thereafter. He considers it feature-complete. He wrote the program in Java “because at that time it was the best available choice for cross-platform development. I use Linux myself, but friends and family use mostly Windows. Some have a Mac. I don’t want to write software that they can’t use. Furthermore Java allowed me to create an applet version of the game that can be played in the browser.”

Between the time he wrote the program and now, Benkmann’s development tools of choice changed. “Back in 2002 I used CVS for version control, the text editor joe for writing my code, GNU make for orchestrating the build, and Sun’s JDK for compiler and VM. I chose CVS because there were no free alternatives (at least not mainstream ones) back then. I chose joe because Emacs and Vi(m) suck. And I chose GNU make because coming from the C/C++ world it was what I was used to. Ant was pretty young and obscure back then.

“From that time until this month I distributed the game and source code in a single JAR archive served from static webspace. No historic versions were available, nor was revision history for the source code. But when someone reported a bug in Dominoes two weeks ago, I decided I needed to have better infrastructure for maintaining and publishing new versions, even if they occur very infrequently, so I decided to invest the time to set up a SourceForge.net project. I chose SourceForge.net because it is well-known and I knew it offered the features I thought I’d need (Mediawiki and git). But mostly it was because I already had an account there and had prior experience with another SF project.

“When I created the SourceForge.net project I converted the Dominoes on Acid repository to git, because git as a distributed VCS/SCM allows me to have my own independent master repository on my computer while offering an equivalent repository publicly on SourceForge.net. If I touch the code again it will be in Eclipse rather than a plain text editor. And I may convert the project to using Apache Ant instead of GNU make for build orchestration.”

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

WordPress Themes