Комментарии:
Thanks for making this video! You make programming very fun!
ОтветитьIm seeing this after my friend challenging me to a split competetion
Only thing im good is coding thats why
@TheCodingTrain and everyone question - I go to p5.js, look at the code and the bestMove() function seems to be invoked but it's not defined anywhere! I can't find it - any tips?
ОтветитьThe book AI technology- explore infinite knowledge by L.T. Tzur.
ОтветитьSir , what if I use a 4×4 ,tic tac toe ,
And I want to do minimax in it
Is it okay, or it's gonna take 1 day for computer to make move in starting, bcoz it's 10 power 12 ?
te amo
ОтветитьTnx for this nice and informative video
ОтветитьWhen I wrote a tic-tac-toe game in high school, I had a loop check every row, column and diagonal for a scenario where the AI could win by selecting an empty spot: an O-O-blank scenario. If it found one, it filled it and won the game. Next it would look for scenarios where the player would win, X-X-blank, and block them by choosing the empty spot. If it couldn't find either scenario anywhere on the board, it would just choose one at random. With only 9 spaces and half of the turns belonging to the player, the AI quickly becomes reactive and competitive instead of random.
It wasn't perfect, and my implementation was awful with giant nested if-then-else trees, but the finished product worked and was as fun as you could expect from tic-tac-toe.
great explanation! I have understood most of the code, but can someone please explain me 'depth' and calling the minimax function recursively using 'depth+1' , and how does it help/ work. TIA
ОтветитьI'm relatively confident it's nit going in the corner because it's thr best move (most ways to trap the player) because you're expected to play perfectly, so all sauares will end in a tie from its point of view. So it just always goes in the first space. If you indexed the swuares another way, it would take another cell first. You could add a random chance among all equivalent choices to show this.
I know you said you didn't want to add in any game theory assuming the player won't play perfectly, but i think a stat of most player options that end in traps is a good one to start with. Then, if your move is center, its best choice is the far corner opposite where it started, making an XOX sandwich on the diagonal. (Actually, I was interested to see how your algorithm would respond to that when you chose to go first. If it takes one of the remaining 2 corners on its move, you can again trap it. I think it should avoid that in favor of a tie option, but it's a good test of the algorithm.
This guy is so pleasant to watch, I wish I had this energy and positivity! Also, thanks for leaving the mistakes in, doesn’t make me feel so dumb.
ОтветитьSee this Remake -> Tic Tac Toe Decrepit.
Ответитьyou speak very fast. can not understand anything
ОтветитьI'm also unbeatable. I memorized all the patterns years ago and still haven't forgot them. I play sometimes against a computer, (even the impossible ones) to make sure I'm still not rusty.
ОтветитьIt's crazy how this is my current homework assignment and here I'm sitting watching a step by step tutorial how to solve it. Like it's too good to be true. THANKS for this!
Ответитьwhy if you start at center ? btw thanks for your videos, they're both fun and really well done
ОтветитьI made a recursive algorithm but now it is taking only middle spot why ?
Ответитьthank you so much
ОтветитьGuys, is it possible to make this Algorithm work for Nxn not just 3x3?
Ответить