-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Visualizations for search algorithms #1155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is very interesting! I am not sure if I can add it myself though, since it is quite a substantial change. Is the code for it long? Do we need to import more libraries to run this? |
On the aima-javascript side we did this page about search algorithms. We had to decide who the audience is:
Audience 1 is fairly small, so we didn't try to address it. Right now aima-python is audience 2 and aima-javascript is audience 3. That means the idea would be that if you are a python programmer you can understand the concepts by looking at the book and also aima-javascript's pages, then understand the code by looking at aima-python's sample code. But it might be nicer to have everything on one page instead of switching back and forth. For my own pages I usually have a separate learn the concepts page (visualizations implemented in javascript) and learn how to implement it page (notebook style, with python and c++). This is mostly because I did not want to reimplement the visualizations in many different languages. |
@antmarakis We don't need to add any dependencies on top of what we have. Actually, OTOH, @redblobgames said is also true. We have a lot of people who just come here to see the implementation of algorithms. But nevertheless, we can do this as a fun assignment with lower priority and focus primarily on improving implementations of existing algorithms. |
I got this using matplotlib and it supports all the search algorithms. I think this is much better than ipythonblocks in terms of speed. The problem is that I can't get the matplotlib animations running in the notebooks so instead we have to just embed matplotlib plots in |
After a little research, I was finally able to make the animations for the notebooks! |
I browsed through the search algorithms notebook and I think that adding the visualization of how the search algorithm expands and finds the path would be useful and interesting. Kind of what @redblobgames did in his article (and has probably been done in aima-javascript).
I made this for BFS using ipythonblocks:

The text was updated successfully, but these errors were encountered: