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
544 stars 218 forks source link

2-Intelligent-Agents #77

Closed redblobgames closed 5 years ago

redblobgames commented 7 years ago

Chapter 2 already has a visualization of an algorithm; what are the concepts that we can visualize? My first thoughts:

  1. Table driven agent: show a table of the percepts and the resulting action. Given the state of the world, show which table entries would be activated.
  2. Rule driven agent: show a sequence of rules and the resulting action. Given the state of the world, show which rules would be activated. Follow the action from the first matching rule.
  3. Model driven agent: show the internal model of the world also. I'm not sure if there's something meaningful with the vacuum cleaner agent though.

I don't know if these visualizations will be useful or interesting but I would like to try them and see.

Ghost---Shadow commented 7 years ago

From what I understand both 1 and 2 both are essentially Finite State Automatas. 3 would be similar to Getting in the shoes of a Search Agent from Chapter 3 or online search from later chapters.

My point is, perhaps we put this chapter on the backburner?

redblobgames commented 7 years ago

Chapter 2 is mostly about introducing the concepts independent of the problem being solved (search, planning, learning, etc.). I'm hoping there's some way to show these concepts with the vacuum cleaner example, but the example may be too simple for many of the concepts.

Other possible concepts to show:

I'm looking for a chapter where I can provide examples for future contributors of how to structure code for implementing different types of visualizations (e.g. animation, reader driven, rewindable, multiple-instance, comparisons, etc.). I picked chapter 2 because it has more general concepts and I was hoping there would be more possibilities for visualizations, using extensions of the vacuum cleaner example. Do you have suggestions of other chapters that would be more suitable for this goal?

Ghost---Shadow commented 7 years ago

I'm looking for a chapter where I can provide examples for future contributors

Ok that makes sense, nevermind me then.

redblobgames commented 7 years ago

I'm looking for a chapter where I can provide examples for future contributors

Ok that makes sense, nevermind me then.

Sorry about that! I should've explained the goal from the beginning. If chapter 2 turns out not to be a great fit then I may put these examples outside of any chapter just so that we have some templates/examples to work with. (That would also make it easier for me to provide one version with two.js, one version with d3.js, one version with processing, etc.)

redblobgames commented 7 years ago

Ch 2 turned out not to be a great fit :-( and I made some examples outside of AIMA to show how to write interactive diagrams (here)

I implemented some of the diagrams for ch 2 but the user interaction and animation sometimes interfere with each other.

Future work:

nervgh commented 7 years ago

@redblobgames I'm not sure but it looks like that the status of this chapter should be "Partially completed" or "Mostly complete".

redblobgames commented 7 years ago

@nervgh Yes, you're right — I'll update it!