Notice removed Authoritative reference needed by totallyhuman occurred Sep 12 '17 at 22:54 Bounty Ended with Christopher's answer chosen by totallyhuman occurred Sep 12 '17 at 22:54 Notice added Authoritative reference needed by totallyhuman occurred Sep 11 '17 at 20:11 Bounty Started worth 250 reputation by totallyhuman occurred Sep 11 '17 at 20:11 Notice removed Reward existing answer by isaacg occurred Sep 10 '17 at 15:24 Bounty Ended with Christopher's answer chosen by isaacg occurred Sep 10 '17 at 15:24 Notice added Reward existing answer by isaacg occurred Sep 8 '17 at 4:45 Bounty Started worth 500 reputation by isaacg occurred Sep 8 '17 at 4:45 9 added 23 characters in body edited May 10 '17 at 19:11 mbomb007 18.4k55 gold badges4747 silver badges119119 bronze badges 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 colours. However, you can only build 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. Your task is to build a program that will solve these games in the fewest moves possible. Your program will take as input a sequence of 52 cards, in the following format: 2S 9H 10C 6H 4H 7S 2D QD KD QC 10S AC ...  Which will be dealt in the initial layout in this order: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52  And return a list of moves to solve the game. Each move will be in this format: A number representing the pile number (1 through 8), or a free cell (A to D), representing the source pile. Another number or letter representing the destination pile or free cell, or F for the foundation of that suit. The output will look something like this: 18 28 3A 8B 8C 85 B5 35 4F etc.  Once a card is put into the foundation, it cannot be removed. Since only one card is moved at a time, moving a sequence of 3 cards requires 5 moves, and a sequence of 5 cards requires 9 moves. If a game is unsolvable, your program should indicate as such. However, your program must be able to solve any solvable game. Your program will be judged on the 32,768 deals found in the original Microsoft FreeCell program. In order to be valid, your program must successfully solve every deal except deal #11,982, which is unsolvable. Your score will be the total number of moves it takes to solve these 32,767 deals, with shorter code being a tie-breaker. A file with all the decks in the format required by the above specification is available for download here (5.00 MB file): https://github.com/joezeng/pcg-se-files/raw/master/freecell_decks 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 colours. However, you can only build 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. Your task is to build a program that will solve these games in the fewest moves possible. Your program will take as input a sequence of 52 cards, in the following format: 2S 9H 10C 6H 4H 7S 2D QD KD QC 10S AC ...  Which will be dealt in the initial layout in this order: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52  And return a list of moves to solve the game. Each move will be in this format: A number representing the pile number (1 through 8), or a free cell (A to D), representing the source pile. Another number representing the destination pile, or F for the foundation of that suit. The output will look something like this: 18 28 3A 8B 8C 85 B5 35 4F etc.  Once a card is put into the foundation, it cannot be removed. Since only one card is moved at a time, moving a sequence of 3 cards requires 5 moves, and a sequence of 5 cards requires 9 moves. If a game is unsolvable, your program should indicate as such. However, your program must be able to solve any solvable game. Your program will be judged on the 32,768 deals found in the original Microsoft FreeCell program. In order to be valid, your program must successfully solve every deal except deal #11,982, which is unsolvable. Your score will be the total number of moves it takes to solve these 32,767 deals, with shorter code being a tie-breaker. A file with all the decks in the format required by the above specification is available for download here (5.00 MB file): https://github.com/joezeng/pcg-se-files/raw/master/freecell_decks 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 colours. However, you can only build 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. Your task is to build a program that will solve these games in the fewest moves possible. Your program will take as input a sequence of 52 cards, in the following format: 2S 9H 10C 6H 4H 7S 2D QD KD QC 10S AC ...  Which will be dealt in the initial layout in this order: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52  And return a list of moves to solve the game. Each move will be in this format: A number representing the pile number (1 through 8), or a free cell (A to D), representing the source pile. Another number or letter representing the destination pile or free cell, or F for the foundation of that suit. The output will look something like this: 18 28 3A 8B 8C 85 B5 35 4F etc.  Once a card is put into the foundation, it cannot be removed. Since only one card is moved at a time, moving a sequence of 3 cards requires 5 moves, and a sequence of 5 cards requires 9 moves. If a game is unsolvable, your program should indicate as such. However, your program must be able to solve any solvable game. Your program will be judged on the 32,768 deals found in the original Microsoft FreeCell program. In order to be valid, your program must successfully solve every deal except deal #11,982, which is unsolvable. Your score will be the total number of moves it takes to solve these 32,767 deals, with shorter code being a tie-breaker. A file with all the decks in the format required by the above specification is available for download here (5.00 MB file): https://github.com/joezeng/pcg-se-files/raw/master/freecell_decks 8 added 41 characters in body edited Nov 28 '16 at 20:04 Joe Z. 17.5k1212 gold badges4646 silver badges123123 bronze badges 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 colours. However, you can only build 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" theweave individual cards in and out of the free cells as required to help you solve the game. Your task is to build a program that will solve these programsgames in the fewest moves possible. Your program will take as input a sequence of 52 cards, in the following format: 2S 9H 10C 6H 4H 7S 2D QD KD QC 10S AC ...  Which will be dealt in the initial layout in this order: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52  And return a list of moves to solve the game. Each move will be in this format: A number representing the pile number (1 through 8), or a free cell (A to D), representing the source pile. Another number representing the destination pile, or F for the foundation of that suit. The output will look something like this: 18 28 3A 8B 8C 85 B5 35 4F etc.  Once a card is put into the foundation, it cannot be removed. Since only one card is moved at a time, moving a sequence of 3 cards requires 5 moves, and a sequence of 5 cards requires 9 moves. If a game is unsolvable, your program should indicate as such. However, your program must be able to solve any solvable game. Your program will be judged on the 32,768 deals found in the original Microsoft FreeCell program. In order to be valid, your program must successfully solve every deal except deal #11,982, which is unsolvable. Your score will be the total number of moves it takes to solve these 32,767 deals, with shorter code being a tie-breaker. A file with all the decks in the format required by the above specification is available for download here (5.00 MB file): https://github.com/joezeng/pcg-se-files/raw/master/freecell_decks 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 colours. However, you can only build 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" the cards in and out to help you solve the game. Your task is to build a program that will solve these programs in the fewest moves. Your program will take as input a sequence of 52 cards, in the following format: 2S 9H 10C 6H 4H 7S 2D QD KD QC 10S AC ...  Which will be dealt in the initial layout in this order: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52  And return a list of moves to solve the game. Each move will be in this format: A number representing the pile number (1 through 8), or a free cell (A to D), representing the source pile. Another number representing the destination pile, or F for the foundation of that suit. The output will look something like this: 18 28 3A 8B 8C 85 B5 35 4F etc.  Once a card is put into the foundation, it cannot be removed. Since only one card is moved at a time, moving a sequence of 3 cards requires 5 moves, and a sequence of 5 cards requires 9 moves. If a game is unsolvable, your program should indicate as such. However, your program must be able to solve any solvable game. Your program will be judged on the 32,768 deals found in the original Microsoft FreeCell program. In order to be valid, your program must successfully solve every deal except deal #11,982, which is unsolvable. Your score will be the total number of moves it takes to solve these 32,767 deals, with shorter code being a tie-breaker. A file with all the decks in the format required by the above specification is available for download here (5.00 MB file): https://github.com/joezeng/pcg-se-files/raw/master/freecell_decks 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 colours. However, you can only build 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. Your task is to build a program that will solve these games in the fewest moves possible. Your program will take as input a sequence of 52 cards, in the following format: 2S 9H 10C 6H 4H 7S 2D QD KD QC 10S AC ...  Which will be dealt in the initial layout in this order: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52  And return a list of moves to solve the game. Each move will be in this format: A number representing the pile number (1 through 8), or a free cell (A to D), representing the source pile. Another number representing the destination pile, or F for the foundation of that suit. The output will look something like this: 18 28 3A 8B 8C 85 B5 35 4F etc.  Once a card is put into the foundation, it cannot be removed. Since only one card is moved at a time, moving a sequence of 3 cards requires 5 moves, and a sequence of 5 cards requires 9 moves. If a game is unsolvable, your program should indicate as such. However, your program must be able to solve any solvable game. Your program will be judged on the 32,768 deals found in the original Microsoft FreeCell program. In order to be valid, your program must successfully solve every deal except deal #11,982, which is unsolvable. Your score will be the total number of moves it takes to solve these 32,767 deals, with shorter code being a tie-breaker. A file with all the decks in the format required by the above specification is available for download here (5.00 MB file): https://github.com/joezeng/pcg-se-files/raw/master/freecell_decks 7 Changed the file link. edited Oct 13 '16 at 6:54 Joe Z. 17.5k1212 gold badges4646 silver badges123123 bronze badges 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 colours. However, you can only build 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" the cards in and out to help you solve the game. Your task is to build a program that will solve these programs in the fewest moves. Your program will take as input a sequence of 52 cards, in the following format: 2S 9H 10C 6H 4H 7S 2D QD KD QC 10S AC ...  Which will be dealt in the initial layout in this order: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52  And return a list of moves to solve the game. Each move will be in this format: A number representing the pile number (1 through 8), or a free cell (A to D), representing the source pile. Another number representing the destination pile, or F for the foundation of that suit. The output will look something like this: 18 28 3A 8B 8C 85 B5 35 4F etc.  Once a card is put into the foundation, it cannot be removed. Since only one card is moved at a time, moving a sequence of 3 cards requires 5 moves, and a sequence of 5 cards requires 9 moves. If a game is unsolvable, your program should indicate as such. However, your program must be able to solve any solvable game. Your program will be judged on the 32,768 deals found in the original Microsoft FreeCell program. In order to be valid, your program must successfully solve every deal except deal #11,982, which is unsolvable. Your score will be the total number of moves it takes to solve these 32,767 deals, with shorter code being a tie-breaker. A file with all the decks in the format required by the above specification is available for download here (5.00 MB file): https://www.dropbox.com/s/fkhhuakeev5t1bf/freecell_decks?dl=0https://github.com/joezeng/pcg-se-files/raw/master/freecell_decks 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 colours. However, you can only build 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" the cards in and out to help you solve the game. Your task is to build a program that will solve these programs in the fewest moves. Your program will take as input a sequence of 52 cards, in the following format: 2S 9H 10C 6H 4H 7S 2D QD KD QC 10S AC ...  Which will be dealt in the initial layout in this order: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52  And return a list of moves to solve the game. Each move will be in this format: A number representing the pile number (1 through 8), or a free cell (A to D), representing the source pile. Another number representing the destination pile, or F for the foundation of that suit. The output will look something like this: 18 28 3A 8B 8C 85 B5 35 4F etc.  Once a card is put into the foundation, it cannot be removed. Since only one card is moved at a time, moving a sequence of 3 cards requires 5 moves, and a sequence of 5 cards requires 9 moves. If a game is unsolvable, your program should indicate as such. However, your program must be able to solve any solvable game. Your program will be judged on the 32,768 deals found in the original Microsoft FreeCell program. In order to be valid, your program must successfully solve every deal except deal #11,982, which is unsolvable. Your score will be the total number of moves it takes to solve these 32,767 deals, with shorter code being a tie-breaker. A file with all the decks in the format required by the above specification is available for download here (5.00 MB file): https://www.dropbox.com/s/fkhhuakeev5t1bf/freecell_decks?dl=0 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 colours. However, you can only build 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" the cards in and out to help you solve the game. Your task is to build a program that will solve these programs in the fewest moves. Your program will take as input a sequence of 52 cards, in the following format: 2S 9H 10C 6H 4H 7S 2D QD KD QC 10S AC ...  Which will be dealt in the initial layout in this order: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52  And return a list of moves to solve the game. Each move will be in this format: A number representing the pile number (1 through 8), or a free cell (A to D), representing the source pile. Another number representing the destination pile, or F for the foundation of that suit. The output will look something like this: 18 28 3A 8B 8C 85 B5 35 4F etc.  Once a card is put into the foundation, it cannot be removed. Since only one card is moved at a time, moving a sequence of 3 cards requires 5 moves, and a sequence of 5 cards requires 9 moves. If a game is unsolvable, your program should indicate as such. However, your program must be able to solve any solvable game. Your program will be judged on the 32,768 deals found in the original Microsoft FreeCell program. In order to be valid, your program must successfully solve every deal except deal #11,982, which is unsolvable. Your score will be the total number of moves it takes to solve these 32,767 deals, with shorter code being a tie-breaker. A file with all the decks in the format required by the above specification is available for download here (5.00 MB file): https://github.com/joezeng/pcg-se-files/raw/master/freecell_decks 6 Changed the format to Titus' suggestion. edited Jul 25 '16 at 4:38 Joe Z. 17.5k1212 gold badges4646 silver badges123123 bronze badges 5 Added an ace to the example card sequence. edited Jan 24 '15 at 23:38 Joe Z. 17.5k1212 gold badges4646 silver badges123123 bronze badges 4 Forgot this tag too. | link edited Jan 8 '15 at 7:51 Joe Z. 17.5k1212 gold badges4646 silver badges123123 bronze badges 3 added 197 characters in body edited Jan 4 '15 at 2:26 Joe Z. 17.5k1212 gold badges4646 silver badges123123 bronze badges Tweeted twitter.com/#!/StackCodeGolf/status/551461695634542592 occurred Jan 3 '15 at 19:34 2 edited tags | link edited Jan 3 '15 at 18:51 Martin Ender 170k5959 gold badges404404 silver badges883883 bronze badges 1 asked Jan 3 '15 at 18:47 Joe Z. 17.5k1212 gold badges4646 silver badges123123 bronze badges