Thanks,
Brad
Anyway, this was coded this way because the map never changes, so it
would be wasteful to redraw it more often. This can be redrawn at a
different interval using either a time-based value, or at each step,
or depending on which events are sent to it, etc. Just look at the
update method at the end of the file, and let me know if it's not
clear how it works.
> --
> You received this message because you are subscribed to the Google Groups "rl-library" group.
> To post to this group, send email to rl-li...@googlegroups.com.
> To unsubscribe from this group, send email to rl-library+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rl-library?hl=en.
>
>
--
Brian Tanner
Ph.D Student
University of Alberta
br...@tannerpages.com
I guess that leaves the once-per-minute updates as a mystery. I set my
stopwatch and checked, so it definitely happened. But I've got the
rendering working now (with the agent showing), so I'm happy.
Brad
It calls theChangeListener.vizComponentChanged(this);
But that call should indirectly make a render happen.
Update can be called several times per step (depending on how you are
running the experiment) so you might want to check the object type and
only call the update (which calls the render which is not super cheap)
on every invocation. One fairly efficient way to do it is to only
draw every time step. This is pretty straightforward and is done in
Mountain Car, look at these two:
Update function method:
http://code.google.com/p/rl-library/source/browse/trunk/projects/environments/mountainCar/src/org/rlcommunity/environments/mountaincar/visualizer/CarOnMountainVizComponent.java?r=1335
updateAgentState method:
http://code.google.com/p/rl-library/source/browse/trunk/projects/environments/mountainCar/src/org/rlcommunity/environments/mountaincar/visualizer/MountainCarVisualizer.java?r=1335
Good luck!