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.
@@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 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
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
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
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.
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).
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
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!
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
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)
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!
*@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?)
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 :)
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.
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
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
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
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?
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.
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.
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!
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?
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?
One thing that's good about recursive tic tac toe is that you can score tiebreakers by counting the smaller boxes
You sound like someones whos name is Jeremy
Can confirm: my name is not Jeremy
that is shockingly neutral
true
@@MetaTheoretical You sure about that?
EDIT: or a better reply, prove it.
Jerma?!?!
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
I've always heard it called ultimate tic tac toe
@@Izzythemaker127yeah same
Vsauce covered it
Broooo I've been wanting to code this exact thing forever, but never got around to it. Massive respect.
Procrastination lol
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.
Haha thats pretty cool
Who won?
@@rockyblocky_guy1244 bump aka increasing reply count so more people see
@@rockyblocky_guy1244 I did in the end, though it seemed very close throughout.
i've played recursion tic tac toe before, the strategy is very deep. i can't even imagine playing level 3 recursion...
Wouldn't all ties still result in a tie?
@@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
@@BryanLu0 Oh, so the same player can come twice in a row on the same grid?
@@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
@@BryanLu0 That sounds cool, I'll give it a try. Thanks.
I came up with Depth 2 on my own as well! Going even deeper has to be WILD!!
All we need now is a way to zoom in and pan the board so its playable by humans
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
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
GitHub: github.com/LedrProjects/Recursive-Tic-Tac-Toe/tree/main
You should pin this comment
I wonder how high you can put that depth value before the whole system goes kaput 😂
5 crahes for me after a bit haha!
@@MetaTheoretical Super computers might not even be able to get past 10 due to the way exponential growth works.
@@legendgames128 3^10=59049 is fine, it's only 59049*59049=3486784401 squares which is only 3486 megabytes, assuming 1 square is 1 byte
@@legendgames128 that would only be around a few billion squares i think, so should be possible with good code (9^10 = 3.6 billion)
@@legendgames128what
this is called loose the battle win the war.
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.
You did it, you made tic tac toe 2
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).
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
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!
It's perfectly audible to me.
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
ah cool!
Is this what tic tac toe would look like if it was made by christopher nolan?
The video is only missing the inception theme.
Haha i like that movie a lot!
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)
oh cool! any level depth or just depth 2?
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
@@--REDACTED-- I’m interested! could you add me on discord by the username “xyzwvut” and send it there?
your keyboard sounds nice
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!
Does an n-depth TicTacToe have a winning strategy? (That can be found before the universe ends…) Anyway nice elegant concept.
Not that I know of. I might make a follow up discussing strategies for higher order tic tac toe. Thanks!
is there even a strategy for depth 2?
@@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.
*@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?)
later on in the video i enable it
@@MetaTheoretical Cool! :D
Mr. Lambda, you have my respect, sub, AND like. Keep up the good work!
The background is strangely hypnotising
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 :)
Thanks!
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.
Bugfixing was hours of painfully testing cases and wrap my mind around the programs structure
I might make some more recursion videos if i get ideas
this thing is very cool man
keep doing stuff, i like it
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
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
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?
coincedence!
Interesting coincidence. I was also just thinking about 3-tac-toe, and devised the exact same ruleset.
thanks for the tutorial!
yo this is actually sick
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
Criminally underrated.
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)
maybe depth 4 is TERA tic-tac-toe
@@Donu_tLover I made tera tic tac toe but nobody wanted to play that
Where did you get your desktop background it’s so nice
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?
Its just the agreed upon rules for the game i didnt invent the rules
firefox? nah. bro got ICEFOX
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
appreciate it !!
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.
Ah, i know an enjoyer of mechanical keyboards when i hear it.
Haha! Indeed I am
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.
definitely needs iterative animations, maybe log-ramping it as it goes on. Drawing each stroke, too. Fun little idea though
You could make an online version where everyone is one of two teams and you play on a massive grid
True
very interesting concept!
Thanks!
I need a phone app version, (preferably on iOS)
maybe with a zoom function to show either the whole board or the play location
Wait, can i this? BEAUTIFUL!
i remember vsauce making a short about this, but it was only level 2.
Wait, how did movement in depth 3 work? I'm not quite getting it yet.
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!
sure
ULTIMATE ULTIMATE TIC TAC TOE
Ok, hear me out:
5D 3rd depth Tic Tac Toe with Multiverse Time Travel
5D chess, look it up
@@splatplays what in the world do you think I was referencing?
how is your taskbar like that and the wallpaper moving??????
Im gonna spend years playing depth 6 Tic Tac Toe with a friend only to get a draw.
this is really underrated, but im just gonna ask how did you make your desktop background move and your task bar transparent?
wallpaper engine for background
translucenttb for taskbar
Tysm!
You shoukd do if a game ties it breaks down the one square into another recurse
nice work, by the way
Great
this is so cool
You can press up arrow in CMD to repeat previous command
Bravo man!
press UP in the terminal :)
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
Neat project, I might force students to do something similar... time will tell
I'd play this
Neat stuff
Sick!
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)
nah dont think so
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?
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
Depth 3 tic-tac-toe = soduku tic-tac-toe
How did you do this this is amazing
github.com/LedrProjects/Recursive-Tic-Tac-Toe
Cool game!
How do you have a moving background
Cool math games has entered the chat
I have yet to complete anything higher than the layer 3
that background tho
I can see why u chose OOP for ur project
JEREMY
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?
its some recursive magic! Yeah ill add it to the description when im not feeling lazy haha!
I linked my github to this channel
@@MetaTheoretical ur special bro
@@andrewzhang8512 what
depth ∞
An interesting idea. Do you plan on releasing the source code?
Its on my github which is linked to my channe
I tried to play depth 3 on paper one time but it took too long and we never finished
Is the code for this project on github?
Epic
cool desktop
Sick code!, (now make it 3d hehehe)
depth 3 is just osu
It's so stupid I love it
I really want to play it but I don't know how to use Python
Now add 3D(or more if you want to)
content loudness -20.9dB 😭
TIC TAC TOE, STOP DOING MITOSIS
Depth 2 tic tac toe is actually a much better game than the original lol
Chess 2.0
Shut up and take my money.
What lol?
@@MetaTheoretical I would love to play this as a fully-fledged game. Just saying.
Bro what is that color scheme
is the code anywhere