Win At Connect Four Every Time! The World's First Online Connect 4 Solver
Vložit
- čas přidán 15. 02. 2015
- Although Connect 4 has been solved mathematically since 1988, the casual fan would find the strategy difficult to remember. For the first time, the solution to Connect 4 has been put online, and you can play the optimal strategy to always win as the first player.
Connect 4 Solver - Win Every Time! (Direct Link)
cloud.cs.berkeley.edu:8090/gcw...
UPDATE: I have been told that the above link is not working. Here is a website I was recommended that solves the game:
connect4.gamesolver.org/
Link to GamesCrafters website
Go to: gamescrafters.berkeley.edu/gam...
Click on "Play now" and then "Connect 4"
HUGE thank you to Dr. Dan Garcia and GamesCrafters for solving Connect 4 and making it available on a website for everyone to use.
Dr. Dan Garcia's homepage
www.cs.berkeley.edu/~ddgarcia/
Watch Dr. Dan Garcia describe the solver
• BJC Lecture 16: Comput...
More details about Connect 4 being solved
mindyourdecisions.com/blog/201...
If you like my videos, you can support me at Patreon: / mindyourdecisions
Connect on social media. I update each site when I have a new video or blog post, so you can follow me on whichever method is most convenient for you.
My Blog: mindyourdecisions.com/blog/
Twitter: / preshtalwalkar
Facebook: / 168446714965
Google+: plus.google.com/1083366085665...
Pinterest: / preshtalwalkar
Tumblr: / preshtalwalkar
Instagram: / preshtalwalkar
Patreon: / mindyourdecisions
Newsletter (sent about 2 times a year): eepurl.com/KvS0r
My Books
"The Joy of Game Theory" shows how you can use math to out-think your competition. (rated 4/5 stars on 23 reviews) www.amazon.com/gp/product/150...
"The Irrationality Illusion: How To Make Smart Decisions And Overcome Bias" is a handbook that explains the many ways we are biased about decision-making and offers techniques to make smart decisions. (rated 5/5 stars on 1 review) www.amazon.com/gp/product/152...
"Math Puzzles Volume 1" features classic brain teasers and riddles with complete solutions for problems in counting, geometry, probability, and game theory. Volume 1 is rated 4.5/5 stars on 11 reviews. www.amazon.com/gp/product/151...
"Math Puzzles Volume 2" is a sequel book with more great problems. www.amazon.com/gp/product/151...
"Math Puzzles Volume 3" is the third in the series. www.amazon.com/gp/product/151...
"40 Paradoxes in Logic, Probability, and Game Theory" contains thought-provoking and counter-intuitive results. (rated 4.9/5 stars on 7 reviews) www.amazon.com/gp/product/151...
"The Best Mental Math Tricks" teaches how you can look like a math genius by solving problems in your head (rated 4.7/5 stars on 3 reviews) www.amazon.com/gp/product/150...
"Multiply Numbers By Drawing Lines" This book is a reference guide for my video that has over 1 million views on a geometric method to multiply numbers. (rated 5/5 stars on 1 review) www.amazon.com/gp/product/150... - Věda a technologie
How to win: "your opponent makes a mistake"
Fr 🗿
So in other words the way we can win at Connect Four is to always play first and use a computer program.
Weren't you paying attention? You first have to study the 1.5 trillion configurations, and then know which configuration your human opponent uses, and access the correct strategy from your groundswell of knowledge accessed in your brain smarts. You may forget your middle name, but this is how to win. And winning is everything, right?
+EighteenCharacters OMG! You are so much correct.
Connect 4 League
discord.gg/TXRZGDR
Lol ya not really helping me stomp my 5yo nephew
@@EighteenCharacters Inductive reasoning > deductive reasoning. There are principles which make it a lot easier. 1. Go for the center. 2. Block lines 3. Make double threats. 4. Forcing moves are usually the best moves. 5. Win out of the opening. The number of good openings is very small. Symmetry further shrinks the size of the problem.
UPDATE: I have been told the solver linked in the video description is not working. A commenter suggested the following website: Connect 4 solver (connect4.gamesolver.org/).
You didn't explain any of the general strategy behind odd and even rows for win conditions based on whether you go first or second. Using a computer program to play for you is a bit of a cop out when you don't understand the logic behind it.
uyytyrgg5e yo pierre pq ta vue udj
there isn't a strategy understandable by a human
this kind of solution for a game are found by trying a huge number of game to memorise the winning moves
I assume there is a deep learning algorithme behind this strategy
Octalion Cription go play it in a bar in Thailand and tell me there is no strategy that a human can learn.
At one point in time, I knew enough strategy to win around 95% of the time. Knowing the right move to make in different situations and then following a basic strategy is all that is needed. While there is a tremendous number of permutations of pieces on a connect 4 board, there is nowhere near that many that need to be memorized for perfect play.
I compare this to solving a rubik's cube: There are *quadrillions* of permutations of a rubik's cube, but applying basic strategy and knowing only 6 algorithms can get you from any one of them back to solved. There are hundreds of rubik's cube algorithms that people have spent years memorizing and perfecting to increase their proficiency in solving them.
In a game where there are far less possible permutations and far less "algorithms" as it were, developing a strategy understandable by a human is VERY possible and can be accomplished by pretty much anybody who puts in the effort.
What i wanted to explain is the existence of a wining strategy which win 100% of the game isn't understable for human logic because this strategy might be not logic at all.
The strategy sowed in this video was discovered by brutal force by a computer who tryed millions game playing randomly.
for example an other game named hex is a boarding game where ther isn't tye game and the existence of a wining stategy is easily proved with mathematics but very hard to discover even with computer.
For connect 4 i don't say that the wining strategy can't be learn by a human, i say that this wining strategy shown in the video is not explicit.the computer knows the good moves but not the logic behind this moves
(sorry if my though is not clear: english isn't my native language)
Im convinced my wife is a computer she calculates the moves everytime and always wins drives me to insanity. Hence why I'm studying connect 4 on my day off!!!
The first player can always win the game no matter what the opponent does
this is great and all, but when I'm playing connect four I won't say "hold on, let me check my computer" after every move they make
+Seim Yonatan And that's why Connect 4 still requires skill to win, despite it being solved. Memorizing all of the combinations of moves is ridiculous, but knowing which moves work in general and why is very helpful. I highly suggest memorizing where you should go depending on where your opponent makes his first move (and maybe the second), and from there you'll be at an advantage, since the opponent is not a computer either.
Well, that's not going to help me win every time. I think my opponents won't like it if I use an online solver while playing against them...
Maks Rosebuster
Play online
Nobody will know
One guy I played with used an online solver and I instantly disconnected.
I tried this, it didn't work. "Hi there... don't mind me while I log on to this Berkeley Computer Science Page before we start our friendly game of connect four.... say... did you want to play for money?"
Steven Rider game pigeon
things you need to win:
a friend which needs to sit somehow in front of you without your opponent noticing
a camera
a laptop
7 signs with numbers 1-7
your friend sits behind the laptop and has the 7 signs, the camera can see the board and is connected to the laptop. every time you opponent makes a move your friend can see it by using the camera, goes to the site and make that move. then he holds up the sign of wich row you have to take
My uncle made a tic-tac-toe/connect-four type game when he was a child and my family still has it. It is 25 metal dowels driven into a square block of wood - five rows by 5 columns. There are 126 wooden pieces with holes drilled through them. 63 pieces are blue and round and 63 pieces are brown square (in case of a tie, one is left unused). The dowels are tall enough to stack 5 pieces on them. There is enough space between the rods for you to be able to see all the pieces, even with a full board. To win the game, you must connect 5, but now you have to consider all 3 dimensions. You can win in the x-y on any of 5 layers,you can win in x-z or y-z in any of five layers, and you can win on a 1-1-1 slope in 4 ways (from each corner of the cube to the opposite. I think this is a fun, more challenging and interesting game, that I'll probably make myself one day.
I've not played it in a long time. I can't remember having ever tied. Is a tie possible in this configuration?
Any idea how and whether this can be solved, and how many board configurations are possible? Perhaps we should consider a 4x4x4 board in keeping with the "4" theme.
Interesting. I have not done much research on this but I have found some stuff. Parker Brothers marketed a 3D version called Qubic in 1953 and it seems to have a mathematical solution: en.wikipedia.org/wiki/Qubic
+MindYourDecisions This is a year late, but there was a 4x4x4 game sold when I was a kid called Match 4 (boardgamegeek.com/image/74747/score-four?size=large). I played it a lot way back then but can't remember if I still own it.
+Kevin John I got match 4 too
Kono is an international game that's 5x5. Drawing it is trivial. Either player can build a wall in the center of the board if they so choose, forcing the game to end in a draw. Nevertheless, this game is international. Existing in places that had seemingly little contact with each other. Japan, South Africa, etc...
As for this 5^3 game, it sounds very symmetrical. The first move would be the center. Then there would two distinct ways to respond. That is, assuming an adjacent move is the response. I assume the same basic strategy would apply as in Connect 4. Three dimensions would make the center even more important. One of the six orthogonal adjacent moves would be the best response. I guess the best move after that would be one of four identical moves connected to the center node and perpendicular to the two-node line segment. That is, BAC is a 90 degree angle. After that, I guess I'd form line DAC. DAB would be a 90 degree angle. This would be a unique move. The goal of player 2 would be to block three in a row while developing as close to the center as possible. The goal of player 1 would be to go wherever is the most open, while expanding outward from the nexus, maintaining a connection at all times. There would be two identical options for the third move for player 1. Then player 2 would prevent player 1 from getting three in a row in that same orthogonal line segment. A diagonal move from the nexus would be played if it has two orthogonal connections. Until then, orthogonal expansion into the most open area would continue.
Did they solve the game through brute force computation? Or did they come up with some kind of mechanism to assign value of the move base on the situation?
probably used a minimax algorithm
It appears they used brute force after a accurate mathematical model was created. This is because there is a percent value assigned to each possible move after each successive move. I believe this would only be possible if each possible move in the game was determined.
this web site it down or removed
Or, if you're a girl with a brother, you can always beat him by being "pretty sneaky".
How does being a girl change anything?
It's from an old commercial for Connect 4. When the brother loses to his sister he says "pretty sneaky sis"
ohh thanks ^-^
Lmfao
HAHAHAHA classic.
4:24 e1 is a better move than d7 imo. That's how I played on a site called 'helpfulgames.' Just won a gold medal at level 14, as a result of winning 10 games in one sitting. Accuracy was 18%. Their a.i. is good. It actually plays random moves. In contrast, the "mathisfun" a.i literally does the same thing over and over again. On that site, I win in 8 moves as player 2 and win in 10 moves as player 1. Always the same sequence. I was considering making videos where I say the move before it's played. I already did that for Nine Men's Morris. Even though that a.i calculated ~4 million positions per move, it always did the same thing. Good a.i is hard to find. It took 13-15 moves to win on 'helpfulgames.' Not once was the same sequence repeated. I even lost 45 times. Though my win ratio trended upward the more I played. If I make videos of Connect 4, I'd like to play against a.i at least at strong as 'helpfulgames." Funny thing, I just played against a human on connect-4.org. It played just like the helpfulgames a.i. It played what I call the "stranded center opening. I take 3 circles on the second rank, in the center files. The opponent fills 3x3 circles above them, while I go for the edges. Eventually the opponent is forced to play on b1 or f1, allowing me to get four in a row on the second rank.
I thought this video was going to describe a strategy. Going to a website and following its recommendation doesn't sound like a strategy
what do the faded shades of red mean for the move values
So now the website doesnt give the colour values on the moves... Any idea why they disabled it? Any alternative website?
I'd still like to see what happens if red moves other than you did, kind of hard to understand what's going on if you only show one (incomplete) example and it still doesn't entirely seem legit.
Instructions unclear, piece lodged in nose.
The flaw in actually trying to win in that way, is that since the computer assumes a perfect game it takes a the extremely long approach to win. Meaning a person can't actually play in that method unless they have the computer open, unless you memorize all the possible moves out for 40 turns. In which case you might as well be a computer yourself.
+Lilitha11
If your opponent makes a mistake, you probably can win earlier.
Inductive reasoning is better than deductive reasoning. From a human standpoint, it's all about identifying key squares. Playing in the center. Blocking enemy lines. Creating forks. When you think about it like that, the problem becomes much smaller. Well within the grasp of humans.
The sites to the games doesn't work??
Link doesnt work :/
That's why Ganon won.
Connect 4 League
discord.gg/TXRZGDR
What about strictly connecting four and not five or more?
I can't find the ''Play Now'' button on the website.
Can you post a working link please?
How's that for some game theory?
The site in unreachable
Play it in real life
Gee, wonder why ;p
@@shrubsy849 not the point, bruh
0MindSwept0 lol I don’t remember making this comment
@@shrubsy849 it do be like that sometimes
Bet your parents are proud of you making videos on how to win connect 4. I know mine would
It's better to start with a smaller perfect information system, before tackling a larger problem such as protein structure prediction or linguistic comprehension a.i.
I cant open the link to the site with the colour codes! also when I look it up online I cant play..
sea wave
Gulshanpolyols
4:05 what if blue plays anywhere else? For example, next to his own piece?
Blue will lose (assume perfect play from both sides after)
I typed in 6 rows 7 columns and it I wouldnt let me see the move values. Anyone else?
I was playing connect four then my math teacher came out of no where and told us the strategy double attack
What is the double attack?
But can it be strategically solved?
Yes, if my opponent plays perfectly. I've already beat the highest level a.i of two different sites I played at. A human opponent played just like the stronger of the two a.i. The game has the following principles: 1. Go for the three files in the center first. 2. Make double attacks as early as possible. 3. Block enemy lines, especially in the center three files. 4. Identify key nodes i.e places which need a piece under them before four pieces are connected. 5. Forcing moves are usually good. Knowing these five principles greatly shrinks the size of the problem.
Do you know how the algorithm works?
+Rafael Zamora
The power of brute force.
What's the name of this game?
The site isn't working🤔
link is broken for the solver
Five in a row is a far more interesting game, I think. Study the relationship with the knight moves on a chessboard!
So we do this against Ludwig, right?
0:34 for example its an automatic win for blue in this position once he puts a peice in the second column
5 in a row in the thumbnail.
There aren't over 4.5 trillion configurations; it's about 4.398 trillion, and even less if you don't fill the whole grid after someone wins.
There's also a lot symmetry in Connect 4, which shouldn't count.
well if you win every time whats the point of playing
The point is to simplify the game as much as possible. To come up with a general solution, which can then be applied to other games.
Choose a game like chess that's not actually solved, other games are too trivial and honestly not challenging since you can learn strategies from the program to always win
your links do not work??? frusrtating
+pmixx2000 frustrating*
Hi 😀! I don't really want to know how to win connect 4 all time because then it's not very fun 😃
good info TY
That thumbnail be like
CONNECT FIVE
That boy Rondo been here
at 0:34 blue player will win if he put his piece in the 2nd column
nope. red wins next turn in second column if blue does that
The server is down
Please learn 6*6
I got connect 7 once
All games without any random variables such as dice, a spinner or drawing a card from a shuffled deck are solved games with a guaranteed path to winning or a draw 100% of the time.
Chess hasn't been solved yet but it will one day
@@TempoHack… While not yet solved it is in the category or solvable games and is solvable just like tic-tax-toe. It just has a vastly larger number of possibilities.
Chess might never get solved an will certainly always be a challenging game for humans, since they will never be able to replicate the perfect solutions even after playing it all their lives
I took his class!
That's all well and good, however... I can't exactly sit there playing connect 4 with a friend while simultaneously using a computer to tell me the best move. You said it was to show you how to win every time. If by "win" you mean "get punched in the face" then yeah you nailed the title.
Link doesn't work bruh
Link doesn't work ;_;
upper left hand corner and corners = check mate --- instigator wins
well the double play is also use in tic tac(is it called that)
the direct link isnt working ):
How to win: do what the computer tells you too
CONECT FIVE WTH 0:48
Once I made an QUINTUPLE (5) attack and he had NO WAY TO WIN LOL
How does that even happen
@@goldenwarrior1186 How did you even find this comment
bruh people in the comments are so triggered that this game has been solved by mathematicians and computer scientists and calculators have been created that compute using minimax algorithms and alpha beta pruning.
The original way connect 4 was completely solved, was actually by a mathematician who used nine strategies - this was before computers were powerful enough to bruteforce and check everything.
You can find the paper here by Victor Allis, who also solved this in the same year as James Allen, in 1988. The strategies are easier to understand (they use terms like Zugzwang, which a chess player would recognize)
www.informatik.uni-trier.de/~fernau/DSL0607/Masterthesis-Viergewinnt.pdf
en.wikipedia.org/wiki/Connect_Four
Jacksfilms be damned
This Christmas everyone is getting destroyed.
0:00
"This is the first time"🐸
Now I can beat Zoe
Yo wassup ts community.
Connect 5
Connect 6
I did not watch this so you can teach me how to play this game 😑
POV: ur here bc of imsg games
yo
Do you REALLY have to explain what connect 4 is? REALLY?
Not everyone grew up with that game. One of things that unique about that game is that uses gravity. Not everyone knows that.
Can't wait to see this happen to chess hahaha
lichess.com
For humans, Boden's mate and Anastasia's mate are the easiest. At least on Lichess, those puzzles don't tend to e that deep. Not sure about computers. It's logical to first try perfect a.i, with as few pieces on the board as possible. Then expand upon that. Thinking in terms of vetors, rather than individual squares would shrink the size of the problem. It would be better if a.i clustered their pieces to both defend and control the center at the same time. Driving a wedge between the opponents piece if possible.
so. try not to make a mistake.
so. if you do try to make up for it.
so. try to practice more.
so. thats how to so. i mean win.
soso .. i mean haha.
Gchv. ffychv Kiara Torres
WHAT!!!!!!!!!!!!!!!
Here is a good strategy,you can play in the middle then they will surround you then build it up and if there dumb they would forget you are making a tower😏😏😏😜😜😜😜
lol, at 3:30 you say this is how you can win every time as player 1 (blue), but then at 5:20 red wins.
In other word, thats scripting
Tic tac toe is not a fair game like you said in the video. The first player plays properly, no matter how the second player play, the first player can always win.
+Tai Wei Hao nope. Perfect play in naughts and crosses *always* leads to a tie.
A fair game is a game that always leads to a draw. Drawing in games like Tic Tac Toe and Kono is trivial.
its not a cool website, it ruins a game for you
Other a.i do the same thing over and over again. That ruins the game more.
Well ofc, it's a kids game and not competitively viable since it's trivial and not fair (1st Player always wins)
8:52
4.5 trillion ok now that is a lie
no
The uploader didn't even mention the concept of symmetry, which shrinks the size of the problem considerably.
I beat that PC program... its flawed. LOL
Terrible too.
If you're first you can always beat it with perfect play, hence it's called a solved game
Why are people playing a solved game, play chess instead. It's like playing Rock paper scissors, completely boring if you know the game theory behind it
That's a lie. I downloaded a perfect connect4 solver developed by a Swedish teenager in java back in 2005