1. 13 juil., 2007 8 validations
    • spottedMetal's avatar
      Identified, but did not fix, an error in the percept method of · 61f4730c
      spottedMetal a écrit
      XYEnvironment.  Identified three possible inelegances or errors in the 
      __init__ method of EnvCanvas.
      61f4730c
    • spottedMetal's avatar
      Corrected subtle bug in the "conflicted" method · 9d81cd6a
      spottedMetal a écrit
      of the NQueensProblem -- it had been ignoring conflicts with the
      last queen previously added.
      9d81cd6a
    • spottedMetal's avatar
      Added binding of mouse-1 to show the state of objects in the cell · 537c622e
      spottedMetal a écrit
      Changed 'Delay' slider to 'Speed' slider;
      
      Changed self.running values to boolean True, False.
      537c622e
    • spottedMetal's avatar
      Defined a make_agent_program method for the Agent classes, · 612bb0a1
      spottedMetal a écrit
      for more uniform initialization of Agents.
      
      Improved GUI with commands to list objects and agents.
      
      Fixed GUI speed control (delay slider), narrowed the
      range and increased the resolution.
      
      Added three new image files and image credits file.
      Better image for dirt
      612bb0a1
    • spottedMetal's avatar
      ac7af967
    • spottedMetal's avatar
      XYEnvironment notifies observers of new objects and object moves. · aeeaedc6
      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.
      aeeaedc6
    • spottedMetal's avatar
      Converted all classes in agents.py to new-style classes. · f0905f6d
      spottedMetal a écrit
      Further refactoring of EnvGUI, EnvToolbar, and EnvCanvas.
      f0905f6d
    • spottedMetal's avatar
      A. Changes to graphical user interface: · c133b981
      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.
      c133b981
  2. 13 juin, 2007 1 validation