UpAboutMore


Pelago Solitaire 1.0

Wizard Card  -  Volume 28  -  Mr. Wizard Number 1  -  Sun, Jul 4, 1993 10:13 PM




Pelago Solitaire is the first phase of a project to explore the mysteries of solitaire. It is a project we can all contribute to, just by playing along.

WHAT IT DOES

This stack is a fully-functional solitaire game with an interface similar to most other computer solitaire games. You play by dragging the cards from pile to pile, clicking on the cards to place them on the ace piles, etc. For more details, choose "Help" from the Game Menu.

The game has several other features NOT found in other solitaire games. You can cheat (if the "allow cheating" menu item is checked) by holding down the option key to see what's underneath any card or, by option-dragging, actually expose cards which would normally be beyond your reach. This was invaluable in debugging the stack and is also useful in answering those "what would have happened if..." questions. Please avoid using this feature for now so as not to muddy our statistics.

The other added feature, which is in fact the whole reason the stack was written, is statistical tracking. As you play each game the stack keeps track of how many cards are still hidden on the board, how far each ace pile has progressed, how many passes through the deck you've made, and how many cards are left in the deck. As you finish each game this information is recorded.

The data is recorded on "stat cards" inside the solitaire stack. By analyzing these records we can begin to measure how many games we tend to win, whether some people fare significantly better than others, etc. The stack allows multiple stat cards so that you can compare one strategy against another.

Each time stats are recorded in the solitaire stack, they are also recorded in a hidden card in the My Contributions stack. So, if all of you play Pelago Solitaire religiously over the next month, your statistics will be automatically transmitted when you return your packet. I recommend playing AT LEAST 100 games. If all goes well, I will report the outcome of our research in the next issue of Archipelago.

HOW IT WORKS

Writing a game like solitaire reveals both the strengths and weaknesses of HyperCard. Providing the graphical user interface and keeping track of everything that can happen during the course of a game is more challenging than you might think. And yet I was able to develop the bulk of the code in about six hours and considering what it has to do it is remarkably compact.

The primary weakness is speed. On my new Centis the game FLIES and is indistinguishable speed-wise from any commercial game written in C. Those of you struggling along on a Plus or SE, however, will experience, shall we say, a leisurely pace. One compensation, however, is that the slower speed allows you to see the three cards as they are dealt from the deck; this may give you a slight advantage over Archipelagoans on faster machines.

HyperCard also does not provide paint or draw objects, so I had to use icons to represent the cards. Fortunately, the icons were easy to make and are quite servicable.

Those of you who wish to examine the code have only to inspect the stack script and the card script; 95% of the code is in those two places. A game like solitaire is an interesting programming challenge because a computer, unlike a human being, does not "see" the cards as discrete objects. It "sees" a list of black and white dots and some x,y locations where mouse-clicking is going on.

HyperCard helps quite a bit by providing buttons that can be treated as discrete objects. It is up to the programmer to help the stack understand that a 3 of clubs cannot be placed on a jack of diamonds. Those of you who are interested are more than welcome to peruse my code to see how I did it.

HOW YOU CAN HELP

In this first stage of solitaire research, you can help in three ways:

  1. Just play the game as often as you can over the next few weeks so that we can begin to compile enough data to draw some conclusions.
  2. Report any bugs you find to command central. I've spent quite a bit of time tracking down some VERY obscure bugs but I need your help to ensure we have the best possible tool for continued research.
  3. Suggest new features. In particular, suggest what other details about each game we should keep track of. Think about what questions you want answered and what information we would need to collect in order to answer those questions.
Archipelago Solitare 1.0 is OUR game. We can modify it any way we want and add whatever features we desire. Research into the game of solitaire is one of the purest ponarvs we've ever come up with and this game is the tool we need to pursue it.

And now Archipelagoans: PLAY!




UpAboutMore