Download CPUZZLE (31K)

'Chess Puzzle' - a logic problem generator
An introduction -- from Puzzles from Other Worlds
by Martin Gardner (Vintage Books - 1984):

Two young mathematicians in the computer shack of the spaceship Bagel, Ray and Smull, were enjoying a few hours of leisure by inventing unusual chess games to play with VOZ, the ship's computer.

"I've got a great idea," said Ray. "We'll ask VOZ to put the five black pieces - king, queen, bishop, knight, and rook - on five randomly selected squares of the board. We'll tell him not to display the pieces on the screen, but only to star the five cells where he puts them. You and I will sit at two consoles and wear earphones so each of us can ask VOZ questions, but neither of us can hear what he says to the other.

"And so?" said Smull.

"Each question," Ray went on, "will be about any designated square of the board. We'll ask VOZ how many pieces are attacking that cell."

"Can we ask about a starred cell?"

"Certainly. Of course no piece attacks the cell it is on. If we ask about a starred cell, the answer can be 0, 1, 2, 3, or 4. If we ask about an empty cell, it can be [0,] 1, 2, 3, 4, or 5. Instead of asking how many pieces attack a cell, we can ask if a certain piece is on a certain cell. To such questions VOZ will answer yes or no."

"I think I can anticipate," said Smull. "VOZ will keep a record of the number of questions we ask until we have determined the positions of all five pieces. Whoever asked the fewest questions is the winner."

"You've got it!" said Ray. "It's a sort of chessboard version of the old twentieth-century game of Master Mind."

After playing the game for several weeks, Ray and Smull decided to make the game harder by telling VOZ not to indicate the positions of the five pieces. Otherwise, the game was played as before.

Mr. Gardner acknowledges his indebtedness to Jaime Poniachik of Buenos Aires for suggesting this game.


CPUZZLE.EXE
Click to Download (31K)
Copyright 1991 - Mark Joerger

Unzip the downloaded file and simply run CPUZZLE.EXE -- no installation is required.

Chess Puzzle first asks:

Game Number [1 - 9999, (R)andom]:

Random is the default. Specific game numbers are provided for multi-player games: each player may request the same sequence of boards so scores can be compared on an equal basis.

Next, you are given the option of displaying or not displaying the positions of the five pieces:

Show Pieces? (Y/n)

Displaying the pieces is the default. Not displaying the pieces requires more questions and introduces a "luck" element not present in the default game.

Chess Puzzle then places the five pieces on the game board (and displays them unless opted against) and prompts you for your question:

Square or Piece:

  • To inquire about the number of pieces attacking a given square, enter the square's position in standard chess notation (e.g. C3, H8, E1). The square will display the number of attacking pieces. Remember: pieces don't attack the cell they occupy.

  • To inquire as to whether a given piece occupies a square, enter the first letter of the piece (R, N (for Knight), B, Q, K). A second prompt will appear asking for the square -- again, enter in standard chess notation. If that piece does occupy the square, the piece marker will be replaced with the letter representing the piece (R, N, B, Q, K). If that piece does not occupy the square, you will get a "BEEP".

  • Entering "X" at the "Square or Piece:" prompt will exit the game.

  • Entering "Z" at the prompt will skip to the next board in the set (with a substantial penalty to your question count).
If piece positions are displayed, the board is solved upon the identification of the fourth piece (the identity of the fifth piece is obvious). If piece positions are not displayed, you must locate all five pieces to solve the board.

A game set consists of five boards. After solving the fifth board, the total number of questions asked to solve all five boards is displayed, and an option to play another set is given. For multiple player challenges, each player may select the same game # (1 thru 9999) and compare scores.

I am indebted to Martin Gardner, not only for his description of this game - but for his decades of work in mathematical recreation. If you are not familiar with his work, a trip to your local bookstore or library will be a most rewarding experience. A favorite from his many books is Aha! Insight, which is written for a young audience but is none the less enjoyable by any lover of logic puzzles.

Note to Mr. Gardner, should he chance to read this: the solution to the billfold paradox in Aha! Insight lies in the principle of indifference, mentioned in the problem that precedes it. (I have a lovely proof of this, but have no room for it here in the margin).

Mark Joerger

21 October, 1991
(Happy birthday, Martin!)


Addendum -- November 30, 1999

I wrote the QuickBasic 4.0 code for Cpuzzle more than eight years ago. I hope that you enjoy the challenge. The documentation and compiled code (as a set, please) may be distributed freely. The code cries out for someone to update it to Visual Basic with all the bells and whistles that can be offered there. I've started on that project a dozen times, but other things keep popping up to distract me. I'm note sure what I did with the source code for Cpuzzle, but if you'd like to take a shot at converting it to VB, write to me ( joerger@open.org ) and I'll see if I can dig it out.

- MJ

Download CPUZZLE (31K)


Addendum -- December 10, 1999

My wish has been granted, in spades! Gerry Quinn has a wonderful shareware version of the VOZ program available at Gerry Quinn's Mathematical Games. The program features the inclusion of "fairy pieces", alteration of board size, a "minimum information" option that provides just enough info to solve the puzzle, mouse support, and more. Gerry has other programs of interest to lovers of recreational math and chess as well.

-MJ

[Homepage]

Copyright 1991, 1999 Mark Joerger