Closed agolding718 closed 10 years ago
Hi Alex,
The only to way to make the scripts recognize objects in the namespace correctly is to import them as functions. Why don't you leave this issue open and focus on the next lessons? I'll think more about how to do this.
Hi Alex,
I reworked the first maze example to use function calls and animate the results. Code is not commented at the moment, but it basically sends the student_func function as variable into your rover_planning_1 (reworked to act as a function), then saves the resulting maze configurations into an array called mazehist. mazehist gets passed to a quick animator function which then returns the results for display in the notebook.
You can see what it looks like here
I think this will work pretty well, it keeps enough advanced stuff behind the curtain, so to speak.
The animation does require the JSAnimation library (see here for installation instructions) but only for those us writing and running these notebooks. As you can see above, nbviewer just plays the embedded animation object without objection (on chromium, anyway)
The animation stuff is all on gforsyth/animaterover
Wow. that's awesome. Thanks; I'll get the rest of it working in a similar fashion.
All,
I've got two things I want to work out about lesson two:
Aron, I thought that you might have an idea, especially for the second one. Please feel free to contribute, everyone else; I've had a look around and haven't found what I'm looking for. Is there a way (different magic command?) to make the scripts I'm using recognize the existing variables? Thanks.
-Alex