Connect Four May 2023 Update

It’s been an eventful game of connect 4. It’s certainly tougher than the daily challenges when I could safely assume each hand was solvable with sufficient use of rot13(haqb).

I won on the first day of the month, then had a string of three losses. Games 2 and 4 were perhaps close, but game 3 was a walkover to the bad guys. Game 5 was a crunch moment – a loss would mean four Reds in a row horizontally and the rest of the month to stew. Indeed, I had a rough middlegame after dealing the first row of cards – and somehow I managed to rescue one of the strangest “almost-losses” I have ever seen. A true display of rot13(junggurshpxrel) from an app I do not entirely trust.

As for why I consider this one of my “strangest almost-losses”, that’s something you have to figure out for yourself (Incidentally figuring out how to proceed is a good test of your analytical skill).

Having avoided an early defeat, it seems we are headed for a long war of attrition as both sides jockey for position. The fourth week is where things get spicy as possibilities of diagonal and vertical connect fours come into play.

I saw my connect 4 and raised myself to connect 7

It’s the last day of the month. The game officialty ended on the 13th of April, but I decided to keep playing until the not-so-bitter end  – and it turns out I would still have won if I were playing Connect 7 instead of Connect 4.

My only losses were 2,4,6,8,9 – giving me below 50% for the first and only time – followed by a connect-5 from 18,19,20,21,22 and every other game was won.

Indeed I would have won the game of connect-N where N is an integer between 1 and 7 inclusive. Next month will be Connect Four but playing Random Hands instead of the Daily Challenge. I expect this to be significantly harder, but I will have more to say in a future post.

Connect Four – Victory is Mine!

I have now achieved victory in my game of Connect Four with the MobilityWare Spider Solitaire app. After a balanced start things looked bleak – removing two suits was not enough on the ninth hand, giving me a win ratio of less than 50%. But I pulled myself together to take four wins in as many days, thus ending proceedings then and there.

Probably my favourite hand was Game 12. The critical position is shown in the diagram below (left).

I spent two empty columns to get one turnover + a “twelve-suit”. I like this kind of “pig play”, sacrificing the possibility of turning over (at least) two cards in column ‘d’ and hoping to complete Clubs on the next deal. Of course, don’t forget that the software app could also make a pig play of its own and make you look stupid. I turned over a disappointing Ace of Spades to reach the diagram below (right) but managed to scrape home after dealing the last row.

Turning two cards in column ‘d’ feels short-sighted to me and likely to lead to serious problems once the stock is empty. I might have more to say about this in a future post.

In any case, well played Me and the SpiderSolitaire app has the rest of the month to stew 😉

Connect Four – Bring It On!

Okay, I’ve submitted to temptation and finally downloaded the MobilityWare Spider Solitaire app even though it’s probably rigged – but only because I wanna try the daily challenges.

A daily challenge is a certain starting configuration that is guaranteed winnable. MobilityWare has several games (not just Spider) and solutions can be found by googling. Games include Freecell, Solitaire Draw 1, Solitaire Draw 3, Spider Suite 1, Spider Suite 2, Spider Suite 3, Crown, Tripeaks, Addiction. That’s quite a lot of variety, and I will admit I don’t even know the rules for some of these games. Although I thought the “Suite N” part was weird because it clearly should be “N suits” where N = 1,2,3 … no wait, there’s no solution for N=4?!?!?!?

If a solution is given, it means two players can play the hand corresponding to the same day and same game (e.g. Tripeaks, 5th of February) and they are presumably guaranteed to get the same starting hand. If they didn’t get the same hand and wish to check the solution, at least one player would complain very quickly! However, since I can’t find a solution for any 4-suit Spider hand, it is mathematically possible (though unlikely) that two players can play DIFFERENT 4-suit Spider hands corresponding to the same day and they would be none the wiser unless one of ‘em specifically asks the other if they get matching hands.

NOTE: in some cases only partial solutions are given (because some games take longer than others) and you have to pay some $$$$ to get the full solution. But a partial solution is more than enough to confirm two players indeed get the same hands.

Assuming two different players do get the same 4-suit Spider hands, I can play these hands with reasonable expectations they would not be ridic hard – since I can’t see a game developer with rot13(fznyy qvpx flaqebzr) punishing random novices with insanely difficult hands if my win rate is too high, even if he or she works at Zynga (or an equivalent company).

I think a fun challenge would be Connect-Four. On every day of the month I either win or lose the hand corresponding to that day. Four wins/losses in a row, horizontally vertically or diagonally means I win/lose. For instance, if I remove all eight suits on days 5-13-21-29 then I achieve a winning Connect Four, unless I also achieve a losing Connect Four earlier (such as 9-10-11-12). The downside of playing Connect Four of course is if the game ends after 6 days, then I might have to wait a while before the next month! The screen shot below is for April 2023, coming soon to a place near u.

Ultimately, I am interested in playing all the daily challenges in April 2023. Can I expect to win most hands? Also, do hands get tougher as we approach the end of the month or is it roughly uniform difficulty?

Here are the hands for N-suit Spider Solitaire corresponding to 29 March, for N = 1,2,3,4. I would be interested if readers can confirm they get the same starting hands for N=1,2,3,4.

Of course the result I am really interested in is if you get the same hands for N = 1,2,3 but different hands for N=4. Then I would know something suspicious is going on!

Game Over – Spider Solitaire wins!!!!

Okay, apparently Spider Solitaire level 18 on iPhone is too hard, even for yours truly.

Trevor seemed to be gaining the ascendency with four consecutive wins on 7-10 (unfortunately not a horizontal Connect Four), but then it all fell apart on 11,12,13,14.

november.png

The game on 12 was brutal. Ninja Monkey’s famous 1-suit random move algorithm estimates a win rate of only 0.04. Game 13 was even worse, with Trevor unable to determine the identity of seven (7) face-down cards even with unlimited undo. Assuming random guessing for these seven cards, Ninja Monkey reported a win rate of 0.06.

Game 14 shows an example where Ninja Monkey badly misjudges the win rate (0.70). Trevor never looked like getting a hole at any stage of the game with a critical shortage of Jacks until the final deal. I will let the reader examine the game shoe and judge for himself.

So the jury is still out. Is the iPhone spider solitaire software rigged? My gut suggests I need a better algorithm that can get a decent win rate at 4-suit solitaire. Perhaps this is an exercise for the reader, if you excuse the terrible cliché!

thesegamessuck

Spider GM wins Connect Four!

Spider GM is off to a good start in Connect Four. He has won the first four games for a flawless victory (to borrow from the Street Fighter vernacular). His friend Ninja Monkey says three out of four games were ridiculously easy with a estimated equity 0.96 or better, but game 2 was a strange exception. The last ten cards from the stock were K2248K9264 which might explain a lot 🙂

Spider GM will continue to record results for the remainder of this month in order to settle a bet with a friend concerning the biasedness (or lack thereof) of i-Phone Spider Solitaire. For further details, please see earlier posts and references therein.

From previous experimentation SpiderGM expects the equity to be between 50% and 100% for each game, since each game is supposed to be winnable (each daily-challenge deal has the option of “show me how to win”, so users would be 80,73,83,83,69,68 off if a game turned out to be unwinnable). The average would be much lower if the games were random. Spider GM will also expect to accumulate plenty of red in the latter half of the month. Fortunately the game of Connect Four is considered won as soon as one side achieves 4 in a row, even if the opponent “goes perfect” during the remainder of the month

september_game_win

Connect Four and Spider Solitaire

Every man dog and millipede on the planet has heard of Connect Four, a well-known two-player game by Milton Bradley. The objective is to line up four pieces of your colour horizontally diagonally or vertically. Unfortunately it is not played in serious competition these days, mainly because the game has been solved. With perfect play by both sides the first player wins.

The solution was found independently by James Dow Allen and Victor Allis (independently) in October 1988. The first player must start in the middle column. If she plays adjacent to the middle column then it’s a draw. Playing anywhere else even loses. Furthermore, the first player requires all 21 discs to force a win if a perfect opponent puts up maximum resistance. For a detailed analysis of the game please check out this excellent video  by Numberphile.

However, I believe Connect Four has not been solved after all, because everybody has been playing it the wrong way.

Consider the board state below. Before reading on, can you predict where the next two discs should be played?

connect4

A cursory examination shows that Yellow threatens to win on the left-most column. Moreover, Yellow has played 8 pieces but Red has only 7. Therefore it is Red to play. Clearly Red must block the threat of vertical Connect-Four. This in turn threatens a diagonal Connect-Four so Yellow’s next move is also forced.

But if you examine the board carefully, you will notice each column is labelled with one of the seven days of the week. Moreover, only 30 cells are marked with numbers but the others are empty. Not surprisingly, the board represents the calendar month for September 2019, which is further corroborated by the text above the board.

It is not hard to guess that Spider GM is going to play a game of Four-Suit Spider Solitaire on every day of this month. Every yellow disc represents a victory, and every red represents a defeat. Spider GM is only concerned with winning the game regardless of the number of moves or time taken to complete it. Of course Spider GM will play without undo. Four in a row still wins the game (but Spider GM can continue to play the remaining days just to fill up the board and see what it looks like). The current position shows a hypothetical game state after the 15th of September.

This completely changes the dynamics of Connect Four. For instance, odd and even threats still exist but here they refer to whether the cell contains an odd or even number (instead of what row the cell lies in). Going back to the example, Spider GM has an even threat on Sunday the 22nd. Unfortunately the next game will be played on Monday the 16th. Therefore the next move will either be a Red or Yellow disc on the cell numbered 16. In other words Spider GM has to wait for a whole week before his threat of winning on the Sunday column comes into play. Of course if Spider GM does win the battle on the 22nd of September then he also wins the war, unless Daily Challenges manages to build an unlikely winning horizontal Connect Four before that date.

Well done if you correctly predicted the next two moves to be “cells 16 and 17, either red or yellow”.

It is easy to see that Connect Four is now an unsolved game again, since the colour of each cell depends on the result of a single game of Spider Solitaire, and not even the Spider GM knows the perfect strategy for the latter. This I believe is the way Connect Four should have been played all along. So if you have enough spare time on your hands to play one game of Spider Solitaire per day and wish to make Connect Four great again then you know what to do 😊 Good luck.