/freecell

Web-based FreeCell game and solver, supporting Microsoft game numbers up to a billion.

Primary LanguageRoffGNU General Public License v3.0GPL-3.0

FreeCell game

Click on the image or here to play the popular FreeCell game. It supports Microsoft game numbers and includes solutions for games 1 to 1 million. The solutions are near-optimal, averaging 25.5 moves per game.

Screenshot

Follow the link 94717719 and use the move controls to see how the difficult game is solved in 74 moves.

The game can also attempt to solve any game between 1 million and 1 billion. It usually succeeds at the first attempt in a fraction of a second. If unsuccessful, it doubles the effort at each following attempt. Below are the success rates and the time taken on a modern desktop or laptop.

Attempt Success rate Time taken Compared to the optimal
1 99.6% 1/4 second 2 moves longer
2 99.8% 1/2 second 1.5 moves longer
3 99.9% 1 second 1 move longer

One extreme example is 1001874 which takes 5 attempts to solve.

FreeCell solver

The following results are for the first 1 million games, obtained by this solver.

Games solvable with max auto play

Max auto play moves cards to home as soon as possible. Almost all solvable games are also solvable with max auto play. On average a game takes 25.5 moves to solve and below is the distribution of solution length in the first 1 million games.

Stats

Here are the easiest ones and the hardest ones. Follow the links to play the games.

Moves Games
8 224533 239313
9 28527 70129 78493 211226 264554 290724 364837 380360 697484 963732
10 10781 66160 127182 199456 219017 397328 399683 437722 458142 470149 489579 558959 590669 605531 606822 724065 727279 799686 834702 868595 875934 908977 943616 949440 977792
... ...
40 10692 16129 25648 34043 35254 36510 48481 57425 67202 78024 82124 102600 106880 107532 114253 118814 120735 126970 128232 135428 147833 148846 151244 157897 159103 163714 168794 179796 198942 210592 212722 231989 233847 238999 240046 243992 258335 262147 274731 277909 300080 312593 322666 331895 341220 345125 355498 358311 369861 376427 386902 391262 391443 391702 405415 405798 417541 431229 435033 440260 448151 458809 462779 469467 471500 480225 483476 494777 506073 509069 510640 522131 527440 548771 553158 568978 581984 614569 618720 625419 637443 641532 649943 651645 655827 664646 673155 684130 687716 690002 734771 740499 742036 742115 761091 769435 778815 784753 789771 796345 801194 801703 815482 821582 827792 839019 851976 883633 889889 902410 908990 909284 922431 930016 934469 968523 980392 988312 993161
41 1025 13304 27188 97557 145464 184425 233861 249786 272764 282084 298591 333256 346651 396599 404526 415343 415930 452157 498747 505903 525668 544867 546072 546414 574163 579395 581459 593792 639899 645760 742985 748777 754750 767352 795206 802066 818490 833577 873288 877201 901784 924525 958253 964065 966188
42 21491 55846 56643 67193 89831 105651 109571 160683 194463 209086 279766 294281 296017 302963 308242 352630 382110 412030 545122 677999 686242 695887 698347 703180 728430 737655 762617
43 323434 415044 506714 799573 818033
44 167716 255317 335220 386274 405287 426735 427388 451888 457777 760345 821933
45 201616 584884 828638 890769
46 764390
47 31465 563096
48 739671
51 57148

Games solvable with safe auto play but unsolvable with max auto play

Max auto play very rarely makes a solvable game unsolvable. There are only 2 such games in the first 1 million.

Moves Games
35 1941
43 98714

Games unsolvable

There are 8 unsolvable games in the first 1 million.

Moves Games
11982 146692 186216 455889 495505 512118 517776 781948