Skip to main content

2020 Program Design Competition Problem

12th Annual Program Design Competition

April 2, 2020


Basic game

In the game of Freecell, you are tasked with building four foundation piles in suit from ace to king, on a layout where you build downward in alternating colors. However, you can build only one card at a time, so you are given four "free cells," each of which can contain one card to help you move entire sequences. The idea is that you weave individual cards in and out of the free cells as required to help you solve the game.

This PDC problem asks you to build a program that will solve these games in the fewest moves possible. 

Construction and Layout of the Standard Game (Refer to the figure below)

  • One standard 52-card deck is used.
  • There are four open cells and four open foundations.
  • Cards are dealt face-up into eight cascades, four of which comprise seven cards each and our of which comprise six cards each.

Building during play

  • The top card of each cascade begins a tableau.
  • Each tableau must be built down by alternating colors and decreasing values.
  • Foundations are built up by suit and increasing values.


  • Any cell card or top card of any cascade may be moved to build on a tableau, or moved to an empty cell, an empty cascade, or its foundation.
  • Complete or partial tableaus may be moved to build on existing tableaus, or moved to empty cascades, by recursively placing and removing cards through intermediate locations. The number of cards that can be moved from the cascades should be set based on having no cards in the Open Cells. The number of cards that can be moved from the cascades should decrease as cards are added to the Open Cells.

Timing and Number of Moves

  • A timer determines the running time of the game.
  • The number of moves are also calculated.
  • These measures can be used to determine ranking if more than one person is playing, or to show a single player’s statistics.  


  • The game is won after all cards are moved to their foundation piles.


"Playing area for the Freecell game"


Variations on the Standard Game

Vary the number of Open Cells
Vary the number of Cascades

Program design

You can develop this game using any software tools available to you: any language and any platform. The presentation must be able to display on a projector with a 1024 X 768 resolution.

Your work will be judged on:

  • Creativity and Originality of Design
  • Technical skill – Programming and software tools used
  • Completeness of solution (Implementation)
  • User-friendliness (User-interface design)

Presentation of the project

All team members are encouraged to participate during the presentation. The presentation will be judged on:

  • Clarity of presentation
  • Organization of presentation
  • Participation of team members
  • Managing presentation time and handling questions

All parts of the presentation (Power Points, etc.) and source code must be placed on a USB drive (non-returnable) and submitted to the Program Design Competition committee on the day of the competition.

If you have any questions regarding the problem, please contact Jerry Cooley.

Good luck, and have fun!