Claimeven - Connect 4 Strategy
Вставка
- Опубліковано 20 вер 2024
- The term 'claimeven' was coined in Victor Allis's paper 'A Knowledge-based Approach of Connect-Four'
...or at least that's where I think it came from.
A nice connect 4 server (which is not mine): / discord
and thanks for the tunes, tim!
The entire video I was waiting for a mathematical generalisation, but it's just a genuine connect 4 strategy
I mean, there is. First player always wins when played perfectly. The downside is its really. REALLY. Difficult to learn, its just a tree variation. Also, it is by starting in the middle
oh dont worry, the generalizations are on their way :)
👀
Today I learned that connect 4 experts exist
Fr
even more, connect 4 is a solved game. with 2 perfect players red always wins.
I have an essay due in an hour.
well, was it done in time?
Yeah, managed to figure it out.@@Bosjesmannen
💀💀💀
What grade did u get?
49% :( To be fair, it's a new writing style and a 440 class, but I also got 10% off for being half a page short, which is kind of my fault for giving up and just submitting what I had. Not my highest point, but I'm starting my next essay tomorrow so I won't have to all night it.@@aak2453
This is not what I thought I wanted but this is what I needed.
My understanding of claimeven is that it can be used for a lot more than simplifying endgames, but my understanding is also less well-defined. This is a good starter to claimeven for sure
I would agree with you that it can be used for a lot more than simplifying endgames. A lot of the time it will be used for middle game calculations to determine if playing into a certain line is safe (as you can just discard some of the claimeven columns if they have nothing else going on and only consider the ones with an odd amount of end-space left)
And now to use this information to absolutely obliterate my friends at connect four, thank you
I was so confused at first with the final example, it took me a second to realize you were looking at it from red's perspective now
Also, this was super cool and I'm really interested in learning more!
Yeah, as feedback to @2swap, they shouldn't have changed the "winning" colour in the middle.
@@qaisjp Or they could have simply spent a second to say "Now let's play from red's position."
Good video overall, but that one bit was confusing.
sorry about that 😅
Really cool learning about how large the expressive space of connect 4 is and how players have started to carve it up, thanks for sharing!
Nice video! it's always satisfying to see someone break down complex things to intuitive bits.
I've seen there's a solver for Connect 4 and it often leads to the call-and-response - thought it was because the losing side is stalling... but turns out either side can lose without precisely knowing when to use it or not.
Stalling is sometimes the case too though!
Me and my friend have played semi-serious connect four for the longest time. I got super into counting evens and odds to try and figure out the best move, but this blows all of that out of the water with how much simpler and more effective it is!
This is a good introduction to claimeven! I'm betting more people will be able to easily and intuitively pick it up after watching this
OMG I'm so glad I found this channel. I played a ton of connect 4 as a kid. I was quite good (so I thought) and hardly ever lost. I really liked math and abstract algebra and I played the game a ton. Later, I stopped playing connect4 in favor of Rubik's cubes.
Recently one day when I was bored I picked up the game again online and was once again fascinated by all the cool and unique problems it threw at me. I got smashed by a few players and learned from them. I love this game so much.
Video about commutators (as applied to twisty puzzles) is in the works!
@@twoswap awesome!
Your video quality has improved alot since the first 2swap introduction to connect 4 strategy
hell yeah 😎 thanks a lot!!
I’m already rubbing my gremlin hands together with a huge crooked smile, waiting for my spoiled brat 10 year old cousin to come over again
I got my friends obsessed with connect 4 in high school good to know there was some sense in the strategies we made
I don't have much experience with connect four, but I won class championship with similar strategy. It was eleven years ago, but I still remember that there was spot that would give me win, but only if opponent places stone before me, so we filled rest of the board so no one would win until we get to here. Somehow I figured out that if we'll do that then my opponent will be first to put stone in column, so I had only to stall for time
always a good day when you upload. my friends are super impressed when i demolish them with my new skills
I love this series, keep it going!
Bro responding to comments 9 months later is fire. I must watch the video again.
😈
His strategy came to fruition.
always love a new upload from you. Keep it up!
@twoswap I’m curious. Do you know the game Eternas? If you don’t it’s literally connect 4 but designed in a circle. The pegs that create the height only allow for four balls vertically (which of course also means 4 diagonally). It’s a very interesting game and I wish both of these games had a more competitive scene.
I did not! Although I have played a similar circular connect 4 game on a rotating base. I dont recall the name though. It had some other rules, like both players play simultaneously, and can only play on the quarter of the board which they are facing.
@@twoswap Interesting. Eternas allows you to play wherever you want and additionally if a tie occurs you are required to remove one of your pieces on the top and place it somewhere else.
i don't know why i'm here but this was really cool and informative
I didn't expect to see a connect 4 strategy today
you never fail to impress, twoswap!
I don't know how I got here. I just know I love the logic.
This should prove a useful strategy against my 5 year old niece, thanks
Listening to you explain this game makes me think you could teach anything.
What an absolute chad. Please keep making these vids
Thank you so much!!!
Well this is the most interesting thing I've heard about in a while, time to study connect four I guess!
:D
Did not know connect 4 went this deep
The droning background music made me a little afraid of Connect 4, but it was a cool experience!
I did this as a kid, didn't know it was an actual strat
Hello, for rendering the boards if you could please make a small indicator to tell who's turn it is to play I would appreciate it. Thanks.
I think a smaller version of the connect four token of each color on the bottom left and bottom right of the board, going from the faded to solid depending on who's turn it is. The solid should mean that that player will place the next token.
damn this is a good idea and I wish I saw this comment before making the last video lol
@@twoswap It is a great suggestion, 3rd'd.
Welp, I guess it's time for me to drop everything and dedicate myself to learning Connect 4 pro strategies.
Only half joking there, I always enjoy learning cool strategies for simple games like these. I guess I'm a bit more competitive than I thought.
This is what I needed to beat impossible cpu on 51 Clubhouse games!
nice video once again!
shut up
Still on the hydration grind on UA-cam is W
my 4 year old niece will not know what hit her if i use this on her
thanks for captions!
hell yeah!
Deserves a sub
Thanks :D
now this is fun! i love playing connect four and i win too often
5:53 yellow could have also played in row 4 to win the game but that reinforces this strat anyway
0:28 is this loss
first thought lol
almost
The player who goes first in connect 4 should always win unless they make a mistake. It makes sense to classify boards by how many steps it takes the first player to make a mistake.
So good I subbed immediately
Thanks!!!
I figured this out as a high-school student and this with some basic foresight was enough to dominate the game at school.
I have 3 homework assignments due in 4 hours.
Regarding the last example, is it possible to play claimeven as the first player when you don't have a threat on the claimodd column?
Not necessarily. The claimodd column could fill up first. Then it would be your move as player one to start a claimeven pair, thereby breaking parity.
Do you think you will ever analyze the more modern published version of Connect 4, wherein both players get two "blocker" pieces that give them an extra turn? We play it at my workplace constantly, and the skill floor and skill ceiling both seem orders of magnitude higher than with regular Connect 4.
Probably not, unfortunately. It's very niche, but furthermore I'm not sure the strategy is nearly as regular as standard c4. I like the normal game because it's right on the boundary of simplicity and complexity- theres emergent superstructure, but there's still sweeping general claims that can be made formally about endgames and such. It's this balance that got me focused on c4 to begin with, and I think that variant is a bit of a step away from the ability to get very far in any formal discussion of the game, just by the sheer introduced complexity.
my opponent connecting 4 on the first layer because i watched this video
This video feels like a horror movie
I had to get up for work 39 minutes ago.
But what's a good strategy to start the game and end up in a favorable position?
thats still the hard part! no simple way that can be easily summarized into a 10 minute video.
Not sure if this is correct, in all the positions you show it’s reds move but I don’t think that is possible given the position. Yellow must have gone first and given the equal number of pieces on the board it must be the first players move.
Yellow didn't go first! All of my vids follow the convention of red as player 1.
This is great
😎
I have never lost a game of connect 4. I must have been doing this all the while
This kind of reminds me of "zugzwang" in chess.
that's precisely what it is!
I never heard of that term before, thank you for that fun and useful word. It's actually useful to describe many things in life, I want to bring it out of the chess world.
Wow, this is interesting stuff!
Are you continuing this series or are you finished with connect four in general?
my apartment flooded and work has been insanely busy
I'll get back around to it though
@@twoswap Yikes man, sorry to hear that. Hope things turn around soon!
was i suppose to be playing as red in the last puzzle bro. i was thinking i was yellow and trying to find a way for yellow to win. i was able to find the way to force win as red tho
I’m just surprised there are experts in this
Hi, my 10 year old son wants to take some virtual lessons with you to better understand and play connect 4. Is this something you would consider?
sure, although i must disclaim that there are much better players out there than I!
How can i contact you? I don’t want to post my phone number here
My discord is 2swap, you can message me there
@3:10 yellow could place in 2-nd column and win instantly....
Yeah I get it I guess but no idea how to do it still.
Red could have won much earlier at 9:39 by placing one in the middle
This is kind of random, but I was on your twitch stream one time a while back when you were streaming yourself studying Japanese and I dropped a follow. Today I randomly found you on UA-cam and I realized you havent gone live in a while, so I just wanted to know do you ever plan on streaming again?
I do every now and then! Usually Geoguessr, Go, Anki, or programming.
HE SAID NEXT VID IS THE ONE THAT CHANGES VIEW ON REALITY
Hehe still one or two more till that one!
I mean isnt this just parity in general? For example, in the last game, you can just say some columns are useless, then apply claimeven on the rest of the board
Which fixes the parity issue
yep
i always figured connect 4 was a shallow game like checkers
okay but these examples show two columns being filled to the very top. but in no universe have any of my opponents ever done this. even in the "complex" examples it just shows unrealistic play. people dont just build to the top. i'm just confused how something like this comes up in actual play
The later examples show smaller columns
Well, I can say at least that I have won plenty of games with each of these. The thing is, you need to know how to encourage it along. It's not common that you will just spontaneously arrive at an opening where claimeven wins by mere chance, you have to know exactly where you're going. In these cases, Red is probably at a high-beginner level, knowing that it is strong to play in the center, but not knowing, for example that 434 or 433 are wrong (most of the examples from the video come from these two openings.)
Perhaps to convince you these are realistic, as an example, here is a play-by-play from the first example shown at 0:00. The opening is 433337. This is one of those super common openings that you need to know as p2. At this point the game is tied. The players now (correctly) climb up the middle (4333374444) with the aim of stopping each other's diagonals. Then, red makes the blunder of playing 3 with the goal of making a central diagonal, at which point claimeven is afoot. From there, the transcript is 43333744443473. This is pretty organic play. Maybe not against random people who don't even realize that center column is generally advantageous though.
Link to position: connect4.gamesolver.org/?pos=43333744443473
8:10 if red plays C7R2 and yellow follows with C3R2 red could still win if yellow then follows claim even. Moves would be as follows C3R3; C3R4; C3R5; C3R6; C5R1; C5R2; C5R3 (red wins).
No, yellow won when they played in C5R2. Yellow is winning on the C3R4 to C6R1 diagonal is the point.
I get that, what I meant was that he implied that it could be played either way and yellow would win but really it only work if red plays C3R2.
@@Brain901 I know. I am saying in the series of moves that you gave, you say red wins when they play in C5R3, but yellow actually won in the move just before, in C5R2. There isn't a difference between red in playing in C3R2 or C7R2; neither of them give red a chance at a connection or obstruct yellow's diagonal. Yellow will win after both moves.
Sorry I'm almost a year late to respond 😅 but yes, it works the exact same regardless of which side red takes, the same diagonal will win Yellow the game either way.
Nice
Hey i am here to critique as a stupid-ass viewer. Feel free to ignore me. I feel like you talk too slowly and have too complex sentences. You probably don't want to change your style, but maybe you can try to be a little bit more thoughtful about how you make your script in that direction. Slow sentences will make people think. Silences, between those amplify the thinking. That makes you interrupt people's thought's when you start talking again.
This happened to me and a friend who watched this one, we're both students of computer science and i made the personal decision to tell you this.
I want to clarify, if you feel bad with this message just ignore it, but maybe, just maybe, it will help you in some way c:
Loved the vid! Good luck! Subscribed!
thanks, appreciated :) I tried to make the latest one flow a bit more naturally.
In reality this is only like this because the video rendering tool I made does all of the spacing of the animations and recorded sentences automatically- I didnt hand-edit it, and in retrospect it definitely is pretty choppy.
@@twoswap Hey! I am so glad you trusted my comment this much! I'm gonna watch you new videos c: good luck!
Why is the music so ominous l? I’m literally pissing and pooping my pants
What if the connect 4 grid is only 5 rows tall
Yep, can't apply claimeven naively for odd heights, but you can still think about column parities- it just gets more complex.
what about that one board you showed in the beginning where there were even spaces, but red won.
Whats the background music?
Something a friend made for this particular video!
what if red places a move at the very top, or tries to win even instead of just randomly?
The point of the strategy is that red only has odd points available to play, and yellow can always play the even point directly above that, and under certain conditions that guarantees a win for yellow
If red places a move at the very top, there was only one space anyway, which wouldn't be even.
This strategy is far from 100%. Say red goes first, which will obv be the first line, you fill the pair on top, they go next to that on the first row and then you go second row again, continuing until they now have 4 on the first row because you were too busy filling the pairs.
absolutely, getting to a position where claimeven applies is an art
wow
woah
How do you make these videos? The visuals are very satisfying
Custom renderer! github.com/2swap/swaptube
This connect 4 series doubles as my test-run of becoming able to very quickly and painlessly render videos with it, before I start talking about more "serious" topics
@@twoswap Pulling a whole 2b1b on us, eh? Lovely! He's got some competition.
I could tell that your graphics weren't from his kit, they just have a certain feel to them, a kind of roundness. Yours are simpler, cleaner (easier to program, lol), gives a different vibe, a more mathy vibe. I think that's what 3b1b was going for tho, not give off that sterile vibe, and make it a bit more playful, with swishing and flying objects. It's a channel preference.
@@kindlin hell yea :)
I’ve heard that connect4 is a solved game where p1 is guaranteed to win with perfect play - does this strategy rely on p1 making a mistake that allows p2 to employ it?
Yes, precisely :)
In the coming videos we will see how Red can apply it too, with some modification!
@@twoswap I find it very interesting the strategy and theory found in connect4 despite it being “solved”. Practically speaking, how trivial does the game become once you learn the method to guarantee the p1 win?
this is a hard question to answer, and it will basically be the essence of the whole rest of the series.
to give you a taste, you can't just say "once you learn the optimal strategy." it is too big to memorize, and too entropic to crystallize and convey simply. even merely verifying that someone is actually playing perfectly up to their weak solution of choice would probably require centuries of trial. for this reason, I am cautious about talking about "people who play perfectly." it seems like a non-verifiable claim.
that said, ive played some people who definitely seem like they play perfectly.
the remainder of this series will, on the contrary, be my best efforts to boil that complexity down to a minimal amount of information, and construct some abstractions that make memorization of the whole game a task that can be perhaps done over the course of a year and not a lifetime. stick around to find out how that can be made possible.
I put a like before I watch.
Love the content and the pace, but those empty silences between each phrases are very ennerving
this is true aknaodnshiaotolqlqpalxmfoen
connect 4
Claim even!
Are you 3blue1brown?
heheh, no :)
Holy fucking shit
why is this video produced like a horror movie?
kalama musi li ike anu seme?
kalama musi li ike mute tawa mi@@twoswap
4 dabloons
since when was there competitive connect 4
Why do I feel like I’m being tortured? With ominous music
because you are
I wonder how adding a 3rd dimension would alter the game.
why stop at 3?
haha.
no ;)
I think it’s forced win for player 1 in 5 moves because of the 3 in a row on the bottom trick
@@MilesIsRealThat's why you no longer need 4 in a row to win but rather 5 in a row
@@MrHublibubsNot necessarily. This depends on the rules of the game. This is an example of a k,m,n,p-game.
lol please get to the point
you should aim to cut out the gaps between sentences, this video is 50% waiting around in silence for you to continue speaking
ajsksnakalslwndjcsbaixnw
1:50 yellow doesn't win because connecting 5 is not allowed.
It is though :|
What kind of dumb rule is that
anyone thinking so much about connect 4 strategy is almost certainly a virgin.
just say you're stupid
🥸
connect 4 is fun i wish i had people to play it with lol