The amount of effort you have put in these videos is amazing. I just coded all these algos on a mobile app using Flutter framework. Thank you for this 💚
I installed pyamaze as indicated in the video, but whenever I try to execute, I always get : ImportError : No module named pyamaze. I checked the installation, and it has been confirmed that it was installed in my python 3.6 version, and I don't get any syntax or wahtever error in the code neither. Do you know what the problem might be? Documentation is not really available :// And thank you in advance !
hello, Thanks for contacting. You can find the package here: pypi.org/project/pyamaze/ The easiest way to install any package is by the following command on the command window: >> pip install pyamaze There can be some general path issues as well. For that, you can watch my other video here: ua-cam.com/video/SIhH-rsaADY/v-deo.html Finally, if nothing works, you can simply copy-paste the module code from here: github.com/MAN1986/pyamaze/blob/main/pyamaze/pyamaze.py All you need is to create a new file named as pyamaze.py in your working folder and copy-paste the code provided above. Let me know if the issue is resolved!
Assalam_O_Alaikum! Sir if there is no path in the maze then is it still work? If not then what conditions we should add and where we should add them so that if there is no path then this program terminate and print some message like "no path found"?
WaAlaikumSalam, I have not added such condition because there is always a path. But suppose you change the map manually and there is no path then you can add one condition like after certain amount of steps you may declare there is no path available. There can be condition on length of the path scanned which may be linked to maze height and width.
Hello! If you see the code aStarDemo.py (the link provided in the description), the visited states are being stored in a list. But that will not improve the computation speed. For computation speed, the heuristic function is very important and you can find the detail of the heuristic function in the next video: ua-cam.com/video/-igjC-VoHas/v-deo.html
hi! I come from the other video (dijkstra) and mate, I shall comment here too, it is a life saver, I've been trying to find something like this for hours after trying a hole week to program something like that with pygame, tkinter and some other things, but mate }you really did well, again thank you
Dear Shivam, its very simple to change the start and goal cell. You can watch the starting video (ua-cam.com/video/McMU-WuJwG0/v-deo.html). Secondly, if you see the source code file aStarDemo.py , given in the description, you can find a different start and goal cell code from line 71 onwards (commented).
Hello Nevidu, If you check the code of aStarDemo.py (given in the description), on line number 18 and 21 you can see how the search space is saved as a list.
I have explained that in detail starting from 02:00. g Score of any cell is the actual cost from start cell to that cell. h Score is expected cost to reach to goal cell from any cell. f Score is sum of the two.
I follow each lines of your code in this video and I got errors at line, path = aStarSearch(m) and line, forwardPath[aStarSearchPath[cell]] = cell. This might be wrong with insertion into dictionary (same key). How can I fix this? Please help
@@varkam1523 Please tell what problem you are facing. The code I provided in description is working fine. It is given here: github.com/MAN1986/pyamaze/blob/main/Demos/A-Star/aStar.py
All drawings are done using the tkinter framework and the canvas is named as self._canvas inside the maze class. You will have to access that and add other content on the canvas like the row/column number. You can access the canvas outside the class and draw extra things.
You should learn tkinter basics first and then can find the suitable way. I used this reference for tkinter: anzeljg.github.io/rin2/book2/2405/docs/tkinter/index.html
How for cell (2,4) : West & South are open. Ref: 12:43 Ref: 12:11 West Cell is open? How? I can see only South cell is open 😨 #please kindly clear my confusion anyone
Hi, Yes there is little confusion I guess. The maze I generated in video might be different from the the maze map shown. I suggest you execute the code given at 12:43 and you will see a random maze. Match the maze_map and generated maze. Let me know if there is any confusion!
What do you mean? It knows the map and if there is a wall it doesn't go there. I suggest watching the first video where I have explained everything about pyamaze: ua-cam.com/video/McMU-WuJwG0/v-deo.html
That is the code of pyamaze module. The code for A-star and other search algorithms is of few lines. You don't need the code of 800 lines. You can simply install pyamaze module. Please watch the second video of the playlist that explains how to use the pyamaze module.
It's not straight forward. Will require a rigorous rework. You will have to understand the module code. Should have good experience of working with Tkinter and then can modify the code accordingly.
The amount of effort you have put in these videos is amazing. I just coded all these algos on a mobile app using Flutter framework. Thank you for this 💚
Thank you so much 💚
can you share your github repo link
I am a student in Com Sci and this was very well explained, thank you!!
You're very welcome 🙂
Your videos are so informative, please create a Genetic algorithm too in the future. thanks for the excellent job
Thanks a lot. Yes I will plan Genetic Algorithm in near future.
Towards the end, I am confused at the part where only the highlighted part is getting separated. How exactly does that happen?
It is explained at 17:29
Excellent video with great explanation. Thanks a lot!
Thanks for the compliment.
I installed pyamaze as indicated in the video, but whenever I try to execute, I always get : ImportError : No module named pyamaze. I checked the installation, and it has been confirmed that it was installed in my python 3.6 version, and I don't get any syntax or wahtever error in the code neither. Do you know what the problem might be? Documentation is not really available ://
And thank you in advance !
hello, Thanks for contacting.
You can find the package here: pypi.org/project/pyamaze/
The easiest way to install any package is by the following command on the command window:
>> pip install pyamaze
There can be some general path issues as well. For that, you can watch my other video here: ua-cam.com/video/SIhH-rsaADY/v-deo.html
Finally, if nothing works, you can simply copy-paste the module code from here: github.com/MAN1986/pyamaze/blob/main/pyamaze/pyamaze.py
All you need is to create a new file named as pyamaze.py in your working folder and copy-paste the code provided above.
Let me know if the issue is resolved!
Assalam_O_Alaikum! Sir if there is no path in the maze then is it still work? If not then what conditions we should add and where we should add them so that if there is no path then this program terminate and print some message like "no path found"?
WaAlaikumSalam, I have not added such condition because there is always a path.
But suppose you change the map manually and there is no path then you can add one condition like after certain amount of steps you may declare there is no path available. There can be condition on length of the path scanned which may be linked to maze height and width.
How could I cache visited states (children) to improve computation speed? Also thank you for a wonderful explanation!
Hello! If you see the code aStarDemo.py (the link provided in the description), the visited states are being stored in a list. But that will not improve the computation speed.
For computation speed, the heuristic function is very important and you can find the detail of the heuristic function in the next video:
ua-cam.com/video/-igjC-VoHas/v-deo.html
hi! I come from the other video (dijkstra) and mate, I shall comment here too, it is a life saver, I've been trying to find something like this for hours after trying a hole week to program something like that with pygame, tkinter and some other things, but mate }you really did well, again thank you
Awesome, thank you!
really good video
The code explanation was a bit fast but I will try it on my machine once and maybe I will get it then but thank you good work
Sir i am getting error at
aStar(m)
And
currCell = open.get()[2]
as
TypeError int object is not subscriptable
Have you tried the demo code given at:
github.com/MAN1986/pyamaze/tree/main/Demos/A-Star
How can we change the end and start coordinates?
Dear Shivam, its very simple to change the start and goal cell. You can watch the starting video (ua-cam.com/video/McMU-WuJwG0/v-deo.html).
Secondly, if you see the source code file aStarDemo.py , given in the description, you can find a different start and goal cell code from line 71 onwards (commented).
search length (visited nodes) ? how did u do ?
Hello Nevidu,
If you check the code of aStarDemo.py (given in the description), on line number 18 and 21 you can see how the search space is saved as a list.
what do you mean by g sore and f score?
I have explained that in detail starting from 02:00.
g Score of any cell is the actual cost from start cell to that cell.
h Score is expected cost to reach to goal cell from any cell.
f Score is sum of the two.
Sir, I am getting an error in line 23, m.maze_map[currCell][d]==True
Which error?
I follow each lines of your code in this video and I got errors at line, path = aStarSearch(m) and line, forwardPath[aStarSearchPath[cell]] = cell. This might be wrong with insertion into dictionary (same key). How can I fix this? Please help
Please send me the code at mahsan.naeem@gmail.com
i have the same problem bro
Can you pls tell what you did to sort out the issue
@@varkam1523 I asked my friend to help me. Sorry that I cant help u.
@@varkam1523 Please tell what problem you are facing. The code I provided in description is working fine. It is given here:
github.com/MAN1986/pyamaze/blob/main/Demos/A-Star/aStar.py
good video, can you please upload a video where you implement bfs in order to solve the knapsack problem
Thanks but I haven't implemented knapsack algorithm yet. Will try in future.
@@LearningOrbis
thanks in advance sir for all your effort
how can i draw numbers on the side of the maze and the bottom? for instance 1,2,3,4,5 for the left side and 1,2,3,4,5 for the bottom?
For that you will have to modify the class code. In pyamaze module inside the maze class there is a method _drawMaze which uses tkinter to draw maze.
@@LearningOrbis there isn't any easier alternative?
All drawings are done using the tkinter framework and the canvas is named as self._canvas inside the maze class. You will have to access that and add other content on the canvas like the row/column number.
You can access the canvas outside the class and draw extra things.
@@LearningOrbis i found it, what would be an example code to draw the numbers on each side using tkinter?
You should learn tkinter basics first and then can find the suitable way. I used this reference for tkinter:
anzeljg.github.io/rin2/book2/2405/docs/tkinter/index.html
I wish this was doing using pacman. Great video though. Thanks
life saver, really ty
How for cell (2,4) : West & South are open.
Ref: 12:43
Ref: 12:11
West Cell is open? How?
I can see only South cell is open 😨
#please kindly clear my confusion anyone
Hi,
Yes there is little confusion I guess. The maze I generated in video might be different from the the maze map shown.
I suggest you execute the code given at 12:43 and you will see a random maze. Match the maze_map and generated maze.
Let me know if there is any confusion!
Sir,how it ignored the walls
What do you mean? It knows the map and if there is a wall it doesn't go there. I suggest watching the first video where I have explained everything about pyamaze: ua-cam.com/video/McMU-WuJwG0/v-deo.html
Awesom! video ^^
Thanks a lot! 😊
The code in the description you've put it about 800 lines.
How?
That is the code of pyamaze module. The code for A-star and other search algorithms is of few lines.
You don't need the code of 800 lines. You can simply install pyamaze module. Please watch the second video of the playlist that explains how to use the pyamaze module.
thank you brother
You're welcome 🙂
how i can create buttons to start object move stop it and go back
For that you will have to update the module code accordingly.
@@LearningOrbis how if you please can explain
It's not straight forward. Will require a rigorous rework. You will have to understand the module code. Should have good experience of working with Tkinter and then can modify the code accordingly.
I guess, you saved my life!
🙂
great video, I learned a lot
Thanks!
Glad to know that 🙂
I follow every step but i get errors
Which error?
Have you tried this code: github.com/MAN1986/pyamaze/tree/main/Demos/A-Star
thank you is good Astar
Welcome 🙂
can you pls upload source code
Please check the description. Code links are provided.
Walekumassalam