Top Banner
GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims
12

GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims.

Mar 27, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims.

GridWorld Case Study

Part 1

Experiments to Observe Attributes and Behavior of Actors

A Summary by Jim Mims

Page 2: GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims.

Contents

Introduction and Weighting

Part 1: Observing and Experimenting with GridWorld

Part 2: Bug Variations

Part 3: GridWorld Classes and Interfaces

Part 4: Classes that Extend the Critter Class

Part 5: Grid Data Structures

Page 3: GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims.

Classes and Interfaces: Relationships

Page 4: GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims.

Introduction and Weighting

The case study provides a graphical environment where visual objects inhabit and interact in a two-dimensional grid.

Students design and creator actor objects, add them to a grid, and determine whether they behave according to specifications.

Weighting Multiple-Choice Questions: Several Free Response Questions: 1

Page 5: GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims.

Observing and Experimenting with GridWorld

The first demo contains a two-dimensional grid contaning two actors, a bug and a rock.

Clicking on the step button runs one step, making each actor act once.

Clicking on the run button caries out a series of steps until the Stop button is clicked.

The delay between steps is controlled by the slider.

Page 6: GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims.

Observing and Experimenting with GridWorld

Clicking on a empty cell displays a drop-down menu that shows the constructors for different actor types.

The menu lists constructors for the classes of all objects that have ever been placed on the grid.

Selecting one of the constructors places an instance of that type on the grid note the dialog box that appears for parameters.

Page 7: GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims.

Observing and Experimenting with GridWorld

The dialog box mentioned on the previous slide is shown on the right.

The grid uses directions as on a map, to include diagonal directions.

One attribute of the bug is its direction (indicated by its antennae).

Initially, the bug faces North.

Page 8: GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims.

Observing and Experimenting with GridWorld

Clicking on an actor displays a drop-down menu of the methods that can be invoked on that actor.

Those above the line are specified by the class that defines the actor.

Those below the line are methods inherited from the Actor class.

Page 9: GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims.

Observing and Experimenting with GridWorld

Accessor methods will have their results displayed in a dialog window.

Modifier methods will cause an appropriate change in the display of the actor.

If parameters are needed for a method, you provide them through a dialog window as shown on the right.

Page 10: GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims.

Observing and Experimenting with GridWorld

Mouse Action Result

Click on empty location Shows constructor menu

Click on occupied location Shows method menu

Select Location-Delete menu item Removes the occupant in the currently selected location from he grid

Click on the Step button Calls act of each actor

Click on the Run button Starts run mode

Page 11: GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims.

Observing and Experimenting with GridWorld

Mouse Action Result

Click on the Stop button Stops run mode

Adjust the Slow/Fast slider Changes speed of run mode

Select the Location Zoom in/Zoom out Zooms grid display in or out

Adjust the scroll bars next to grid Scrolls to other parts of the grid (if grid is too large to fit in window)

Page 12: GridWorld Case Study Part 1 Experiments to Observe Attributes and Behavior of Actors A Summary by Jim Mims.

Observing and Experimenting with GridWorld

Mouse Action Result

Select the World Set grid menu item Changes between bounded and unbounded grids

Select the World Quit menu item Quits GridWorld