aimacode / aima-javascript

Javascript visualization of algorithms from Russell And Norvig's "Artificial Intelligence - A Modern Approach"
http://aimacode.github.io/aima-javascript/
MIT License
538 stars 216 forks source link

Ch 5 - changed alphabeta to alphaBeta in index.html #132

Closed ghost closed 6 years ago

ghost commented 6 years ago

I forgot to fix this bug in my original commit for chapter 5: https://github.com/aimacode/aima-javascript/issues/78

Edit I also added a feature for chapter 3 requested here: https://github.com/aimacode/aima-javascript/issues/119

redblobgames commented 6 years ago

Cool, the hover effect is nice. For bug #119 we'll also want to make the same thing across diagrams. Do you want to make that change here, or should I check in this change for the node expansion diagram, and then we can leave that bug open for the other diagrams?

ghost commented 6 years ago

It was an easy fix, I'll work on implementing it for others.

ghost commented 6 years ago

I added the zoom effect for dfs, bfs, uniform search, and A*.

redblobgames commented 6 years ago

Looks great! For the A* diagram (which was implemented by a different author) it seems to be behaving differently — it's changing the circle on the right to red instead of changing its size like the other diagrams.

ghost commented 6 years ago

Yeah they use completely different methods of rendering. A* is all inline html and css, so if I expand a node it messes up the entire diagram. I could rewrite it all in Two.js, or maybe I can change the other diagrams to turn red instead of expanding.

redblobgames commented 6 years ago

Thanks! Consistency is good. I did like the other style better but this works too. Which do you prefer?

ghost commented 6 years ago

Honestly, if both are good then I would want to stick with the colors as rewriting the A* would be a lot of work for such a little improvement.

redblobgames commented 6 years ago

Ok, great, I will check it in!