8 Puzzle Problem using Manhattan Distance in Artificial Intelligence

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ก.ย. 2020
  • The 8-puzzle problem is a puzzle invented and popularized by Noyes Palmer Chapman in the 1870s. It is played on a 3-by-3 grid with 8 square blocks labeled 1 through 8 and a blank square. Your goal is to rearrange the blocks so that they are in order. You are permitted to slide blocks horizontally or vertically into the blank square. We can use any one of the following Heuristic Functions: Hamming priority function: The number of blocks in the wrong position, plus the number of moves made so far to get to the state. Intuitively, a state with a small number of blocks in the wrong position is close to the goal state, and we prefer a state that has been reached using a small number of moves. Manhattan priority function: The sum of the distances (sum of the vertical and horizontal distance) from the blocks to their goal positions, plus the number of moves made so far to get to the state. A critical optimization: To prevent unnecessary exploration of states, when considering the neighbors of a state, don't explore the neighbor if its board position is the same as the previous state.🔗Important Playlists:
    Artificial Intelligence: th-cam.com/users/playlist?list... Learning: • Machine Learning
    🌐Join our community:
    Android App(Notes+Videos): play.google.com/store/apps/de... Facebook: / thinkxacademy Twitter: / thinkxacademy Instagram: thinkxacade... #artificialintelligence #heuristics

ความคิดเห็น • 56

  • @josef-jayabiada221
    @josef-jayabiada221 3 ปีที่แล้ว +9

    can i ask? what would i choose if i have the same M Values?

    • @ThinkXAcademy
      @ThinkXAcademy  3 ปีที่แล้ว +5

      If you get the same manhattan distance which is highest among all the paths, calculate the manhattan distance for the next state of the paths with same manhattan distance and then choose the minimum. Another way is to merge the paths of same manhattan value into one and proceed with the algo.

    • @josef-jayabiada221
      @josef-jayabiada221 3 ปีที่แล้ว +1

      @@ThinkXAcademy Thank You!

  • @aleksandarpetrovic2632
    @aleksandarpetrovic2632 ปีที่แล้ว

    Awesome tutorial, thank you!

  • @alirezadoroudi9126
    @alirezadoroudi9126 ปีที่แล้ว

    Thank you so much

  • @martinwilliams1308
    @martinwilliams1308 2 ปีที่แล้ว +1

    This really helped me when I was working on an assignment. Thanks!!

    • @ThinkXAcademy
      @ThinkXAcademy  2 ปีที่แล้ว

      That's great! Share our content with others to help this channel grow💯

  • @AnkitKumar-zy9pb
    @AnkitKumar-zy9pb ปีที่แล้ว +1

    What happen when all possible node value is equal the where to go?

  • @Bosco-sb5dc
    @Bosco-sb5dc ปีที่แล้ว

    well explained !, thank you!

    • @ThinkXAcademy
      @ThinkXAcademy  ปีที่แล้ว

      Share with other students also💫

  • @piotres5373
    @piotres5373 3 ปีที่แล้ว +1

    You save my day! THX bro

  • @Evan_411
    @Evan_411 5 หลายเดือนก่อน

    thanks a lot bro

  • @sireeshagandavaram8469
    @sireeshagandavaram8469 ปีที่แล้ว

    Nice explanation sir tq sir 👍 😊

  • @johnmackenzie3871
    @johnmackenzie3871 2 ปีที่แล้ว

    Good video, thank you.

  • @caljohn1475
    @caljohn1475 3 ปีที่แล้ว +2

    brilliant explanation

    • @ThinkXAcademy
      @ThinkXAcademy  3 ปีที่แล้ว +1

      Thank you😄 Keep Learning ✔️

  • @shehabalmughalles8017
    @shehabalmughalles8017 2 ปีที่แล้ว +1

    Thank you.

  • @ratneshjha3229
    @ratneshjha3229 3 ปีที่แล้ว +3

    Suggestion - Go a bit faster, it's great but I had to watch it at 1.5x speed

  • @FreeMayaTutorials
    @FreeMayaTutorials 3 ปีที่แล้ว +1

    Could you generalize this technique to play any game optimally that would lend itself well to various states where an m distance calculating function could be used?

    • @ThinkXAcademy
      @ThinkXAcademy  3 ปีที่แล้ว

      I will create a separate video for that soon✔️👍🏻

    • @FreeMayaTutorials
      @FreeMayaTutorials 3 ปีที่แล้ว +1

      @@ThinkXAcademy That would be great, thank you very much!

  • @rodrigol.1869
    @rodrigol.1869 ปีที่แล้ว

    I have a doubt regarding the code implementation of this. What should I do when all the possible branches were already visited but the solution hasn't been found yet? Should I try a different heuristic?

    • @ThinkXAcademy
      @ThinkXAcademy  ปีที่แล้ว

      No, try a different source to start the algo.

  • @dimitrisz840
    @dimitrisz840 2 ปีที่แล้ว

    Hey nice explanation there! Quick q, why is this heuristic preffered to the missing tiles one?

  • @marouenkadri8771
    @marouenkadri8771 3 ปีที่แล้ว +1

    Sear how we implement this algo , what can of data structure used ?

  • @hit1599
    @hit1599 2 ปีที่แล้ว +1

    I used the same methods but just using the manhattan distance causes the program to go into infinite loops for certain cases. Will like to hear the solution for this.

    • @ThinkXAcademy
      @ThinkXAcademy  2 ปีที่แล้ว

      you will have to learn on how to write conditions that stops the loop and return the result

  • @VedOfficial
    @VedOfficial ปีที่แล้ว

    Made my task easy❤🎉

  • @satvikarya569
    @satvikarya569 2 ปีที่แล้ว

    ThankYou very much 👌👌

    • @ThinkXAcademy
      @ThinkXAcademy  2 ปีที่แล้ว

      Please share our videos to help this channel grow🌟

  • @suhaibgbrtee4031
    @suhaibgbrtee4031 2 ปีที่แล้ว

    thank u soo much but there is notice u have said that the first box has only 3 new possibility and the forth one will return us to the same original box so it should be eliminated but u forgot to do it for the remaining boxes ,
    with the same implemented method there should be only one new possibility for each of the 2 remaining boxes

    • @ThinkXAcademy
      @ThinkXAcademy  2 ปีที่แล้ว

      yes we can avoid repititive boxes

  • @andarithaneshafitri7306
    @andarithaneshafitri7306 3 ปีที่แล้ว +1

    Thanks

  • @amirbaba9677
    @amirbaba9677 2 ปีที่แล้ว

    thanks alot

  • @nitsanbh
    @nitsanbh ปีที่แล้ว

    slowest pace to the point I have ever seen in a video. consider using a heuristic to get to the goal point faster

  • @prajjwaltripathi2911
    @prajjwaltripathi2911 ปีที่แล้ว

    Helpful

  • @hananal6493
    @hananal6493 3 ปีที่แล้ว +1

    Hello doctor, can I communicate with you?

  • @guilhermedias6018
    @guilhermedias6018 2 ปีที่แล้ว

    thanks

  • @hdvlogs4485
    @hdvlogs4485 2 ปีที่แล้ว +1

    there is so much lag in is there in you tutorial try to avoid it

    • @ThinkXAcademy
      @ThinkXAcademy  2 ปีที่แล้ว +1

      I am sorry i didn't have a good smartphone back then so there was lag, i have upgraded now and content is also improving👍🏻

  • @AnkitKumar-zy9pb
    @AnkitKumar-zy9pb ปีที่แล้ว

    you are taking non solvable example bro

  • @TheClockmister
    @TheClockmister 2 ปีที่แล้ว

    Can you say "Pubg mobile" for me?