Arbitrary Recursion TicTacToe

Sdílet
Vložit
  • čas přidán 1. 05. 2024

Komentáře • 216

  • @iwersonsch5131
    @iwersonsch5131 Před měsícem +111

    One thing that's good about recursive tic tac toe is that you can score tiebreakers by counting the smaller boxes

  • @plapaollapapfkjfus
    @plapaollapapfkjfus Před měsícem +450

    You sound like someones whos name is Jeremy

  • @anthonycannet1305
    @anthonycannet1305 Před měsícem +174

    Depth 2 is just strategic tic tack toe which is playable on cool math games. Although it’s cool that you made it go deeper than that

  • @Nyhilo
    @Nyhilo Před měsícem +111

    Broooo I've been wanting to code this exact thing forever, but never got around to it. Massive respect.

  • @enderwiggins8977
    @enderwiggins8977 Před měsícem +68

    In the high school i went to, there was this one class that was a breeze, so my friend and I played one game of depth 3 over the course of 3 months. The strategy was insane.

  • @user-uo1yn4se8r
    @user-uo1yn4se8r Před měsícem +62

    i've played recursion tic tac toe before, the strategy is very deep. i can't even imagine playing level 3 recursion...

    • @matt92hun
      @matt92hun Před měsícem

      Wouldn't all ties still result in a tie?

    • @BryanLu0
      @BryanLu0 Před měsícem +11

      ​@@matt92hunRecursion tic tac toe is not necessarily a tie game just because regular tic tac toe is a tie game, because there's the strategy of forcing which grid the other player plays in

    • @matt92hun
      @matt92hun Před měsícem +1

      @@BryanLu0 Oh, so the same player can come twice in a row on the same grid?

    • @BryanLu0
      @BryanLu0 Před měsícem +6

      @@matt92hun Yes, e.g. If X plays in the bottom left of any grid, then O has to play in the bottom left grid, if X then plays in the bottom left again, O is back in the same grid again, even though X didn't play in that grid

    • @matt92hun
      @matt92hun Před měsícem +1

      @@BryanLu0 That sounds cool, I'll give it a try. Thanks.

  • @directrix777shinyshinyamyt4
    @directrix777shinyshinyamyt4 Před měsícem +32

    I came up with Depth 2 on my own as well! Going even deeper has to be WILD!!

  • @Moonlite_Kitsune
    @Moonlite_Kitsune Před měsícem +4

    All we need now is a way to zoom in and pan the board so its playable by humans

  • @luketurner314
    @luketurner314 Před 28 dny +3

    Some pro tips:
    1. On most CLIs (command line interfaces), you can press the up arrow key to cycle through your command history
    2. In Python, there is a module you can use to parse command line arguments, called "argparse". With which you could do something like "python3 frontend․py -d 2" and prompt for the depth if it is not specified as a command line argument
    3. On Windows 10 (and I'm guessing also 11) there is a way to be able to run python scripts without having to type python3 first: "PS C:\current\working\directory> frontend․py". I believe it involves a couple of Registry edits, but it's been a while and I don't remember exactly
    Interesting concept. Initially from the thumbnail and the beginning of the video, I thought the grid was going to automatically zoom out and expand as you play and resolve each layer (without exiting and relaunching), but I guess that would be infinite or progressive recursion not arbitrary recursion

  • @colevilleproductions
    @colevilleproductions Před měsícem +3

    I have looked everywhere for the answer to how ultimate x2 tic tac toe goes and got an extremely easy answer from just watching you play a couple moves, that being that no matter where you play at what level, there is always a 3x3 playable space corresponding to that spot

  • @MetaTheoretical
    @MetaTheoretical  Před měsícem +10

    GitHub: github.com/LedrProjects/Recursive-Tic-Tac-Toe/tree/main

  • @gallium-gonzollium
    @gallium-gonzollium Před měsícem +48

    I wonder how high you can put that depth value before the whole system goes kaput 😂

    • @MetaTheoretical
      @MetaTheoretical  Před měsícem +30

      5 crahes for me after a bit haha!

    • @legendgames128
      @legendgames128 Před měsícem +8

      @@MetaTheoretical Super computers might not even be able to get past 10 due to the way exponential growth works.

    • @deleteddeleted1940
      @deleteddeleted1940 Před měsícem

      @@legendgames128 3^10=59049 is fine, it's only 59049*59049=3486784401 squares which is only 3486 megabytes, assuming 1 square is 1 byte

    • @CrushedAsian255
      @CrushedAsian255 Před měsícem +11

      @@legendgames128 that would only be around a few billion squares i think, so should be possible with good code (9^10 = 3.6 billion)

    • @ArbitraryCodeExecution
      @ArbitraryCodeExecution Před měsícem +1

      ​@@legendgames128what

  • @bagusnaga01
    @bagusnaga01 Před 25 dny +3

    this is called loose the battle win the war.

  • @noahchristensen3718
    @noahchristensen3718 Před měsícem +2

    I learned the first recursive step of this game as Tic Tac Toe Fury, and I think the better version of the rules stipulates that 1) you can play in won squares, but cannot win them again, and 2) the only free (play anywhere) moves are the first one, and (possibly) when you get sent to a full square. Note that it is not full when it is won, but only after all 9 small squares are used up.

  • @NCXDKG
    @NCXDKG Před měsícem +2

    You did it, you made tic tac toe 2

  • @alzblb1417
    @alzblb1417 Před měsícem +1

    Make infinitely wide chess. The pieces repeat left and right. Checkmate ANY king to win. You only need to store the interacted squares (notation sequence of moves).

  • @ShadowKestrel
    @ShadowKestrel Před měsícem +1

    now i want to see just how optimised i can make something like this. Definitely the base game can be super fast but implementing an automated player that runs fast on a potato would be a fun challenge

  • @TheIlike2playminecra
    @TheIlike2playminecra Před měsícem +2

    I would strongly reccommend upping your mic gain or doing some processing on your audio during the editing process. Had to turn my computer to nearly max volume just to hear what you said.
    If this were released as a game, I'd recommend that a tie game use a different tone of shading from the shading used to highlight which board to play on next, as it could be confusing to the players, but as a proof of concept it's a really solid demo!

  • @shakhafire9427
    @shakhafire9427 Před měsícem +6

    Thanks youtube for such kind of videos. Like the way you have done it. I made recursive tictactoe with depth of 2, but without gui, only console version

  • @dimitri0404
    @dimitri0404 Před měsícem +4

    Is this what tic tac toe would look like if it was made by christopher nolan?
    The video is only missing the inception theme.

  • @--REDACTED--
    @--REDACTED-- Před měsícem +1

    Seems we had a similar idea - I implemented pretty much the same thing for my A-Level coursework, but in Rust using Raylib, and with some other features like an AI (sorta) opponent, importing/exporting games, other pieces, and a needlessly dynamic window title. I like the simplicity of yours, and also how readable your move checking code is (mine is an absolute nightmare)

    • @MetaTheoretical
      @MetaTheoretical  Před měsícem +1

      oh cool! any level depth or just depth 2?

    • @--REDACTED--
      @--REDACTED-- Před měsícem

      Any depth as well - seems great minds think alike! I would link the project on github but youtube seems to disagree with me posting links

    • @MetaTheoretical
      @MetaTheoretical  Před měsícem

      @@--REDACTED-- I’m interested! could you add me on discord by the username “xyzwvut” and send it there?

  • @apia46
    @apia46 Před měsícem +5

    your keyboard sounds nice

  • @lmfao6125
    @lmfao6125 Před měsícem +1

    thats really cool! me and my friend came up with depth 3 tic tac toe a few weeks ago and i was thinking of coding it, but no idea how to start. this is great, well done!

  • @henryhart6551
    @henryhart6551 Před měsícem +12

    Does an n-depth TicTacToe have a winning strategy? (That can be found before the universe ends…) Anyway nice elegant concept.

    • @MetaTheoretical
      @MetaTheoretical  Před měsícem +5

      Not that I know of. I might make a follow up discussing strategies for higher order tic tac toe. Thanks!

    • @geekjokes8458
      @geekjokes8458 Před měsícem

      is there even a strategy for depth 2?

    • @Donu_tLover
      @Donu_tLover Před 19 dny

      @@geekjokes8458try luring your opponent away from a aplace they can win, and look ahead of the game. Not a 100% win strategy, but it will help.

  • @sebbes333
    @sebbes333 Před měsícem +4

    *@Colorize*
    1:43 You should add a 3'rd marking, for Draws, so if you play "badly enough" the DRAW might win (i guess both players lose?)
    (I think the Draw symbol should be a green triangle, but maybe not?)

  • @aloresdecat2573
    @aloresdecat2573 Před měsícem +3

    Mr. Lambda, you have my respect, sub, AND like. Keep up the good work!

  • @--REDACTED--
    @--REDACTED-- Před měsícem +2

    The background is strangely hypnotising

  • @EMEKC
    @EMEKC Před měsícem +2

    Awesome! Small heads up though: you can press up arrow in most terminals to get back the last command you typed in, so you don't have to retype it each time :)

  • @nbboxhead3866
    @nbboxhead3866 Před měsícem +5

    Ah, recursion; my favourite confusion-causing technique. It has some pretty good applications, too. There's exciting stuff like fractals for CGI and then there's slightly less exciting stuff that still has applications like equation evaluation. I mention equation evaluation because of sites like Desmos that can graph functions with heavily nested inputs just fine, and I've found that it uses recursion a good bit when I looked into how to implement it.
    Anyway, nice program! The fact you managed to pull this off tells me you can work with abstract concepts pretty well when coding. I imagine the bugfixing for this must've been... harrowing, to say the least.

    • @MetaTheoretical
      @MetaTheoretical  Před měsícem +3

      Bugfixing was hours of painfully testing cases and wrap my mind around the programs structure

    • @MetaTheoretical
      @MetaTheoretical  Před měsícem +2

      I might make some more recursion videos if i get ideas

  • @tarastaras6604
    @tarastaras6604 Před měsícem +2

    this thing is very cool man
    keep doing stuff, i like it

  • @bincho8616
    @bincho8616 Před měsícem +1

    I also made this exact thing like 2 days ago, but i didn't bother fixing the code to work for depth>3 (nobody actually plays anything over depth=2 becasu of the exponentional growth in time spent playing)
    And it's wild to me that the youtube algorythm somehow found and showed me this video.
    Great job btw

  • @julianemery718
    @julianemery718 Před měsícem +1

    So it seems recursive Naughts and Crosses is crazy enough so a board game with more than a 3x3 grid of squares would be crazy.
    I mean, imagine recursive chess, that game is long enough on a single layer, it would take a lifetime to complete if it was even 2 layers deep

  • @mozvi1436
    @mozvi1436 Před měsícem +1

    Hey that looks like the tictactoe vsauce made a short on ! That's really cool! Did you get inspired or is it just a coincidence?

  • @andrewpinedo1883
    @andrewpinedo1883 Před 27 dny

    Interesting coincidence. I was also just thinking about 3-tac-toe, and devised the exact same ruleset.

  • @aloresdecat2573
    @aloresdecat2573 Před měsícem +3

    thanks for the tutorial!

  • @peaktheweak
    @peaktheweak Před měsícem +1

    yo this is actually sick

  • @i_cam
    @i_cam Před měsícem +1

    didn't have time to watch the whole vid so you might have said it, but do you have a download or a github repo where we can check this out? would love to try and play a couple games

  • @Cool_Bungle
    @Cool_Bungle Před měsícem

    Criminally underrated.

  • @vladloukine2813
    @vladloukine2813 Před měsícem +1

    I used to play Mega Tic Tac Toe (Depth 2) with my friends, but after deciding that was repetitive, I invented GIGA TIC TAC TOE (depth 3)

    • @Donu_tLover
      @Donu_tLover Před 19 dny

      maybe depth 4 is TERA tic-tac-toe

    • @vladloukine2813
      @vladloukine2813 Před 19 dny

      @@Donu_tLover I made tera tic tac toe but nobody wanted to play that

  • @TheGovernment-wz1oy
    @TheGovernment-wz1oy Před 2 dny

    Where did you get your desktop background it’s so nice

  • @donit.
    @donit. Před měsícem +2

    I like the mechanic how you can influence what area the next move will be with your move. Is there a specific reason you implemented it, like did the game not work if players can always tic any box?

    • @MetaTheoretical
      @MetaTheoretical  Před měsícem +1

      Its just the agreed upon rules for the game i didnt invent the rules

  • @terabyte6903
    @terabyte6903 Před 25 dny +1

    firefox? nah. bro got ICEFOX

  • @Carpalhat
    @Carpalhat Před měsícem +1

    I like your video, good job. This is cool, I'm trying to learn python but I need to be mkre consistent.
    You have my sub

  • @foreverleveling
    @foreverleveling Před měsícem

    Interesting concept, I've never sat down to play with this kind of ideas. Thanks for sharing the repository to take a look at it. Something else that catches my curiosity, could you share with me your animated wallpaper, It gives me a retro arcade room vibe. I'll send you my best regards.

  • @Lorem_the_Ipsum
    @Lorem_the_Ipsum Před měsícem

    Ah, i know an enjoyer of mechanical keyboards when i hear it.

  • @Nen_niN
    @Nen_niN Před měsícem

    I remember I played a game on steam called Ultimate Tic-Tac-Toe several years ago, which had this level recursion mechanic. I don't think it went beyond depth 1 though.

  • @minhuang8848
    @minhuang8848 Před měsícem

    definitely needs iterative animations, maybe log-ramping it as it goes on. Drawing each stroke, too. Fun little idea though

  • @amazingbutno5303
    @amazingbutno5303 Před měsícem +1

    You could make an online version where everyone is one of two teams and you play on a massive grid

  • @laiton2
    @laiton2 Před měsícem +5

    very interesting concept!

  • @thecatsmith
    @thecatsmith Před 24 dny

    I need a phone app version, (preferably on iOS)
    maybe with a zoom function to show either the whole board or the play location

  • @Redditard
    @Redditard Před měsícem

    Wait, can i this? BEAUTIFUL!

  • @tessenary_
    @tessenary_ Před měsícem +1

    i remember vsauce making a short about this, but it was only level 2.

  • @adeptmage2293
    @adeptmage2293 Před měsícem

    Wait, how did movement in depth 3 work? I'm not quite getting it yet.

  • @th1v5
    @th1v5 Před měsícem

    Cool concept and execution, but in future videos could you talk louder/increase the volume? Even with both my youtube and computer's volume sliders maxed out, I still had to turn on captions as I could not hear you. Thanks!

  • @lcajueiro
    @lcajueiro Před měsícem +2

    ULTIMATE ULTIMATE TIC TAC TOE

  • @joshuan.
    @joshuan. Před měsícem +1

    Ok, hear me out:
    5D 3rd depth Tic Tac Toe with Multiverse Time Travel

    • @splatplays
      @splatplays Před měsícem +2

      5D chess, look it up

    • @joshuan.
      @joshuan. Před měsícem +2

      @@splatplays what in the world do you think I was referencing?

  • @thetexturepackcell
    @thetexturepackcell Před měsícem

    how is your taskbar like that and the wallpaper moving??????

  • @smugless191
    @smugless191 Před 17 dny

    Im gonna spend years playing depth 6 Tic Tac Toe with a friend only to get a draw.

  • @thepromaster7868
    @thepromaster7868 Před měsícem

    this is really underrated, but im just gonna ask how did you make your desktop background move and your task bar transparent?

  • @ImpossibleEvan
    @ImpossibleEvan Před 18 dny +1

    You shoukd do if a game ties it breaks down the one square into another recurse

  • @apia46
    @apia46 Před měsícem

    nice work, by the way

  • @lePirateMan
    @lePirateMan Před měsícem

    Great

  • @bomblii
    @bomblii Před měsícem +1

    this is so cool

  • @Adomas_B
    @Adomas_B Před měsícem

    You can press up arrow in CMD to repeat previous command

  • @cabobsstopmotion4983
    @cabobsstopmotion4983 Před měsícem +1

    Bravo man!

  • @VioletJewel1729
    @VioletJewel1729 Před měsícem +2

    press UP in the terminal :)

  • @raslei_
    @raslei_ Před měsícem

    ohhh dude i played depth 2 at school with a friend, we just called it tic tac toe 2, i honestly didnt expect to find a video on this

  • @HoloTheDrunk
    @HoloTheDrunk Před měsícem

    Neat project, I might force students to do something similar... time will tell

  • @jryde421
    @jryde421 Před měsícem +1

    I'd play this

  • @hashtagornah
    @hashtagornah Před měsícem +1

    Neat stuff

  • @Digby8
    @Digby8 Před měsícem +2

    Sick!

  • @user-hi8jv6cw8n
    @user-hi8jv6cw8n Před měsícem +1

    That's awesome, I wonder are depth 2 and 3 are solved? i.e. is there a perfect strategy to never lose? like depth 1 (regular tic tac toe)

  • @kattattack1857
    @kattattack1857 Před 29 dny

    What happens if the designated board for the next turn is already resolved? Like X has won the quadrant already, but a move on another square says we need to play there. What do you do?

    • @MetaTheoretical
      @MetaTheoretical  Před 29 dny

      You play in the board that contains that board. If that board is full too then u play on the board that contains that. etc

  • @arnabbiswasalsodeep
    @arnabbiswasalsodeep Před měsícem +1

    Depth 3 tic-tac-toe = soduku tic-tac-toe

  • @ThomasHemming-jc6tq
    @ThomasHemming-jc6tq Před měsícem

    How did you do this this is amazing

  • @ThinkWithGames
    @ThinkWithGames Před měsícem

    Cool game!

  • @theunknown4834
    @theunknown4834 Před měsícem

    How do you have a moving background

  • @elliott6158
    @elliott6158 Před měsícem

    Cool math games has entered the chat

  • @nimjabeb3910
    @nimjabeb3910 Před 29 dny

    I have yet to complete anything higher than the layer 3

  • @marksmod
    @marksmod Před měsícem

    that background tho

  • @FerriitDev
    @FerriitDev Před měsícem +1

    I can see why u chose OOP for ur project

  • @EHMM
    @EHMM Před měsícem +1

    JEREMY

  • @nameanonymous
    @nameanonymous Před měsícem +1

    What an interesting proyect!, I remember playing with my friends tic tac toe with depth 2 XD
    But anyways, hoy did you manage to create that? Can you share us your code :0?

  • @UnknownZYX_4085
    @UnknownZYX_4085 Před měsícem +1

    depth ∞

  • @moondancerproductions8708
    @moondancerproductions8708 Před měsícem

    An interesting idea. Do you plan on releasing the source code?

  • @bobofthekerbals9797
    @bobofthekerbals9797 Před 25 dny

    I tried to play depth 3 on paper one time but it took too long and we never finished

  • @EthanMeleen
    @EthanMeleen Před měsícem

    Is the code for this project on github?

  • @Starblazer-oc4nt
    @Starblazer-oc4nt Před měsícem

    Epic

  • @minamur
    @minamur Před měsícem

    cool desktop

  • @CharlieJParker
    @CharlieJParker Před měsícem

    Sick code!, (now make it 3d hehehe)

  • @victoriamacarthur8906
    @victoriamacarthur8906 Před měsícem

    depth 3 is just osu

  • @taskfailedsuccesfully738
    @taskfailedsuccesfully738 Před měsícem

    It's so stupid I love it

  • @linuslucke3838
    @linuslucke3838 Před měsícem

    Now add 3D(or more if you want to)

  • @szulat
    @szulat Před měsícem

    content loudness -20.9dB 😭

  • @Destinky
    @Destinky Před 24 dny

    TIC TAC TOE, STOP DOING MITOSIS

  • @Piokoxer
    @Piokoxer Před měsícem

    Depth 2 tic tac toe is actually a much better game than the original lol

  • @simonyi912
    @simonyi912 Před měsícem

    Chess 2.0

  • @SupersuMC
    @SupersuMC Před 26 dny

    Shut up and take my money.

    • @MetaTheoretical
      @MetaTheoretical  Před 26 dny

      What lol?

    • @SupersuMC
      @SupersuMC Před 26 dny

      @@MetaTheoretical I would love to play this as a fully-fledged game. Just saying.

  • @zwatotem
    @zwatotem Před měsícem

    Bro what is that color scheme

  • @godnmaste
    @godnmaste Před měsícem

    is the code anywhere