Simulation and Modeling

with the Advanced Placement GridWorld Case Study

Bob Allen and Laurie White

Mercer University

Abstract


Advanced Placement courses in Computer Science are currently using a case study named GridWorld that provides a fun and exciting visual environment where young people can "program" the behaviors of objects within a virtual world. This workshop will introduce GridWorld and demonstrate its suitability to motivate early involvement of young people to conduct research through simulation and modeling.

Flow of Workshop


Our CS1 Background


Reference Links for Workshop

Introduction to GridWorld


GridWorld consists of a "Grid" which is made up of "Locations." Each location can hold an "Actor." Each actor has a method named "act()" that is called by the Grid for each "Step." The Grid, Actor, Location and much more is all stored in the gridworld.jar. Confused? Lets take a look.

Introduction to GridWorld - Hands-on

You get to make a CircleBug!!!! A simple CircleBug would alternate between just moving and turning-and-moving on each call to act().

Tools for Research

GridWorld was not designed for conducting research. It provides introductory students with a visualization tool for representing things in the world. The following tools can help students begin experimenting and conducting some simple research.

Tools for Research - Hands-on

Let's Roll Dice! First, lets look at rollDice.java which just randomly rolls 1-5 die (command line argument). Your job is to create a Java program that rolls the dice a large number of times and reports the frequency of each dice face that appears.

A Start in Research


In the spring of 2008 we had two students in our CS1 course that were highly motivated by GridWorld. One started by making a pet mouse and modeling some mouse behavior. Another student saw the mouse and researched maze generation.

A Start in Research - Hands-on

Mouse eats cheese. You are going to let the mouse behave just like in PetMouse, except for when it finds cheese. Once there is cheese in front of a mouse, it will not move anymore (looks like it is eating the cheese).

A CS1 Class Research(ish) Assignment

A primary use of computer programs is to perform simulations. For this program, you will create a simulation of disease moving through a population. To do this, you will build three new objects that extend the Actor object. The complete assignment.

Visualization of Queueing Models

Qsim demonstrates the effects of arrival rates and service rates on queues.

runQsim S ST L AT T/F "Title" 

Thank you!!