- 13 juil., 2007 3 validations
-
-
spottedMetal a écrit
EnvCanvas draws each object either as a canvas text (string) or using an image from a file associated with the object class. Implemented delete_object for Environment and XYEnvironment, renamed XYEnvironment methods objects_at and find_at as list_objects_at and some_objects_at, for clarity; revised arguments lists of list_objects_at and some_objects_at; revised implementation of bumping to work with new list_objects_at and some_objects_at. Promoted XYEnvironment methods list_objects_at and some_objects_at to Environment. Defined can_grab method for Agent class, replacing Object method is_grabable. Cleaned up code, removed tracing print statements, etc. Removed -1 penalty for Nop in VacuumEnvironment. Added Tk mainloop to test_gui, and commented out call to test_gui.
-
spottedMetal a écrit
Further refactoring of EnvGUI, EnvToolbar, and EnvCanvas.
-
spottedMetal a écrit
1. Unquoted Tk graphics section and created a main window for the GUI. Refactored code for graphical user interface, splitting EnvFrame into EnvGUI (main Tk window), EnvToolbar, and EnvCanvas. 2. Disabled binding of Mouse-1 and Mouse-2, which don't do anything useful. 3. Implemented the add-object pop-up menu. Defined object_classes for each kind of environment. 4. Added images for ReflexVacuumAgent and Dirt, and a get_image method. get_image caches images in a dictionary to prevent them from being garbage-collected and avoid repeated reading of the same files. Created image files for reflex vacuum agent and dirt. B. Changes to XYEnvironment: 1. Implemented find_at method. 2. Implemented move_to method including bumping. C. Other changes -- to support bumping, defined the Obstacle class, and made Wall a subclass of Obstacle. A bump occurs when an agent tries to move to a cell occupied by any kind of Obstacle.
-
- 13 juin, 2007 1 validation
-
-
peter.norvig a écrit
-