The Perfect TicTacToe Bot

Поделиться
HTML-код
  • Опубликовано: 15 ноя 2024
  • I use a min-max algorithm to create a bot that plays the best moves possible. - The "game" is made in Unity.

Комментарии • 12

  • @joastapken7071
    @joastapken7071 5 месяцев назад

    I wanted to create tic tac toe for myself but I got stuck at making a bot... This video is making life a lot easier!! Great video! 😄👍

  • @damori3604
    @damori3604 3 года назад +1

    Nice tic tac toe :)

  • @eternal_inferno6132
    @eternal_inferno6132 3 года назад +2

    im an absolute beginner at programming so it would be mighty fine if ppl had a method to contact you, just asking for a friend in the most non formal method youtube comments

  • @eternal_inferno6132
    @eternal_inferno6132 3 года назад +1

    you should make discord
    that if you don't already have one if that were to be the case what is it

  • @biguzivert
    @biguzivert 2 года назад

    Wouldn't this alogorithim be really infecient tho if it has to calualte that many different outcomes to find the best?

    • @MichaelForestTechnologies
      @MichaelForestTechnologies  2 года назад

      More or less yeah, it depends of cause based on the depth of your search and the number of posible actions that can be performed, however there is a lot of optimizations that can be done, forexample alpha-beta prunning (en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning). Sebastian Lague has a great video using a simular technique for playing chess. :) (ruclips.net/video/U4ogK0MIzqk/видео.html&ab_channel=SebastianLague)

  • @AreeshFlower
    @AreeshFlower Год назад

    A very good tutorial! Keep it up! I just have a problem implementing the win conditions as it keeps giving me an error. Would you happen to have the original code on github by any chance? :D

    • @MichaelForestTechnologies
      @MichaelForestTechnologies  Год назад +1

      Thank you! Sadly have not, would propably make sense to do haha, but tbh, my win condition is really not great. I remember just making the biggest if statement checking each combination and concluding that it was "good enought". :D

  • @vasanthkumar3685
    @vasanthkumar3685 3 года назад

    Great effort 👌

  • @eternal_inferno6132
    @eternal_inferno6132 3 года назад +1

    yo

  • @bombibom_turbo5856
    @bombibom_turbo5856 2 года назад

    why does it only work for 5-6 moves?

    • @MichaelForestTechnologies
      @MichaelForestTechnologies  2 года назад

      It still works for 6+ moves, but I could not call it "perfect" in that case. Because if you look even further into the future there might be moves that 12+ moves from now are even better. However, realisticly it would likely not matter for Tic Tac Toe, but still, technically I couldn't call it that then. :)