There are Exactly 14 Different Games of Tic-Tac-Toe

Поділитися
Вставка
  • Опубліковано 16 лис 2024

КОМЕНТАРІ • 4,6 тис.

  • @marcevanstein
    @marcevanstein  10 місяців тому +387

    The sequel is out now! ua-cam.com/video/Cxm4qaGTB0M/v-deo.html Oh, and there's this: ua-cam.com/video/O1gZxmvs8Oc/v-deo.html

    • @RinkieGeintie
      @RinkieGeintie 10 місяців тому +3

      ok.

    • @joshacd150
      @joshacd150 10 місяців тому +2

      Tic

    • @Applz101
      @Applz101 10 місяців тому

      @@joshacd150Tac

    • @neovoid5008
      @neovoid5008 10 місяців тому +1

      Try playing and calculating the game of super tic-tac-toe?

    • @ABYS5.
      @ABYS5. 10 місяців тому +1

      ​@@neovoid5008 I was searching for that, and I watched this video instead.

  • @butlazgazempropan-butan11k87
    @butlazgazempropan-butan11k87 10 місяців тому +10003

    There is only one true game of tic tac toe.
    The one that results in a draw

    • @complexperplexity
      @complexperplexity 10 місяців тому +671

      The only winning move is not to play.

    • @RedGallardo
      @RedGallardo 10 місяців тому +429

      Yeah. I think, if 2 AIs were playing they'd always end with draw. All sane moves lead to a draw. Gotta not care at all to lose.

    • @zachlewis9751
      @zachlewis9751 10 місяців тому +188

      Perfectly balanced game: no one wins.

    • @Henrex2000
      @Henrex2000 10 місяців тому +28

      @@RedGallardo exactly what he said at the end

    • @koenvandiepen7651
      @koenvandiepen7651 10 місяців тому +7

      There are 2 and they both draw.

  • @omarino99
    @omarino99 10 місяців тому +25309

    Now carry the same reasoning but for a game of chess 😅

    • @Thomas-rz5nt
      @Thomas-rz5nt 10 місяців тому +2973

      10^120 games later

    • @GMPranav
      @GMPranav 10 місяців тому +1505

      ​@@Thomas-rz5nt that 100^120 thing is actually a gross underestimate and has a very poor reasoning too.

    • @Luredreier
      @Luredreier 10 місяців тому +823

      Tick-tack-toe has been solved, chess, not even close to being solved...
      Indeed the above process is essentially all of chess theory...
      And let's just say that the total number of chess books in the world exceed a million books...

    • @patrickbeer1830
      @patrickbeer1830 10 місяців тому +189

      That's why computers win every time

    • @georgerogers1166
      @georgerogers1166 10 місяців тому +129

      A Chess board is not simetric.

  • @I_am_bacon._.
    @I_am_bacon._. 10 місяців тому +6490

    Yeah how did tic tac toe even get so iconic? I always liked the version where after each player has placed 3 pieces, they'd from now on move one of the pieces they placed of their choice onto an unoccupied space of their choice. Which turns the game more into an endurance test. Who can survive longest without making a mistake.

    • @zackbuildit88
      @zackbuildit88 10 місяців тому +977

      It's easy to play on paper and most kids didn't notice the strategy for a long enough time to keep it interesting

    • @IvanNOFX
      @IvanNOFX 10 місяців тому +482

      I think it's down to its simplicity and how easy it is to play. Takes no time to set up and is only played to pass the time. You know how you can lightly scratch your skin to draw a line on it? We used to play tic tac toe that way. Stupid and disgusting, I know.
      And I never played the version you mentioned, first time I heard about it really. It really seems more interesting and strategic that way.

    • @st0rmforce
      @st0rmforce 10 місяців тому +224

      All you need to play is a misty car window and a finger, or a stone and a concrete pavement, or a stick and some soft ground, or if you're feeling fancy, paper and pen

    • @dotXyore
      @dotXyore 10 місяців тому +75

      This is why I prefer chopsticks. Simple to get into, has depth, no paper required, and house rules means you can keep it interesting.

    • @lucio-ohs8828
      @lucio-ohs8828 10 місяців тому +21

      You should try ultimate/super tic tac toe

  • @AsaNoGaijin
    @AsaNoGaijin 5 місяців тому +174

    This type of video is what UA-cam was created for. You wouldn't find this stuff anywhere else if it wasn't for the internet. Interesting and weird, totally original content and very informative.

    • @crystalgaming12
      @crystalgaming12 3 місяці тому +2

      UA-cam was actually created for dating

    • @Deepthi935
      @Deepthi935 3 місяці тому

      @@crystalgaming12 bruh 💀

    • @too_ql
      @too_ql 3 місяці тому +1

      ​@@Deepthi935 😢 I want to watch the same Mrbeast video over and over

    • @noticiasinmundicias
      @noticiasinmundicias Місяць тому

      feels like oldschool youtube

    • @noticiasinmundicias
      @noticiasinmundicias Місяць тому

      @@crystalgaming12 actually it was for the devs to hook up lol

  • @sebastianromero3393
    @sebastianromero3393 10 місяців тому +3290

    I’m proud of myself for essentially mastering tic-tac-toe while still in the single digits. The realization that the corner would almost always result in a fork or tie was amazing until it quickly became boring.

    • @jasondashney
      @jasondashney 10 місяців тому +205

      For some reason if you use the center it's more visually obvious to more people the directions you can go but if you choose a corner, it's harder to see what you're doing.

    • @kakerake6018
      @kakerake6018 10 місяців тому +29

      @@jasondashney it's true they usually play where you can not only block but get a fork with one move

    • @jonahbound9257
      @jonahbound9257 10 місяців тому +108

      ive learned that the single most possible trick and it only works once is to go corner, they go center, you go opposite corner, and they impulsively choose one of the 2 remaining corners which gives you the intuitive move of blocking their win creating a fork. It works more than it should and unless someone is choosing dumb starting moves on purpose its like the best chance ive found. But yeah it only works once then tic tac toe goes back to endless draws

    • @sebastianromero3393
      @sebastianromero3393 10 місяців тому +19

      @@jonahbound9257 That’s exactly what I do! The worst part is that once you choose the opposite corner the only possibilities are a win for you or a draw

    • @jarlfenrir
      @jarlfenrir 10 місяців тому +7

      I started to avoid starting in the center when I realized it actually always ends in a draw.

  • @pumpkinzz5728
    @pumpkinzz5728 10 місяців тому +1773

    I’m a tic tac toe nerd, so I instantly caught that the opening move mistake. One smaller mistake that I noticed, however, is when you said there’s only three games where X starts in a corner and O goes center, and they all result in draws. Here’s why: if X goes in the opposite corner (this may have been pruned from your no-dumb-moves algorithm, but it’s actually a good move) then O goes in either corner (it’s symmetrical), X can take the final corner and cause a fork, winning the game. If O takes the edge, it results in a draw. So it’s actually 5 games! Either way, amazing video, loved this analysis!

    • @Ent229
      @Ent229 10 місяців тому +73

      The good 159 opening.

    • @Dexuz
      @Dexuz 10 місяців тому +254

      Honestly being a nerd of tic-tac-toe would make you the ultimate nerd, as you can literally know everything about the game, not as a hyperbole as a chess grandmaster could say, but literally everything.
      God in a bottle, but God nonetheless.

    • @Trancefreak12
      @Trancefreak12 10 місяців тому +42

      Then again, depending on your definition of "different," putting the O on a corner when there's an X-O-X along the diagonal could count as a dumb move and be considered no different from other dumb moves.

    • @RichardDamon
      @RichardDamon 10 місяців тому +29

      Yes, it is one opening that leaves a possible bad move for your opponent that needs a bit more lookahead to see that it is bad. This shows your "rule" of move to make a possible winning move isn't necessarily a good rule.

    • @HD-fy2wu
      @HD-fy2wu 10 місяців тому +77

      @@Trancefreak12 Yes, this is why it is wrong for the video to say moves that do not set you up for getting 3 in a row are dumb and exclude them. There can be a move that does not set up a 3 in a row, but sets up a fork instead, which is in fact a better move than a move that sets up a 3 in a row since it is more hidden and requires your opponent to think 1 step further to find the threat. Just like what this comment is suggesting.
      Just like in Chess, a move that sets up a checkmate in 5 is definitely not dumb, but better as compared to a move that threatens to checkmate just in 1, which is very obvious.

  • @lukeseaman2994
    @lukeseaman2994 10 місяців тому +682

    4:59
    Is the most deeply fulfilling piece of music I’ve ever heard as evidenced by the fact I’ve been looping this part for the past several minutes

    • @ferranferran6955
      @ferranferran6955 10 місяців тому +12

      No, no...
      This is the true soundtrack for tic tac toe
      ua-cam.com/video/F7qOV8xonfY/v-deo.html

    • @guylikesbananas3986
      @guylikesbananas3986 10 місяців тому

      I believe it’s
      m.ua-cam.com/video/dQw4w9WgXcQ/v-deo.html

    • @合合合合合合合合合合
      @合合合合合合合合合合 10 місяців тому +14

      ​@@ferranferran6955whatever you say buddy i love the neows and the wows better

    • @ferociousfeind8538
      @ferociousfeind8538 10 місяців тому +1

      make it the soundtrack to an abstract and absurd game about tic-tac-toe

    • @koikome1
      @koikome1 10 місяців тому +2

      Trully a fire song🔥🔥🔥

  • @-CookieDev-
    @-CookieDev- 10 місяців тому +2054

    there are only 3 games, one where o wins, one where x wins, and one where its a tie.

    • @Jungleali
      @Jungleali 7 місяців тому +20

      Wrong, there are 4. I’ll let you think about that one

    • @-CookieDev-
      @-CookieDev- 7 місяців тому +89

      @@Jungleali the one where you resign or the one where you dont play?

    • @Xantant
      @Xantant 6 місяців тому +29

      @@-CookieDev- I’m now going to spam random letters in a different language because I don’t know how to respond بعاهرذاهوت وصهتوبعغرقتهوينخىخنذوهخشختنوذخهاوذخعارباعرقتهخوثعخارشعلزذعاهرضتهووقه

    • @-CookieDev-
      @-CookieDev- 6 місяців тому +9

      @@Xantant yeah.. frfr

    • @sssaaahuh
      @sssaaahuh 5 місяців тому +60

      @@Xantantthe thing is the Arabic part just gets removed from your comment when google translates it lmao

  • @Dexuz
    @Dexuz 10 місяців тому +1793

    As a kid I figured out the corner was the best start, not because of some mathematical logic, but simply because people always fall for the forks following it.

    • @thesleepydot
      @thesleepydot 10 місяців тому +88

      exactly! I’m frankly surpised the 3 different* games didn’t include a trap where the second X is in the opposite corner (and third is the other available corner, unless the other person has two Os in a free row). People who don’t play often are always confused by that. It’s not an immediate setup to win (thus i think it was filtered out by one of the * conditions), but it’s my favorite trap

    • @okbasto
      @okbasto 10 місяців тому +16

      @@thesleepydotit's filtered by "block opponents winning move"

    • @EEEEEEEE
      @EEEEEEEE 10 місяців тому

      ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎E‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

    • @joefoulger3510
      @joefoulger3510 10 місяців тому +19

      The corner or the side is always the best. Definitely weird that he chose to only use games that start with the center, as the center always leads to a draw

    • @Zach014G
      @Zach014G 10 місяців тому +2

      Yup i was alos that evil person. When a pllayer knows the fork and chooses to go to one of the middle end spaces instead of the center.😥😥

  • @jamesbarr4996
    @jamesbarr4996 10 місяців тому +1099

    I figured out Tic Tac Toe is a stupid game through coding as well! Took an app design course in college and we were basically given a 3 month project to make a phone app in a group. Two of us weren't very good with code yet (the class didn't really have any pre-requists) and one of us was really good. Anyway, we decided to make a Tic Tac Toe app where you could play the game against the AI and it would keep track of your win rate. We made two versions of the AI, the "easy mode" and the "hard mode". The easy mode was basically just RNG--the AI just drops its mark in any detected empty spaces. The hard mode...uh...well, that was the job of the guy who knew how to code well and he made the AI actually strategize by prioritizing winning moves and blocking the player's winning moves. And what we ended up doing was making a simulation of Tic Tac Toe you could not win. The best you could ever do was draw. Whoops.

    • @BenjaminWalburn
      @BenjaminWalburn 10 місяців тому +277

      all you need to do now is add a purchasable pro upgrade that gives the AI a small chance to blunder.

    • @TheBlueArcher
      @TheBlueArcher 10 місяців тому +164

      @@BenjaminWalburn Pay to win tic tac toe. I like it.

    • @schwingedeshaehers
      @schwingedeshaehers 10 місяців тому +15

      but it is not correct, you (normally) can win against an ai, that only protects and does wins. it is impossible, if you store enough noves upfront

    • @kfcforme
      @kfcforme 10 місяців тому +30

      That's basically what I did when I created a Tic Tac Toe website. I had the easy bot play randomly, the hard bot play as optimally as possible so you could never win, and then the medium bot play as optimally as possible except for in one specific edge case that you could exploit every time if you figured it out. I made the medium bot thinking that it was impossible to win against until I happened to stumble on the edge case lol.

    • @SuperWeapons2770
      @SuperWeapons2770 10 місяців тому +14

      A strange game. The only winning move is not to play.

  • @coolitten4937
    @coolitten4937 10 місяців тому +935

    In the final 3 games, the two top ones are just mirors of each other, so there are only 2 possible ways to end a game of tic tac toe (also the 8 ties in the 14 games were also the same just rotated and mirored)

    • @iamthekingof1omillionsunsets
      @iamthekingof1omillionsunsets 10 місяців тому +225

      i can't wait for it to be discovered there are zero ways to end a tic tac toe game

    • @rikig6637
      @rikig6637 10 місяців тому +49

      I think it's a mistake?
      I would put the 2nd "X" on the other side of the "O" to create a split 🤷🏻‍♂️

    • @theredhead1900
      @theredhead1900 10 місяців тому +24

      @@iamthekingof1omillionsunsets Is tic tac toe ever over anyway? Or does tic tac toe ever start? Is tic tac toe a game? What is tic tac toe?

    • @pietroalessandrini
      @pietroalessandrini 10 місяців тому +25

      even if the final layout is the same it's the order of the moves that defines the game. If you color coded the x's and the o's depending on when they where placed the boards would look different

    • @silentobserver3433
      @silentobserver3433 10 місяців тому +18

      That's only if you consider the final state of the board, and not the order in which it's played. If you watch carefully, the first 5 moves are the same on the top two (as in, aren't mirrored), and the mirroring only starts at the 6th move. That didn't count under his definition of "different", because he only considered when the *whole* game was mirrored, not just half of it

  • @Spika94
    @Spika94 8 місяців тому +22

    I am glad you pointed out playing middle first was bad, because I was shaking my head left and right when I heard you say it was the best move, which I am glad you came back to point out was not the best move.

  • @tiaraguy7705
    @tiaraguy7705 10 місяців тому +570

    I remember being in 3rd grade and realizing while playing one day with a classmate that middle and corner were strongest. I would often let my friends go first because if you lead them into it correctly you could still win going second. I think it was shortly after that I realized that if you start in the corner then realistically you win or draw every time as well, by then it felt solved to me so I have never really played it since. Love to see that it plays out similar to what I was thinking.

    • @kuruju_vtube
      @kuruju_vtube 10 місяців тому +25

      this man is a prodigy.

    • @Edgelordゼロ
      @Edgelordゼロ 10 місяців тому +16

      @@kuruju_vtube or, just hear me out, you are a little slow....? idk, I also came to a similar conclusion a long time ago and have never lost unless I wanted to throw the game

    • @dinocharlie1
      @dinocharlie1 10 місяців тому +44

      Technically, no one should ever lose tic tac toe because the game is structured in a way where no matter what the other person does, you can always draw. You can't force a win like other sports, so unless someone makes a mistake, there is no winning

    • @tzarg
      @tzarg 10 місяців тому

      @@Edgelordゼロ nah that just means you're a proditchywotsit too

    • @VinceGatling
      @VinceGatling 10 місяців тому

      It's literally always a draw when I played

  • @The22ndDoctor
    @The22ndDoctor 10 місяців тому +962

    6:20 You're missing the move I use to sucker wins out of people. The corner grab is in the back of most peoples minds, so X A-1, O B-2, X C-3 can usually sucker someone into dropping an O in one of the remaining corners (A-3 or C-1), which forces you to block at the other corner and give yourself a double win.

    • @mustafaoh9866
      @mustafaoh9866 10 місяців тому +59

      But they could draw if they play O on A-2 or B-1 or B-3 or C-2 but this strategy is pretty good i use every time and almost always win

    • @LCDL6
      @LCDL6 10 місяців тому +44

      CAN draw is better than WILL draw

    • @Lucifer-fj7mg
      @Lucifer-fj7mg 9 місяців тому +32

      There’s no win in tic tac toe, this game will only end up in a tie if you know how to play. This game is boring

    • @Lucifer-fj7mg
      @Lucifer-fj7mg 9 місяців тому +7

      There only 1 things you keep in mind, doesn’t matter going first or second. Take the middle or take the corner for first move, and the game will end up tie.
      If you don’t follow this rule, the person who take the first move, will win no matter what.

    • @celestialsylveon6453
      @celestialsylveon6453 9 місяців тому

      @@Lucifer-fj7mg No actually @The22ndDoctor is 100% right, their trick would fool a large portion of people. I got fooled by it a few times and didn't think about it. It relies on exploiting an instinct in the game.

  • @caspermadlener4191
    @caspermadlener4191 10 місяців тому +668

    I love that a game as simple as tic tac toe has a paradoxical best first move, really goes to show how easy intuition can fail you if not properly supported by mathematics.

    • @SA-lh7zl
      @SA-lh7zl 10 місяців тому +50

      I was a bit anoyed, that he didn't continue properly tho! If you start at a Corner and your oponend choses to Play the middle, you've basicaly won If you Play the oposite Corner every time! (Which Shows, playing the "optimal" next move ist Not Always the best Overall!)

    • @francoisleb4344
      @francoisleb4344 10 місяців тому +14

      ​@@SA-lh7zl I was thinking also about it. And with that knowledge, the opponent player shouldn't play in the middle after the firstmove, but on the opposit corner (or an edge near the first move) to counter that strategy.
      And so, if both players knows about it, noone could win a single game

    • @MTHW4390
      @MTHW4390 10 місяців тому +19

      @@francoisleb4344 You have to play middle move 1 as the second player otherwise you lose if they play the best moves, but the optimal game always goes corner X centre O opposite corner X Edge O Opposite edge X Corner Block O other corner X edge block O last remaining edge X, thus if all players play optimally, there is only 1 game of tic tac toe.

    • @trisbane4086
      @trisbane4086 10 місяців тому +11

      The corner is not the best move. Although you increase your odds of winning from 35% to 48%, you also double your chances of losing, from 7% to 14.8%.

    • @1989DieJay
      @1989DieJay 10 місяців тому +6

      @@SA-lh7zl it will be a draw, because Circle will choose side. X is then in defence.

  • @palavonipal
    @palavonipal 8 місяців тому +7

    In fact, I start in the corner, because if the opponent puts anywhere else but the middle if you place in the corner, you always have a forced win
    Edit: i just realised he said the corner is better later on

  • @DJStompZone
    @DJStompZone 10 місяців тому +470

    "If this kind of obscure nonsense is your cup of tea, congratulations! You're the intended audience for this channel."
    I just love seeing a creator with enough respect for their viewers' intelligence to trust them to make their own decision. Not begging for subscriptions, just presenting a solid reason to subscribe and leaving it at that. It's so refreshing to see, that right there earned my subscription more than anything.

    • @nobelphoenix
      @nobelphoenix 10 місяців тому +6

      It felt like a breath of fresh air, I wish more content creators did the same, basically an ad for their own channel. Now I know this is not a one off content but what this channel does in general. UA-cam tends to recommend one off experimental videos to others so people often don't check the channel after watching a video.

    • @timeup2549
      @timeup2549 10 місяців тому

      Wholesome Reddit reply r/cuckold

    • @devforfun5618
      @devforfun5618 10 місяців тому +4

      i always go the the library if i like one video, and after watching two more i decide if i want to subscribe,but that only works if you have time to watch more otherwise youtube might never recommend the channel again,the other option would be to subscribe first and then unsubscribe if the next videos arentn interesting when they show up, but you cant do that on desktop because youtube hid the unsubscribe button, oh how i love youtube, such a great platform

    • @ichangedthename
      @ichangedthename 10 місяців тому +8

      Tbh idc if a creator heavily pushes for likes and subscriptions. As long as the video is good, like this one here, then I’ll support the creator regardless.

  • @TaIathar
    @TaIathar 10 місяців тому +139

    So going on how you can start the game in different places, I'd say the "64 games" line is probably the most accurate. The sonification was pretty neat too.

  • @itsxela9617
    @itsxela9617 10 місяців тому +564

    If you are a somewhat competent tic tac toe player, you can never lose. It takes very little effort to calculate all of the scenarios.

    • @Fighter11115
      @Fighter11115 10 місяців тому +121

      Never lose but if both players are very competent then always a draw

    • @GutkaTheNoob
      @GutkaTheNoob 10 місяців тому +9

      Yes to both comments

    • @Dexuz
      @Dexuz 10 місяців тому +16

      And it's not like you need to calculate that much, if you simply play by always blocking the potential forks, you'll never lose (unless you play edge after opponent starts center, but you figure that out instantly)

    • @fireballfilms
      @fireballfilms 10 місяців тому +5

      i once met someone with the same skill lvl of tic-tac-toe as me and every game we played ended in a tie

    • @derpykylekaka
      @derpykylekaka 10 місяців тому +18

      ​@@fireballfilmsi think the average person that has played enough tic tac toe will have the same skill as another average person that has played enough tic tac toe.

  • @KLightning18
    @KLightning18 8 місяців тому +6

    I was in the middle of commenting that the corner was the best move when you pointed it out.
    Here’s why: If O doesn’t play center afterwards, play an adjacent corner to O’s move forcing O to block and giving you an opportunity to make a double. If O plays center, play the opposite corner to move 1. If O plays a corner, play the opposite corner for a double. If O plays edge instead of corner, draw it.

  • @midnightppl9544
    @midnightppl9544 10 місяців тому +913

    Tic-tac-toe is a very simple game to master. But I would love to see more versions where instead of the standard 3x3 format, there are 5x5, 7x7 or more versions, and where the victory conditions are to make a line of 4 pieces in a row or perhaps 5 in larger versions, I tried playing the format 7x7 once and I remember spending hours playing trying to discover the best strategies. It was extremely fun.

    • @kevinjamesmartin4307
      @kevinjamesmartin4307 10 місяців тому +79

      A version where each box is another game of tic-tac-toe, ad infinitum

    • @gurjaapsingh06
      @gurjaapsingh06 10 місяців тому +51

      connect 4, connect 5, connect 6, connect 7, connect 8, etc................

    • @2ndPerk
      @2ndPerk 10 місяців тому +40

      @@kevinjamesmartin4307 Although only 2 layers deep, Ultimate Tic Tac Toe is a great variant.

    • @psychohist
      @psychohist 10 місяців тому +22

      Don't forget 3D and 4D versions.

    • @davidspencer3726
      @davidspencer3726 10 місяців тому +11

      I had a lot of fun playing 4x4x4x4: that's 16 4x4 grids, all related in 4D space. No analysis, just interesting to find all the winning lines!

  • @KirbosPlanet
    @KirbosPlanet 10 місяців тому +363

    i used to play it with a class mate of mine, i started off winning but and then one of us would only win if the other either didn't pay attention or was too engrossed in their own strategy to notice the other's move. (a.k.a stalemate only won if the other slips up) it was still pretty fun.

    • @xSolarPhantomx
      @xSolarPhantomx 10 місяців тому +3

      Me and a classmate in highschool played tic tac toe every day in our science classes. I think by the end we were like 13 wins for me, 11 wins for him and over 5000 stalemates.

    • @NoriMori1992
      @NoriMori1992 10 місяців тому +1

      Once both players know how to play perfectly, they can only ever tie.

    • @nimbleline
      @nimbleline 10 місяців тому

      I misread this as "chess mate" and wondered how a chess friend could possibly fail to draw at tic tac toe

    • @TheBIindReaper
      @TheBIindReaper 10 місяців тому +1

      @@NoriMori1992 yup, Tic-tac-toe is biased in the sense that whoever goes first essentially will either win or draw if played optimally. 2nd Player is always behind and whether they lose or draw comes down to their first move, winning is impossible in optimal play.

  • @mushroomjuise2349
    @mushroomjuise2349 10 місяців тому +722

    i actually remember trying to solve Tic-Tac-Toe on a flight using just pen and paper and I did eventually figure out the optimal moves for the cross and yes the corner is the optimal starting move

    • @NaThingSerious
      @NaThingSerious 10 місяців тому +75

      Same only it was when I was bored in my room and I drew out like over a hundred different games on a few pieces of paper and came up with the strategy to always go in the corner first, and then if you aren’t first go in the middle, and then the rest from there is pretty self explanatory and based on what the other person does, and this way, if both people play perfectly, no one can ever win, and that’s when I decide the game was boring and no fun.

    • @GutkaTheNoob
      @GutkaTheNoob 10 місяців тому +9

      I think the corner and the middle is equally good if your point of the game is that your "enemy" wont win

    • @jamesbridgeman6781
      @jamesbridgeman6781 10 місяців тому +27

      It all depends on your perspective, the corner gives you the best chance of winning but it also gives your opponent a greater chance. If you have the starting move and you chose the center, you will always have control and you can say absolutely that you won't lose the game as long as you apply appropriate strategy. The game will likely end in a tie but you will not lose. Take it from somebody who has never lost a game of tic, tac, toe or X's and O's as we call it.

    • @NaThingSerious
      @NaThingSerious 10 місяців тому +25

      @@jamesbridgeman6781 if you play intelligently you cannot lose from the corner either

    • @jamesbridgeman6781
      @jamesbridgeman6781 10 місяців тому +2

      @@NaThingSerious Very fair point, if you have two optimal players then every game will finish in a tie. My strategy of always picking the center encourages ties but it also reduces my opponents chance of winning. You can always claim that you've never lost a game while picking up the occasional win from playing opponents who adapt a less optimal strategy or playing an opponent who tires from the mundane nature of continuous ties and makes a mistake. Psychology can come into any game that humans play but if two robots were playing with optimal strategy there would never be a single winner.

  • @mqtic
    @mqtic 9 місяців тому +5

    1:47 not me hella excited to actually hear something from my discrete maths course

  • @guillz298
    @guillz298 10 місяців тому +479

    being a musician and majoring in computer engineering I’m really glad I found your channel!

  • @turdy_water7646
    @turdy_water7646 10 місяців тому +66

    I noticed the corner superiority a couple years back and it changed my life. If you know the patterns of how other people usually play its almost impossible to lose. Most of the time its a draw, but out of the remaining times its practically always a win

    • @quentinmcwimberton6797
      @quentinmcwimberton6797 10 місяців тому +6

      Assuming you play optimally and play as X, any corner opening that doesn't get countered by a middle O is a guaranteed win

    • @Winter0192
      @Winter0192 10 місяців тому +3

      It’s not almost impossible. It just is

    • @markus1351
      @markus1351 10 місяців тому

      I prefer middle X opening, as it gives you 2 chances for forks, which are way lese likely to be recognized 2 Turns ahead by the average Joe .

    • @ekki1993
      @ekki1993 10 місяців тому +6

      If both players know how to play optimally, the game is always a draw.

    • @MichaelQ-iv7pt
      @MichaelQ-iv7pt 5 місяців тому

      @@ekki1993 Which means Center turn 1 or turn 2. Making Center the most powerful move. But sure people can keep wanking corner because if the other guy messes up/decides to have fun, you can always win.

  • @uBreeze
    @uBreeze 10 місяців тому +675

    The center is not infact the best choice, the corner is. It makes it entirely impossible for O to ever win.
    EDIT: Damn. Okay. I got 60 seconds later in the video.

    • @lukeseaman2994
      @lukeseaman2994 10 місяців тому +12

      *I guessed correctly

    • @user-tl4bg3ci3g
      @user-tl4bg3ci3g 10 місяців тому +9

      same with the center. it is guarranteed that you will lose only if you go corner-adjacent-edge

    • @Mewmew1-2
      @Mewmew1-2 10 місяців тому +4

      I think if you go second and pick the center you can still tie the game.

    • @goatsfluffy8254
      @goatsfluffy8254 10 місяців тому

      You can still lose with that if the enemy picks the center

    • @i_guess108
      @i_guess108 10 місяців тому +2

      @@lukeseaman2994 as an i guess, i can indeed confirm correctly

  • @CyanZone69
    @CyanZone69 8 місяців тому +1

    Start in the bottom left and if your opponent goes anywhere but the middle, you win
    You still might have a chance if your opponent goes in the middle, if they go in the middle then choose the top right and if they go in either corner, you win

  • @cowboydup
    @cowboydup 10 місяців тому +200

    Thank you for all the work you put into this. Those were 7 of the highest quality minutes ive spent on UA-cam in awhile

    • @basedad
      @basedad 10 місяців тому +1

      I hope the creator of this video sees this because this is true. So niche but so cool. v nice python to boot.

    • @chicagotypewriter2094
      @chicagotypewriter2094 10 місяців тому +3

      Honestly. UA-cam especially shorts has degenerated so much.
      This is a hidden gem; a breath of fresh air

  • @lilwage6910
    @lilwage6910 10 місяців тому +61

    In the 3 draws example (6:26), 2 of the draws were mirrors of each other, so in fact there are 2 games of "perfect" tic-tac-toe, and they're both draws.

    • @Tzizenorec
      @Tzizenorec 10 місяців тому +4

      Things turn out differently if X plays better than perfect by playing as his second move one of the three moves that _don't_ threaten a win.

    • @Player_is_I
      @Player_is_I 10 місяців тому

      ​@@Tzizenorecikr

    • @EEEEEEEE
      @EEEEEEEE 10 місяців тому

      E‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

  • @br_matias_br
    @br_matias_br 10 місяців тому +88

    In my last semester of technical school, for my last for my last assignment of microcontroller classes, my friend and I decided to make a wireless multiplayer version of tic-tac-toe. We ended up making it work (after almost getting screwed by the wireless part and needing some critical help) and our teacher was satisfied, but he said it was a bit of a shame that the game we chose ended up being so simple in terms of strategy and said that he should have suggested rock paper scissors.
    A little while later, after we returned all the components we borrowed, I showed him the RPS25 (rock paper scissors with 22 additional types) matchup chart as a joke and the three of us realized that this game was completely doable, and perhaps even easier to code the communication packets for. He said that he'd assign the smartest student in his next microcontrollers class to make that game.
    I weep for the poor person who had to program 625 different matchups and draw 25 different symbols in a 84x48 pixel screen.

    • @EEEEEEEE
      @EEEEEEEE 10 місяців тому

      ‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎E‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

    • @internet_userr
      @internet_userr 10 місяців тому +1

      Be smart by not being smart

  • @arturgrabowski6350
    @arturgrabowski6350 8 місяців тому +8

    5:15 THE BEST MUSIC EVER

  • @glauberglousger956
    @glauberglousger956 10 місяців тому +189

    As a expert in playing the game, you'll always draw no matter what (if you and the opponent are competent, and have play many games before)
    It's just about who screws up first, or just can't be bothered anymore
    It's kinda funny seeing two people play for dozens of minutes, no one wanting to lose, yet only being able to achieve a draw
    It's more about memorising positions, rather than anything else

    • @torb1trick415
      @torb1trick415 10 місяців тому +6

      if you start in the corner and your opponent doesn’t go in the center you win by default. and it’s really hard to see why.

    • @lildragon0
      @lildragon0 10 місяців тому +8

      If you start in the corner, opponent has to go middle to draw.
      If you start in the middle, opponent has to go corner to draw.
      It's not hard to remember how to force draws.

    • @alfredosojr
      @alfredosojr 10 місяців тому

      which is why i play ultimate tic tac toe instead

    • @turtle_7777
      @turtle_7777 10 місяців тому +3

      An expert???? 😂

    • @tomrejor4842
      @tomrejor4842 10 місяців тому

      Honestly I became an expert at tic tac toe just because I was drawing all boards that made sense to me when I was bored (which really isn't a lot of them as shown in this video but more than just what was shown)
      And this was how I concluded that corner was a better move because it give your opponent more messing up opportunity, while center is basically a guaranted draw if your opponent knows the basics.
      If you knows the basic positions any game is a draw, just have to know which moves are traps that you could fall into

  • @f5673-t1h
    @f5673-t1h 10 місяців тому +79

    Yes, it's really important in group theory in general to specify what you mean by "different", which implicitly means you have to specify what you mean by "same".
    For example, on a clock, 1 and 13 are "the same", even though 1 and 13 are different numbers.

    • @Suswastaken
      @Suswastaken 10 місяців тому +10

      Modulus has entered the chat

  • @ThePoelse
    @ThePoelse 10 місяців тому +92

    There is actually a little mistake when he talks about the corner game. When O plays middle you can play opposite corner and still have a way to win, if O doesn’t play side, and force a defence from x. There may be other winning games that were excluded because of the “make a win next move” rule. But overall a very interesting and thorough video👍

    • @42medwards
      @42medwards 10 місяців тому +9

      That's how I taught my kids. Corner start, Then opposite corner. This gives you a forced win or draw. Now they beat all their friends and other adults that they swindle into playing.

    • @markus1351
      @markus1351 10 місяців тому +4

      ​@@42medwardsSame for middle start.
      If the opponent goes for the edge, you win. If they Go for the corner, Go opposite corner and you get the Same Situation.

    • @redwall1521
      @redwall1521 10 місяців тому +1

      Except during this explanation he also said that the opponent (O) would also move to prevent losing as well. So if they are "smart" like he explains halfway through this video, you'd also realize that the opponent WOULD play a side to prevent that forced win, forcing a draw.
      So no, it's not a mistake.

    • @MyRuger
      @MyRuger 10 місяців тому

      thats dependant on the opponent not defending, there is no mistake.

    • @hillnor6812
      @hillnor6812 10 місяців тому

      Was gonna say this, center first move is instantly defended by playing any corner and then just stoping the 3 in line for opponent and it's a draw. Corner first is defended by playing center and then any side (not corner), from there just stop opponent from doing the 3 line (or complete your own if he doesn't stop it) and it's a draw.
      There are literally 2 games of tic tac toe and they're both draws. Sadly, he missed the best play for X in the video, despite saying "he discarded those that made no sense".

  • @andytruong4757
    @andytruong4757 21 день тому +3

    1:43 The flip is that win supposed to mean? Taking over? or some other lore?

  • @FaneBenMezd
    @FaneBenMezd 10 місяців тому +19

    4:42 Actually, the best squares to start are the corner ones. In a corner square, unless the O player goes to the center, it's a certain win for X, making it 7 ways of wining.

    • @FaneBenMezd
      @FaneBenMezd 10 місяців тому +7

      Yes, I commented before finishing the video 🤦‍♂

    • @JeffDeff-hp3el
      @JeffDeff-hp3el 10 місяців тому +1

      @@FaneBenMezdyou can delete comments I think

    • @FaneBenMezd
      @FaneBenMezd 10 місяців тому +2

      @@JeffDeff-hp3el I know but I don't want to. I own my fails

    • @hith2re
      @hith2re 10 місяців тому +4

      Technically speaking since tic tac toe is a solved game, you cannot make a mistake on the opening move because there is an optimal way to force a draw regardless if the game starts with corner, center or edge.

    • @JeffDeff-hp3el
      @JeffDeff-hp3el 10 місяців тому +1

      @@FaneBenMezd based

  • @plagueCLUTCH
    @plagueCLUTCH 10 місяців тому +182

    You made a whole video coded a program did extensive math and spoke calmly and intellectually the whole time. “Tic tac to is a ducking stupid game.” Made me laugh out loud thank you hahaha

    • @DuckWaddles07
      @DuckWaddles07 10 місяців тому +4

      All that math just to call it a stupid game… gotta respect it

    • @deuge
      @deuge 10 місяців тому +1

      I always despised playing this game, and it's good to have the maths to back it up :P

  • @TheMightyWej
    @TheMightyWej 10 місяців тому +107

    I just found your channel and it feels almost like fate. I am currently modelling solar energy production using python for part of a thesis and I was struck by how random, yet orderly the solar radiation levels striking the planet are throughout the year. I was wondering how I would go about representing this through sound and didn't know where to start, and then this video randomly pops up on my feed. Love the content, and appreciate the effort that has went into the videos.

    • @sofiaatomo5175
      @sofiaatomo5175 10 місяців тому +5

      not you solving your SOLAR RADIATION presentation problem bc of a random youtube tictactoe video, this is so fucking cool

    • @Player_is_I
      @Player_is_I 10 місяців тому +2

      I love ur comment and the reply too

    • @EEEEEEEE
      @EEEEEEEE 10 місяців тому

      E‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

    • @faolan2174
      @faolan2174 10 місяців тому +1

      This concept actually sounds really cool and I kinda want to know more about what you learn from it. (Both the orderliness of solar radiation and experiments with sound).

    • @TheMightyWej
      @TheMightyWej 10 місяців тому

      Will hopefully be able to respond in a few weeks with what I put together, it's exciting not knowing if it will sound awful or terrible 😂@@faolan2174

  • @dripbonesy5012
    @dripbonesy5012 10 місяців тому +6

    Chess: literal billions of different games
    Tic-Tac-Toe:

  • @dougfowler1368
    @dougfowler1368 10 місяців тому +80

    You just explained what I never could verbalize as a kid. I thought ahead and visualized the board easily and it always seemed so repetitive. At least on Hollywood Squares - where at least when I was growing up in the 1970s the contestants did almost always start at the corner square for that reason you stated - someone could get an answer wrong and it would go to the other side. Plus Paul Lynde and some of the others were quite funny.

  • @ryane5281
    @ryane5281 10 місяців тому +27

    The best response to O going middle if you go corner is the opposite corner. It doesn’t threaten anything directly, but it leaves a small chance for a fork on your next turn.

    • @Player_is_I
      @Player_is_I 10 місяців тому

      Ikr

    • @tonymouannes
      @tonymouannes 10 місяців тому +2

      That's the only strategy possible in the game: going for a 3 corner trap. There are other possible traps, but it's impossible to plan for them. It's also impossible for O to plan the 3 corners trap, as it requires X to be very inexperienced.

  • @marcevanstein
    @marcevanstein  10 місяців тому +1050

    I know I should probably do some sort of self-promotion with this pinned comment, but it has come to my attention that someone has mashed up my tic-tac-toe music with War Games, and I thought you all should know: ua-cam.com/video/AoIpWrfsRRE/v-deo.html (P.S. Check the video description for the self-promotion)

    • @GurkenbauerTim
      @GurkenbauerTim 10 місяців тому +20

      Lmao just clicked on the video and found this comment.
      1 min ago

    • @ghostingray
      @ghostingray 10 місяців тому +7

      @@GurkenbauerTimsame

    • @Alexchess99
      @Alexchess99 10 місяців тому +6

      5 mins ago? Really

    • @burnace
      @burnace 10 місяців тому +4

      didnt ask

    • @brianbetts5637
      @brianbetts5637 10 місяців тому +13

      when I was KID I broke tick tack toe down to I put my x in the middle and if you put it in the corner its a tie, if you put it anywhere else I win. Its a 2 game option for me.

  • @voidmarvin
    @voidmarvin 9 місяців тому +1

    The mistake is on 5:10, where O wins, X should have blocked due to the skill>0 code you mentioned but he dumb doesn't do it.

  • @alimoorad5998
    @alimoorad5998 10 місяців тому +45

    Its going to be hard to be successful in UA-cam when a channel like yours only has 36.1k subscribers... Well done! This was really a fun watch and very informative.

  • @JerryJoe9658
    @JerryJoe9658 10 місяців тому +100

    If you play x in the top corner and O plays the only viable move of center than you can actually still create a game that does not end in a draw without O not blocking a one move winner. If you place the X marker in the adjacent corner to the start move you can create a fairly successful gambit. This is hunting for O to take either corner because it will force X to take the remaining corner and generate a 2 pronged attack that cannot be blocked. The move for O is a very typical move as players recognize the importance of placing in corners to win the game. I have found massive success with this strategy.

    • @Tuniwutzi
      @Tuniwutzi 10 місяців тому +16

      I was thinking the same. I think the video does not consider that move because of the first mistake (the one that wasn't on purpose): it only considers moves that set up for a win as soon as possible. Since placing X in the opposite corner doesn't set up for an instant win, it's not being considered as an option.

    • @mcdeezyofficial
      @mcdeezyofficial 10 місяців тому +4

      i was thinking about that strat the whole video

    • @Foodiiee01
      @Foodiiee01 10 місяців тому +5

      If your first move is in a corner, and your second move is in an adjacent corner, with your opponents first move being in the middle, it will still end up as a draw. The opponent’s second move would be to go in between the two corners to not lose, which would then make 2 in a row, forcing you to block it which will end up in a draw no matter what

    • @Tuniwutzi
      @Tuniwutzi 10 місяців тому +1

      @@Foodiiee01 you're right, I was thinking about the opposite corner. I guess "adjacent corner" in the original comment was a misspeak and was meant to say "opposite corner" - otherwise none of the rest of it makes sense.

    • @mcdeezyofficial
      @mcdeezyofficial 10 місяців тому +1

      @@Foodiiee01 the whole point is if they go in a corner you automatically win

  • @blindovermatter3054
    @blindovermatter3054 10 місяців тому +82

    I appreciate you talking about sonification. As somebody who has been a part of a project dedicated to making astronomy accessible through turning data into sound I’m very impressed with your system. Well done!

    • @blockbyblock4078
      @blockbyblock4078 8 місяців тому +1

      That sounds so interesting. Would you elaborate how that would actually work ? I'd love to know a little bit about it.

    • @blindovermatter3054
      @blindovermatter3054 8 місяців тому

      In the specific system we were designing there was a differentiation between pitch, volume and stereo sound location which when played in its entirety would allow you to scan an image with your ears. It was a very interesting concept and I wish we could’ve continued more work with the sonification component, unfortunately funding ran out before it was able to see its full potential but it was an interesting thing to work on, it was through a project called IDATA, a national science foundation funded project working on accessibility for astronomy for people with visual impairments.

  • @linhnd2000
    @linhnd2000 12 днів тому +2

    6:43, the one game where O wins, did you not apply the "block opponent's win" rule to X? X must go into 4 instead of 9 in their last move.

    • @Shardz24
      @Shardz24 9 днів тому

      Then O goes 9 and wins though

  • @Joker22593
    @Joker22593 10 місяців тому +45

    Being a tic-tac-toe nerd, I caught the mistake! That feels good. I'm doing a project right now to figure out the exact surreal number value of the starting position of a tic-tac-toe board, and this is a very helpful video. I knew about the paring down to equivalence classes, but having somebody else generate all the interesting games and put them on screen is very helpful. (I'm mostly just being lazy).

    • @MyUnquenchableThirst
      @MyUnquenchableThirst 10 місяців тому

      will you be sharing this project with us?

    • @peterburtsev3951
      @peterburtsev3951 10 місяців тому

      A tic-tac-toe nerd, you say? Check out gomoku and renju, both games are pretty much "five-in-a-row but balanced"

  • @PokeNebula
    @PokeNebula 10 місяців тому +82

    This type of deep analysis of something ubiquitous that never gets thought about deeply is what i love. Jan misali would love this video.

    • @chicagotypewriter2094
      @chicagotypewriter2094 10 місяців тому

      Who’s that?

    • @PokeNebula
      @PokeNebula 10 місяців тому

      @@chicagotypewriter2094 you can find a similar overanalysis of Hangman, the letter W, or regular polyhedra from that creator. Love videos like these.

    • @thegrandwombat8797
      @thegrandwombat8797 10 місяців тому

      @@chicagotypewriter2094 Another UA-camr who makes videos that are pretty similar to this one. There's one on the game Hangman for instance.

    • @oliviabh.3989
      @oliviabh.3989 10 місяців тому

      @@chicagotypewriter2094 they're another youtuber :) they make mostly cool videos about linguistics and conlangs but also some other things.

  • @peemtielr7863
    @peemtielr7863 10 місяців тому +18

    There are a lot of lines where you set up a "fork" as you called it and therefore don't make a move that directly sets you up for three in a row. At 3:34 for example you could actually go top right to set up a fork with either the middle or the bottom left in your next move (in this case you'd lose though because your opponent gets a "fork" earlier)

  • @bernardoquincke4930
    @bernardoquincke4930 4 місяці тому +1

    if you start in a corner and your opponent in the center there is a posibility to win, if you put in the oposite corner and the opponent in an other corner you will win

  • @arkdotgif
    @arkdotgif 10 місяців тому +438

    you’re assuming alot about my competency

  • @Robbyrool
    @Robbyrool 10 місяців тому +49

    I made a TTT program on the Commodore 64 in Basic back in the 1980s. It used rotational and mirror symmetry to greatly reduce the possible moves it considered. You couldn’t beat it as either player, but sometimes it would beat people because it would sometimes start in the corner and setup a fork. You can’t win at TTT by force, you can only lose. If you don’t make any mistakes you never lose. It is very simple and stupid. I moved on to Chess. Now that is an insanely deep game.

    • @lokajithpremkumar691
      @lokajithpremkumar691 10 місяців тому

      Ok, I know this is dumb considering that chess is basically indefinite to us feeble humans, but doesn't it face the same problems in that if you never make mistakes you never lose?

    • @tonymouannes
      @tonymouannes 10 місяців тому

      ​@@lokajithpremkumar691you can setup complex strategies in chess of 10+ moves. Also chess allows for a lot more choices. Even the best chess players lose sometimes. An experiences tic-tac-toe player never loses.

    • @Robbyrool
      @Robbyrool 10 місяців тому

      @@lokajithpremkumar691 Not a dumb question. That may be the case, but Chess is so deep that I don’t think we can know the answer to that. It’s not a “solved” game. That’s why we have opening “theory”. The moves considered best in different openings change. The “mistakes” can be so subtle, slightly less than perfect, that it can be difficult to pinpoint where things went off the rails. The position can get slowly worse until it is untenable. Even computers, as good as they have become, don’t have it all figured out. Also, much depends on the players, their styles, personalities, histories, etc. A mistake against one player might be a great move against another. I was playing over the board locally last year and someone quickly beat someone using a particular opening. I had next game. He tried the same opening against me and I quickly beat him. So is the opening good or bad/ a mistake? Depends.

  • @NilEoe
    @NilEoe 10 місяців тому +16

    You forgot the G# in the last square at 6:43, but as a computer science / classical musician I’m glad I found this unironically instructive video

  • @NoahMiller-c7n
    @NoahMiller-c7n 7 місяців тому +1

    tbh, if you chose 3 comer cross on first turn it's the easiest win:
    1: x in any corner
    x
    2: 0 responds in center
    x
    0
    3: x then play's in corner opposite
    x
    0
    x
    4: 0 will try to line up for diagonal or straight
    x
    0
    0 x
    or
    x
    0
    0 x
    5: x chooses free corner and 0 is faced to block
    x x
    0
    0 x
    6: after this point x is guaranteed victory, because both ways are game
    X 0 X
    0 X
    0 X
    This is another way to win if x doesn't choose center square. Trust me a lot of people fall for this strat.

  • @SUPERVANS56
    @SUPERVANS56 10 місяців тому +11

    I only ever won at tic tac toe when I figured out through experimenting by myself that the corner was the best move, and played against people who weren't expecting it. It throws some people off the first time for some reason, and you can win a surprising number of times if you do it and also manage to find somebody to play tic tac toe with you.

    • @Buglin_Burger7878
      @Buglin_Burger7878 10 місяців тому +1

      It throws people off because the corner has 3 sides blocked off, so it appears you should have the worst possible odds of winning if you take it at face value and in turn they don't take your as seriously.

  • @KalebC4
    @KalebC4 10 місяців тому +39

    Instantly subscribed at the end of the video.
    I remember in grade 5 our teacher got us to explore the different possible moves in tic-tac-toe and essentially ruined the game by revealing that it is a solved game, nobody wins.

  • @8Ryosuke8
    @8Ryosuke8 10 місяців тому +31

    "If this kind of obscure nonsense is your cup of tea, congratulations! You're the intended audience for this channel."
    I'm not your targeted audience. But I approuve of what you do and am happy someone like you exist on the platform. Keep being awesome and enjoy what you create!

  • @frostijjj
    @frostijjj 10 місяців тому +2

    I played 16 games of Tic-Tac-Toe against a friend in class and won 8 of them, I then explained the reasonable ways a game can proceed all based off findings I made in a class when I was 7-8, pretty entertaining classes

  • @LazyMonkey24
    @LazyMonkey24 10 місяців тому +11

    Of the 3 games 2 are mirror images of each other that weren’t properly removed by your code. This is also where the optimization works against you because the best move is actually the opposite corner, it will require your opponent to actually think which they definitely don’t want to do during a game of tic tac toe and gives you a chance at winning by not letting them mindlessly block you.

  • @andrewaldrich3602
    @andrewaldrich3602 10 місяців тому +21

    Just found this channel, this is super cool. I write c# code for a living and dabble in python in my free time, but I also grew up with all kinds of musical instruments as my dad was a k12 band director. I feel like this content was tailor made for me. Definitely subscribing.

  • @edene5493
    @edene5493 10 місяців тому +19

    I personally prefer corner start as X but center start is generally more solid- It's just that less people know corner start and that somehow has made me win a lot of tic tac toe games

    • @tonymouannes
      @tonymouannes 10 місяців тому

      Corner start looks more solid, but it isn't. If you start in the corner, you might have to play defensively for the rest of the game. By starting in the corner you can play offensively and O will lose if they don't play very specific moves. Starting in the middle is more likely to end in a draw. Because players tend to favor the corner over the side and with a middle start you want O to go to the side to win. With X in the corner, O will lose if they go in a corner i their first 2 moves (O needs to go center and then side or it's game over).

    • @Guy_With_A_Laser
      @Guy_With_A_Laser 10 місяців тому +2

      No, the corner start is actually just better. You win by force if your opponent does not play in the middle, and even if they do there is a chance to win.

    • @edene5493
      @edene5493 10 місяців тому +1

      I know how to play to win or draw any position that it is possible to respective, tic tac toe has very limited game states. I’m just saying as x it’s easier to confuse o with corner start

  • @HTGamePlayers
    @HTGamePlayers 5 місяців тому +2

    3:34 if O plays top right and the X plays bottom middle you can place your next O bottom left and get a double option. A froced loss for X

  • @Irfanhill
    @Irfanhill 10 місяців тому +12

    I live how you did all this hassle to conclude what we all knew already about Tic Tac Toe. It is a beautiful demonstration.

    • @thebrenizers
      @thebrenizers 10 місяців тому +1

      I was about to say that this video is great but you should never open in the center ... but thankfully watched the rest of the video first.

  • @hamzeh.yaacoub
    @hamzeh.yaacoub 10 місяців тому +818

    He is literally gaslighting maths

    • @Klingklangklong
      @Klingklangklong 5 місяців тому

      Math*

    • @YllidTheLoonyDog
      @YllidTheLoonyDog 5 місяців тому +21

      @@Klingklangklong No

    • @Testluminous
      @Testluminous 5 місяців тому +14

      @@KlingklangklongEngland say maths America says math

    • @Snoigel
      @Snoigel 5 місяців тому +1

      @@TestluminousCorrect. math*

    • @randomchicken0939
      @randomchicken0939 5 місяців тому +11

      Mathematics. There’s an ‘s’
      *maths

  • @Mac_Omegaly
    @Mac_Omegaly 10 місяців тому +48

    Oh man. I'm so glad you're exposing the simplicity of the game this way.
    I wrote these things down and observed this back in highschool, thinking it would be much more complicated, but it didn't take long at all to write down all possible games, and see there's a way to always win the game.
    Then i did the same thing with Connect 4, which took up a bit more space, but also gave the same result. The first person to play can always win these games.

    • @FM-96
      @FM-96 10 місяців тому +6

      Perfect play in Tic-Tac-Toe always results in a win or a tie, for both players. The first player can't win if the second makes no mistakes.

    • @SOTP.
      @SOTP. 10 місяців тому +1

      @@FM-96and so the 2nd player also cant win even they play perfectly against a perfect 1st player

    • @FM-96
      @FM-96 10 місяців тому +2

      @@SOTP.
      Yeah. I don't know about Connect 4, but at least in Tic-Tac-Toe neither player can win against a perfect opponent.

    • @ragegaze3482
      @ragegaze3482 9 місяців тому

      @@FM-96Connect 4 is Solved and the first player always wins if played perfectly.

    • @soonahero
      @soonahero 5 місяців тому

      You wrote down bc all 326880 games?

  • @Ghost2024-vs8pt
    @Ghost2024-vs8pt Місяць тому +1

    I can't decide whether this is s math lesson, a musical or a game explanation
    But I like it

  • @eziomadhav
    @eziomadhav 10 місяців тому +15

    WOW! This is a freak'n incredible channel. You've got all the ingredients- KNOWLEDGE, HUMOUR, MUSIC, CODING, MATHS!
    You've got a subscriber. I'm sure you'll cross a million in no time. Will be tracking your growth from now on.

  • @yecksd
    @yecksd 10 місяців тому +8

    2:19 the nuanced textwall jumpscare was so funny lol

  • @jdyerjdyer
    @jdyerjdyer 10 місяців тому +9

    Thanks for doing this video! I did a similar analysis when I was around 10 or 12 years old (early 90s) and came up with the same 64 games if the computer plays the optimal move organizing as you did the corner, edge, and center using mirroring and rotation. I looked at it as you are forcing the limitations through your choice so instead of 9! you get 1 * 3 * 1 * 3 * 1 * 3 * 1 * 3 * 1 = 81 where the 1s are you picking your best move and the 3s are the opponent picking from corner, edge, and center, but that is reduced further by games ending early or options not being available in certain branches. To start my analysis I turned the first 1 into a three as I didn't know which (corner, edge, or center) would be the best at the time, but even doing this, it brought the number of possible games down to a manageable number (243) as at the time I was limited to doing my analysis on paper. Quite a few pages in I had the full list of games always forcing a win or a tie (after eliminating the choices that led to a forced loss) and that gave me the 64 unique games when playing optimally.
    I postulate that a similar analysis could be done for chess, but that it might not result in a finite set of all wins and draws. In fact, many games would likely end up in a draw from looping moves. The problem with chess is with how the number of games grows exponentially from the vast number of possible moves from each state, and while some reduction is possible in the analysis, it is still a large enough set that a "winning" (defined as winning or forcing a draw) map of moves is not possible in a reasonable time or memory space requirement. Even so, the current chess ai abilities are very impressive just from looking a handful of moves ahead using various point systems and other rules.

  • @IyadBekioua
    @IyadBekioua 9 місяців тому +1

    actually this works to calculate the possible endings of a tic-tac-toe game but not all the states a board of tic-tac-toe can go through during a game you just raise 3 to the 9 and find they are 19,680

  • @ericyang8474
    @ericyang8474 10 місяців тому +10

    As X starting in the corner, the best chance to beat the game when O is in the middle is to place the second X on the diagonal corner to your starting move. Impulsive players who don't know the fully solved moves often choose one of the two remaining corners. You then finish the game by placing your third X in the final corner, recreating the two way fork and winning the draw. Even still, you can create the illusion that the board is different by starting the X on the bottom corners vs the top, since most players will either start in the center spot or top corners.

  • @themightykoopatrol2001
    @themightykoopatrol2001 10 місяців тому +5

    I cannot believe this channel explained this simple of a topic in a fully fleshed out and enjoyable way.

  • @Funhaus_Fr34k
    @Funhaus_Fr34k 10 місяців тому +12

    6:19 it is clear to me, based on your data at 6:10 that edge is actually the optimal starting choice for player 2, having 9 wins with edge, but only 1 win with middle

    • @justanotherweirdo11
      @justanotherweirdo11 10 місяців тому +5

      No, that data represents the result of the game based on what player 1's starting move is. It doesn't talk about player 2's starting move.

  • @samratjorjis7818
    @samratjorjis7818 3 місяці тому +1

    cant believe there are still some genius youtube channel like this

  • @Drosba
    @Drosba 10 місяців тому +8

    5:04 As someone who is studying the same PhD, you have made an atonal piece based on some numbers with no intentions of making an enjoyable piece to hear and just a contemporary deformed mutant of what used to be a beautiful art. So yes, I can tell you finished the PhD, and with a very happy professor, probably.

  • @kormagogthedestroyer
    @kormagogthedestroyer 10 місяців тому +18

    There are not only 3 possible games if X and O play optimally moves 1 & 2, there are actually 6, one of which is a win for X.
    X corner, O middle, X opposite corner to move 1, O corner (either remaining one), X final corner setting up a fork to win the game.

    • @kikania
      @kikania 10 місяців тому +7

      O corner is obviously not an optimal move if it loses the game

    • @JokingJames2
      @JokingJames2 10 місяців тому +1

      ​​@@kikania By having X in opposite corners and O in the center, O has already lost. Technically this makes O playing in center after X plays corner the suboptimal move.
      Edit: I was wrong, as a few replies have pointed out O must play in the center after X plays in corner to not lose.

    • @kikania
      @kikania 10 місяців тому

      @@JokingJames2 any edge move after that scenario results in a draw, its just the corner move that loses for O

    • @SavAria0
      @SavAria0 10 місяців тому

      @@JokingJames2 No sadly, After X in the corner, O in the center is in fact the ONLY move that isn't a forced win for X. After X in opposite corners and O in the center, if O places on any edge the game is a draw.

    • @SavAria0
      @SavAria0 10 місяців тому

      I don't remember when I did the proof for this but you can try it yourself since there are technically only 4 branching paths after X corner O not middle.

  • @myria2834
    @myria2834 10 місяців тому +10

    I did this same thing on paper as a kid, after losing every single game I had played. After seeing that player 1 literally has to throw the game for player 2 to ever win, I was more than a little mad.

    • @Tzizenorec
      @Tzizenorec 10 місяців тому +1

      That's why you take turns being player 1!

  • @EthanOhlendorf-ml2ny
    @EthanOhlendorf-ml2ny Місяць тому +1

    Never expected a psychology lesson from a music channel making commentary on Tic-Tac-Toe

  • @nifty235
    @nifty235 10 місяців тому +13

    Haven't thought this through enough but I think there's another error (over simpliication) in assuming to always go for a 3 in a row, instead of setting up for a win in a move after.
    For example a classic winning sequence can be X at a corner, O in the middle, then X in the opposite corner. If this is followed by O in one of the remaining corners, then X will win. However this hypothetical isn't shown due to the rule of always going for an immediate 3 in a row, which neglects the possibility for a win one step later.

    • @calvinjohnson6242
      @calvinjohnson6242 10 місяців тому +3

      That was my first thought. Pruning those “dumb moves” was a huge mistake in this video.
      Against a new player, the center is the best spot. You have a 50% chance at winning and no chance at losing.
      Against a better player, the trick you’re referring to is very useful. Corner is absolutely the best choice.
      But if you really want to win against an experienced player, I’d go on the side. Though you risk a forced loss, experienced players will have no idea what those algorithms are. If they screw up bad enough, you might pull a victory where you couldn’t otherwise.

    • @andrewpinedo1883
      @andrewpinedo1883 10 місяців тому +1

      That is pointed out as a mistake between 3:43 and 3:44

    • @calvinjohnson6242
      @calvinjohnson6242 10 місяців тому

      @@andrewpinedo1883 Oh yeah, I know. But it kind of wrecks the point of the video.

    • @andrewpinedo1883
      @andrewpinedo1883 10 місяців тому

      @@calvinjohnson6242 Yeah.

  • @Phox-in-a-Box
    @Phox-in-a-Box 10 місяців тому +17

    You really don't need python code to narrow down 255,168 to 31,896.
    If you just divide the 255,168 by 4 to account for the four rotational positions, and then divide _that_ by 2 to account for the mirrored versions (or just divide by 8), you still get 31,896.

    • @eyflfla
      @eyflfla 10 місяців тому +7

      Yeah, but he still needed the python code to then pare it down even further.

    • @Phox-in-a-Box
      @Phox-in-a-Box 10 місяців тому

      @@eyflfla True. I just think that's a weird place to mention it.

    • @marcevanstein
      @marcevanstein  10 місяців тому +2

      Wow, umm, good point. :-)

  • @stevenspencer306
    @stevenspencer306 10 місяців тому +12

    When I was a bored teenager, I figured out the 64 games of tic-tac-toe and realized that the corner was the best start, as you're most likely to force a winning branch. I'm pretty sure I also had a strategy where as X you never lose, and as O you're going to end up in one of the 3 games you mentioned. Basically the 2 "O wins" games aren't reachable with competent players. Similarly, with center start when O wins, it's because O took the corner, but if X had perfect play (instead of going for a greedy win and instead forcing a branch) it would have ended in one of the three ties for a "corner start, O takes middle" game, but pieces inverted.

    • @DegenerateAssassin
      @DegenerateAssassin 10 місяців тому

      Damn... You must've been board out of your mind to actually calculate all that 💀.
      what year was this?

    • @stevenspencer306
      @stevenspencer306 10 місяців тому

      @@DegenerateAssassin late 90s I was on a family road trip. Not much to do in a car back then.

  • @jademonass2954
    @jademonass2954 7 місяців тому +1

    as someone that always plays in a corner on the first move, this is very interesting

  • @tromsodocs
    @tromsodocs 10 місяців тому +18

    This is a great video. An obscure topic that I never would have thought of myself presented in a way that allowed me to find it fascinating, and feel like I've learned something. Nice!

  • @Mr_Pastries
    @Mr_Pastries 10 місяців тому +7

    If you extend the logic used at 4:10 and say that the actual end state of the board doesn’t matter because the outcome is the same, then there is really only 1 game of Tic-Tac-Toe between ideal players and that is a draw.

  • @doughy_fresh
    @doughy_fresh 10 місяців тому +7

    My preferred opening as X is center, then diagonally opposite whichever corner O plays (O on an edge is a losing move). O not having to block on their second move can tempt them to play an edge adjacent to their previous corner - X can then block and set up two ways of winning on turn 4.

    • @markus1351
      @markus1351 10 місяців тому

      Yeah and If they Pick Edge for the first, they loose.

  • @rasati
    @rasati 10 місяців тому +6

    6:16 well actually wrong here, if x plays in the corner and o plays in the center, x can still win by playing in the opposite corner but your code didnt account for flank plays like that, now if o plays in a corner they lose, but they can still draw by playing in an edge

  • @GhostyPep
    @GhostyPep 10 місяців тому +10

    0:25 is how I found out what factorial means.

  • @tobiaslenehan
    @tobiaslenehan 10 місяців тому +8

    For the game at 6:17 X can force a win. X plays the opposite corner. If O then plays another corner, Block then its a fork. There is some strategic play that you have excluded in your code that involves moves that dont aim to create lines directly. Apart from that you've put in great effort and it was a good video. Good job.

    • @yesthatshouldwork
      @yesthatshouldwork 10 місяців тому +2

      No, O could play a side spot if X plays the opposite corner. Then X can't set up their double threat because they need to respond to O's single threat, and the game will end in a draw with perfect play.

  • @Anonymous_31036
    @Anonymous_31036 Місяць тому +1

    The game of chess was born in India during the Gupta dynasty in the 6th century.

  • @stanky5187
    @stanky5187 10 місяців тому +7

    3:04 err i gotta say though when i was first introduced to the game I didn't block bc I was too focused on myself winning and didn't see it (when I was like 3 or 5)

  • @santiagosalazar6545
    @santiagosalazar6545 10 місяців тому +10

    In my experience not listening to my Institue classes and studying the variables of Tic-Tac-Toe i believe the 3 games different games, finding the optimal move in this game is so easy that playing bad isn't that realistic. Very good video I enjoyed it, and the final question about what different can mean was pretty top. Keep it up. 💪💪

    • @SaySaeqo
      @SaySaeqo 10 місяців тому

      Can you write down what three are you talking about? I think there is at least 5. 1 for every starting move (center, edge, corner) and 2 more for opponent chosing or not to play middle in 2nd move. I think you can still draw if you do not choose to play middle in 2nd move but then it is more difficult

    • @santiagosalazar6545
      @santiagosalazar6545 10 місяців тому

      @@SaySaeqo If u play the optimal move you wont start in the edge, its pretty bad and doesnt give u any chances to win, and also if you play corner and the 2nd decides not to play middle you instantly win

    • @SaySaeqo
      @SaySaeqo 10 місяців тому

      @@santiagosalazar6545 You are horrible wrong and I can give you reasoning behind it.
      After playing middle first your opponent has 2 options (due to rotation symmetry of the board) - edge or side - that mean 50% of losing or winning. Every next move is simple instant fork or blocking simple 2 in row or doesnt really matter what you choose.
      After playing corner or side there are approximetely - 2 drawing and 3 losing moves or for side - 3 drawing and 2 losing moves. With that only being a case corner have the most chance for win. But there is also something else what makes even side better than middle.
      Side first has at least 2 (not symmetrically identical) methods to fork when 2nd move wasn't center (the same applies to corner first strategy). Forks are more difficult to spot that simply block 2 in row.
      Last but not least, center first doesn't allow you to play mind games with your opponent. If they do not play corner in 2nd move he/she just lose - always if you are enouch skilled. Playing center in most cases is considered safe move that mean you can say someone who plays it but do not have to is scared of you, is scared of losing. Good players would rather flex their capabilities by playing much of most difficult choices to eventually draw and confuse these around. Then sometimes, some of them, may not be skilled as much as he/she thought. It like saying that I am so good that i cannot lose but when someone is always playing center - he/she is good enough to not lose.

    • @santiagosalazar6545
      @santiagosalazar6545 10 місяців тому

      @@SaySaeqo I think you and I have different views about the game, I'm thinking about winning and about perfect and optimals moves. But if you want to look the chances lets look at it.
      1st move center has 50% chances of winning depending if the second is edge (win) or corner (automaticall draw). 1st move in the edge has 62'5% chances of winning depending on the second move. In this case center and adjadcent corners are draws and the rest is instant win. 1st move in corner is only blockable by center in the second move, the rest is instant win. And actually you have chances to win if you place the third move in the oposite corner.
      Edge is the worst move possible. You have more chances to win than center but center always draws if it doesn't win. And talking about numbers you can lose playing first in the edge. You can lose playing first in tictactoe. The optimal move is corner at first and oposite corner when second move is center, this has 1/3 of winning. Edge is just worse on every scenario, placing corner in second move loses to every other move. And yet I don't see the game as a game where you can use mind games. Unless your opponent is an 8 years old. And I don't believe there are good or bad players, if you just think for 5 minutes focused on it you cannot lose any game.
      So I don't believe edge at first is good, corner is just better and there are maths to see it. And also, basing your thoughts about such simple game on a move being "difficult to spot" is trully horrible.

    • @SaySaeqo
      @SaySaeqo 10 місяців тому

      @@santiagosalazar6545
      1. If your opponent plays corner first you can response opposite corner in 2nd move and it is still a draw.
      2. If you mean optimal moves from perspective of average player I agree center is the best. Of course if i correctly assumed that optimal means average best move - it is best in most scenarios after all, "cosidered safe move" as i wrote before. On my defense i would say I was thinking about my own perspective - person who knows avery possible non losing output for this game.
      3. Because of last I don't understand why corner is worst. If you want to teach 8 years old how to win by telling as less as possible I agree center is the best shot - it is optimal in most cases. But if not - then chances are by side of corner first-playstyle.
      4. Of course i am telling about game of 8-years olds. Last time I was playing I was 8yo and nobody with mind of 9yo would never play it, it is so stupidly simple game to play. But still I would never play center unless it is only move - just because what you said - it is most optimal - also it is so easy even for 8yo to assume it is most optimal that everyone in my 8yo class knew playing it end in draw so it was forbidden to make games even a little more exitinig - it wasnt a real rule but rather a pact thats why i called it mind game.

  • @foobars3816
    @foobars3816 10 місяців тому +4

    @3:30 "Who in their right mind would play here or here?". Well if you play top right against a bad player and thus they don't put their X in the middle (winning the game) and instead choose bottom middle. You can then block and set up the win by placing a circle in the middle. This is really one of the few ways to win as the player going second, which you should probably always avoid.

    • @foobars3816
      @foobars3816 10 місяців тому

      6:34 Instant like on this video when you said that :D

  • @diamondsnowwolves1489
    @diamondsnowwolves1489 10 місяців тому +1

    I was trying to explain this to my friends last year. Now I finally can just show them a video

  • @tetraploid5000
    @tetraploid5000 10 місяців тому +12

    4:36 How did you know.

  • @ors6544
    @ors6544 10 місяців тому +9

    4:19 in that matter there is only three games. Win, Loose or tie.

    • @Nanuak_
      @Nanuak_ 10 місяців тому +2

      Losing for one player is winning for the other, and vice versa. So by that means, there are only two games, a game that gets a line of three matching symbols or a game that doesn't, i.e. Outcome 1: A win/a loss, and Outcome 2: A tie

  • @spressi
    @spressi 10 місяців тому +6

    Great video! I have a tiny remark (which you kind of already pick up upon when talking about there only being 3 games of Tic-Tac-Toe):
    6:06 The percentages here may only be interpreted as probabilities if each response of player 2 has equal probability. However, player 2 should try to create the one scenario in which they can win, ruling out many of the possibilities that contribute to the 48.1%. In other words, if you assume that player 1 chooses according to the number of options remaining to win, you should expect player 2 to do the same.

  • @valeriaa_gg
    @valeriaa_gg 6 місяців тому

    Correct me if I'm wrong, but I don't see why in the game where O wins ( 5:10 ) X would play C1. It leaves the door open for O to create a fork in the next move. A smart X player would play A3 instead, basically eliminating the chance of O going for a fork.... Please do let me know if I'm missing something 😅