๐Ÿง‘โ€๐Ÿซ teacher

hints for teachers and a suggested teaching plan

Use this game for your class if

Otherwise, let me recommend the excellent service of fathomd.com. Their game is all web-based and you do not need any technical knowledge. This also means that students do not need to install any software and you further have the opportunity to let all students play simultaneously with the same random numbers in the classroom.

What is in the repository?

The following is available at https://github.com/frankhuettner/newsvendor for download or cloning:

How Iโ€™d teach it

Download or clone the repo from https://github.com/frankhuettner/newsvendor

Homework prior to class

As part of this simulation, students will download Julia and install some packages on their computers. This means that each student will download about 1 GB of data so that it seems impractical to have this done in class. Hence, the following preparation.

  1. Ask your students to read the mini case and answer preparatory questions. To this end,
    • you can distribute the newsvendor/preparation/student_preparation-Handout.pdf, or
    • let them load the corresponding notebook, using the following instructions:
      1. Download Julia from the official website and install it with the standard settings.
      2. Copy the code below.
          begin
          # Download the notebook into a temporary directory
          nb = download("https://raw.githubusercontent.com/frankhuettner/newsvendor/main/preparation/student_preparation.jl", joinpath(mktempdir(), "student_preparation.jl"))
          # Install Pluto
          import Pkg; Pkg.add("Pluto")
          # Start Pluto and load the notebook
          import Pluto; Pluto.run(dismiss_update_notification=true, notebook=nb)
          end
        
      3. Start Julia (e.g. in the Windows Start Menu). The Julia REPL will appear.
      4. Rightclick into the Julia REPL window. This will paste the code that you copied above. Hit the Enter key to execute the code.
      5. Now wait for 10 minutes. Julia will install Pluto and download the preparation. After about 5 minutes, it opens your browser and you see fragments of the case. It will install further packages and is finished once the animations stop. Get a โ˜• or ๐Ÿต or read the case while waiting (do not close the Julia window).
      6. Close of Julia and the browser window when youโ€™re done.
  2. Let them play part I of the game.
    • If theyโ€™ve already installed Julia and Pluto for the preparation, then you can ask them to simply load the notebook from https://github.com/frankhuettner/newsvendor/blob/main/game/newsvendorgame.jl, e.g., by running the following instructions in the Julia REPL:
       begin
       # Download the notebook into a temporary directory
       nb = download("https://raw.githubusercontent.com/frankhuettner/newsvendor/main/game/newsvendorgame.jl", joinpath(mktempdir(), "newsvendorsimulation.jl"))
       # Install Pluto
       import Pkg; Pkg.add("Pluto")
       # Start Pluto and load the notebook
       import Pluto; Pluto.run(dismiss_update_notification=true, notebook=nb)
       end
      
    • Otherwise, here are the instructions to install Julia, Pluto, and start the game.
  3. Request them to download their results before closing Julia and the browser window, and to submit them the TOML-file to you. Note that the students can reset their play and repeat as often as they want. Hence, it might be less useful to give them grades for the performance of their play โ€“ after all, you might want to demonstrate some flaws in their behaviour (you might however promise small rewards to the top 5). Points could be given for their answers to the preparatory questions instead.
Make your slides

To assist your preparation for the course, the following resources might be helpful.

Analyzing the game results

In Pluto, open newsvendor/debrief/game_results.jl.

  • At the beginning, it tells you the location for where to store the TOML-files submitted by your students. (You might need to click on the Reload button after adding your own data before you can select your class.)
  • Alternatively, you can work with two example data sets, which come with the repository.

You will now see the results of the play. In order to download a figure as a PNG file for your slides, use the camera button in the menue of the figure. For a better image resolution, make a screenshots with your computer.

Solution

Check out the notebook containing the solution: newsvendor/debrief/newsvendor_solution.jl. It offers useful graphs for your explanation. Alternatively, you can ask your students to open the notebook.

Exercise or homework

Ask the students to complete the remaining parts II, III, and IV of the game. In particular, they should be capable of correctly answering part III.