8 Puzzle Problem using Manhattan Distance in Artificial Intelligence

  Рет қаралды 64,453

ThinkX Academy

ThinkX Academy

Күн бұрын

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: www.youtube.co... Learning: • Machine Learning
🌐Join our community:
Android App(Notes+Videos): play.google.co... Facebook: / thinkxacademy Twitter: / thinkxacademy Instagram: www.instagram.... #artificialintelligence #heuristics

Пікірлер: 58
@josef-jayabiada221
@josef-jayabiada221 4 жыл бұрын
can i ask? what would i choose if i have the same M Values?
@ThinkXAcademy
@ThinkXAcademy 4 жыл бұрын
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 4 жыл бұрын
@@ThinkXAcademy Thank You!
@martinwilliams1308
@martinwilliams1308 3 жыл бұрын
This really helped me when I was working on an assignment. Thanks!!
@ThinkXAcademy
@ThinkXAcademy 3 жыл бұрын
That's great! Share our content with others to help this channel grow💯
@piotres5373
@piotres5373 4 жыл бұрын
You save my day! THX bro
@ThinkXAcademy
@ThinkXAcademy 4 жыл бұрын
Keep Learning 🌟
@shehabalmughalles8017
@shehabalmughalles8017 3 жыл бұрын
Thank you.
@ThinkXAcademy
@ThinkXAcademy 3 жыл бұрын
Keep Learning 💯
@caljohn1475
@caljohn1475 4 жыл бұрын
brilliant explanation
@ThinkXAcademy
@ThinkXAcademy 4 жыл бұрын
Thank you😄 Keep Learning ✔️
@AnkitKumar-zy9pb
@AnkitKumar-zy9pb 2 жыл бұрын
What happen when all possible node value is equal the where to go?
@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
@alirezadoroudi9126
@alirezadoroudi9126 2 жыл бұрын
Thank you so much
@Bosco-sb5dc
@Bosco-sb5dc 2 жыл бұрын
well explained !, thank you!
@ThinkXAcademy
@ThinkXAcademy 2 жыл бұрын
Share with other students also💫
@aleksandarpetrovic2632
@aleksandarpetrovic2632 2 жыл бұрын
Awesome tutorial, thank you!
@ThinkXAcademy
@ThinkXAcademy 2 жыл бұрын
Welcome sir😄
@EasyCodingStudio
@EasyCodingStudio 5 ай бұрын
nice explanation
@sireeshagandavaram8469
@sireeshagandavaram8469 Жыл бұрын
Nice explanation sir tq sir 👍 😊
@Evan_411
@Evan_411 Жыл бұрын
thanks a lot bro
@marouenkadri8771
@marouenkadri8771 4 жыл бұрын
Sear how we implement this algo , what can of data structure used ?
@ThinkXAcademy
@ThinkXAcademy 4 жыл бұрын
Priority Queues
@ChandaniGajera
@ChandaniGajera 5 ай бұрын
What should I do if I get same Manhattan value for next 2 steps... And not possible any other movement
@johnmackenzie3871
@johnmackenzie3871 2 жыл бұрын
Good video, thank you.
@ThinkXAcademy
@ThinkXAcademy 2 жыл бұрын
Thanks😃
@andarithaneshafitri7306
@andarithaneshafitri7306 3 жыл бұрын
Thanks
@ThinkXAcademy
@ThinkXAcademy 3 жыл бұрын
Keep Learning ✨
@VedOfficial
@VedOfficial Жыл бұрын
Made my task easy❤🎉
@suhaibgbrtee4031
@suhaibgbrtee4031 3 жыл бұрын
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 3 жыл бұрын
yes we can avoid repititive boxes
@satvikarya569
@satvikarya569 3 жыл бұрын
ThankYou very much 👌👌
@ThinkXAcademy
@ThinkXAcademy 3 жыл бұрын
Please share our videos to help this channel grow🌟
@amirbaba9677
@amirbaba9677 3 жыл бұрын
thanks alot
@ThinkXAcademy
@ThinkXAcademy 3 жыл бұрын
keep Learning 💯👍🏻
@hit1599
@hit1599 3 жыл бұрын
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 3 жыл бұрын
you will have to learn on how to write conditions that stops the loop and return the result
@prajjwaltripathi2911
@prajjwaltripathi2911 2 жыл бұрын
Helpful
@ThinkXAcademy
@ThinkXAcademy 2 жыл бұрын
Thanks😄
@rodrigol.1869
@rodrigol.1869 2 жыл бұрын
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 2 жыл бұрын
No, try a different source to start the algo.
@FreeMayaTutorials
@FreeMayaTutorials 4 жыл бұрын
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 4 жыл бұрын
I will create a separate video for that soon✔️👍🏻
@FreeMayaTutorials
@FreeMayaTutorials 4 жыл бұрын
@@ThinkXAcademy That would be great, thank you very much!
@guilhermedias6018
@guilhermedias6018 2 жыл бұрын
thanks
@ThinkXAcademy
@ThinkXAcademy 2 жыл бұрын
Share and Subscribe🌟
@hananal6493
@hananal6493 3 жыл бұрын
Hello doctor, can I communicate with you?
@ThinkXAcademy
@ThinkXAcademy 3 жыл бұрын
yes doctor
@hdvlogs4485
@hdvlogs4485 2 жыл бұрын
there is so much lag in is there in you tutorial try to avoid it
@ThinkXAcademy
@ThinkXAcademy 2 жыл бұрын
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👍🏻
@dimitrisz840
@dimitrisz840 3 жыл бұрын
Hey nice explanation there! Quick q, why is this heuristic preffered to the missing tiles one?
@ThinkXAcademy
@ThinkXAcademy 3 жыл бұрын
manhattan distance
@ratneshjha3229
@ratneshjha3229 4 жыл бұрын
Suggestion - Go a bit faster, it's great but I had to watch it at 1.5x speed
@AnkitKumar-zy9pb
@AnkitKumar-zy9pb 2 жыл бұрын
you are taking non solvable example bro
@AnkitKumar-zy9pb
@AnkitKumar-zy9pb 2 жыл бұрын
This example can not have solution
@TheClockmister
@TheClockmister 2 жыл бұрын
Can you say "Pubg mobile" for me?
@ThinkXAcademy
@ThinkXAcademy 2 жыл бұрын
Pubg Mobile
Generate and Test in Artificial Intelligence
7:58
ThinkX Academy
Рет қаралды 8 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Euclidean Distance and Manhattan Distance
8:39
Krish Naik
Рет қаралды 288 М.
Steepest Ascent Hill Climbing Algorithm in Artificial Intelligence
14:07
Can you solve the rogue AI riddle? - Dan Finkel
5:13
TED-Ed
Рет қаралды 4 МЛН
AI in Schools: Cheater or Tutor? | Paul Matthews | TEDxHobart
17:46
Heuristic Search in Artificial Intelligence
13:01
ThinkX Academy
Рет қаралды 104 М.
A* Search
12:32
John Levine
Рет қаралды 449 М.
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 108 МЛН