Tuesday, January 21, 2014

Odds of predicting the results of all 67 games in the NCAA tourney

With 67 games played, trying to predict the outcome of 67 coin tosses is 1 over 2^67 or 1 in 147,573,952,589,676,412,928. That's about one in 147 quintillion (less likely than winning 24 consecutive games of solitaire). Let's assume over half the games are indeed predictable with assorted nags taking on the better teams. 1 over 2^33 is only 1 in 8,589,934,592 (less likely than winning 13 consecutive games of solitaire). Hot diggity,  I think their money is safe.

Friday, January 3, 2014

Mistakes were made

I'm playing this solitaire game and solving games. Watching the mistakes that are made to solve a game makes me think of Hawking and his ideas about the imperfection of the universe. You can watch it here:

https://www.youtube.com/watch?v=DECAorZYErk

Watching mistakes result in favorable outcomes makes me wonder if a mistake-prone player could beat the winning rate of the "perfect" player. Could a formulation of mistake frequency do such a thing? It's worth investigating.

Another interesting aspect of this solver is watching how any given mistake really doesn't cause any changes until consequences present themselves. You can ignore moving a black queen any number of times but it really doesn't do anything until the other black queen shows up on the Talon and you play it. Life is a lot like this. We keep making the same mistakes over and over until real consequences present themselves. The river denial runs deep.

I find the game solving option extremely useful. I can play a hand and then solve it afterwards. If I lost and it yields a result of solutions or no solutions, I feel vindicated. I don't even look at the solutions, I'm just checking my play. If I won and it yields solutions, I can rest assured I made some fortunate mistakes.

There is something obscene about playing only winning hands. One game after another where the cards come up golden. I can't spot any trend on the deals and they all play like regular hands until good card keep coming up at opportune times. It's pure cheating the odds with technology and I can't help but think this might be a metaphor for our modern existence. It seems real but it truly is unreal. It's unsettling.

My son had me read some of David Lynch's book about fishing.

http://en.wikipedia.org/wiki/Catching_the_Big_Fish

It's a great book. He talks about how ideas can branch out into all sorts of directions. I'm not sure where this is leading. One thing is for certain, I'm clicked out and I still prefer to play a game of solitaire with a real deck of cards.

Thursday, January 2, 2014

Let's play some solitaire!

I've made the solver an interactive Solitaire game where you can play 3 card draw solitaire with infinite go rounds. In addition to playing Solitaire, it allows you to have have the computer solve games that you have lost. It also allows you to play only winning and solvable hands. It has full undo/redo functionality in addition to an option to have the computer make the next play.  This version of Solitaire is developed for Windows 7 and Windows XP. The x64 version is for 64 bit Windows. If you don't know if you have an x64 system, just download the non-x64 version. You can download it from here:

http://webpages.charter.net/jstefan/SolitaireSetup_1_0_0.zip
http://webpages.charter.net/jstefan/SolitaireSetup_x64_1_0_0.zip

Once you have dowloaded either zip, uncompress it and run the setup.exe found in the zip file. Feedback is welcome.

Below are the instructions included in the ReadMe.rtf file that is included as part of the install:

After installing the program, you will find a program item off your start menu. Running it the first time, it will try to size the window based on the resolution of your screen. It's set up for a minimum of 1280x1024. If your resolution is less, do not fret. The first thing to do is to go to the menu "Options/Window Layout" and reduce the zoom percentage. This will allow you to see the whole deal on lower screen resolutions. This is particularly useful for laptops which now have less resolution.

Menus:
File/New - Start a new game.
File/Open - Open a previously stored game.
File/Save/Save As - Save games.
File/Print - Print stuff.
Edit/Undo - Undo a previous move.
Edit/Redo - Redo a previous move.
Games/Computer Next Move - Have the computer make your next move.
Games/Replay Game - Replay a game.
Games/Solve Game - Attempt to solve a deal.
Start Continuous/Stop Continuous - Have the computer just play games and collect statistics.
Options/Play Only Winning Deals - Deals will only be ones that the computer can win. This excludes solvable and losing deals. This option is not sticky and will be off the next time you run the program. This is "as designed". Select "File/New" after turning on this option to get a new deal.
Options/Play Only Solvable Deals - Deals will only be ones that the computer can solve. This excludes winning and losing deals. This option is not sticky and will be off the next time you run the program. This is "as designed". Select "File/New" after turning on this option to get a new deal.
Options/Window Layout - Allows for the customization of the stack layout.
Options/Clear Won/Loss – Zeros out the won/loss counters.

After solving a deal or having dealt a game with the "Options/Play Only Solvable Deals" turned on, the "Games/Computer Next Move" command will play off a series of game snapshots which lead you to the solution. Unfortunately, they do not show all intermediate moves and it's left to your intellect as to how the game is actually solved. If you decide to make a move at any point in a solved game, the list of snapshots will be discarded and you will be on your own. This includes clicking on the stock stack. Not to worry though, choose "Games/Replay Game" to go back to the solution.

Moving cards:
Regular drag and drop to move cards around the deal. For ace cards, just move the ace into your ace stack area (by default, upper left of the window) and release the left mouse button. Unfortunately, I order the ace stacks for this version. Click on the stock to get the next three cards. When the stock is exhausted and you want to start back over, just left click in the stock area. To expose hidden cards on the Talon, middle click or double left click on the hidden card and it will show it (no cheating please). Useful when you win/lose a game and wish to see those cards. Right click will undo a move.

Output tabs:
Status tab displays informational message from the solver.
Statistics tab displays the win/loss counter.