Sim Status Rule Explorer
Run the Sim Status Rule Explorer MicroSim Fullscreen
Edit in the p5.js Editor
About This MicroSim
The batch pipeline never asks a person where a MicroSim stands. Each time
extract-sim-specs.py runs with --status-file, it looks at the files on disk and derives
one of six statuses. This explorer lets you set those files yourself and watch the same rules
decide.
The rules are checked in order, and each one can only promote a sim that passed the one before:
| Order | Rule | Result |
|---|---|---|
| 1 | The spec's **Status:** line says Reused |
reused, whatever the files say |
| 2 | No docs/sims/<sim-id>/ directory |
specified |
| 3 | The directory has main.html |
scaffolded (without it, still specified) |
| 4 | A .js file with more than 50 lines |
implemented |
| 5 | quality_score in index.md front matter is 70 or higher |
validated |
| 6 | A chapter iframe embeds the sim | deployed |
The strip at the top shows the five statuses of the sequence and the separate reused box
(dashed). The What is on disk panel mirrors your settings as a file listing, using the
chapter's worked example bouncing-ball-gravity-lab. The Rules, checked in order panel
marks each rule green when it passes, orange for the rule that decided the result, and gray
for rules never reached. The box at the bottom states the result in one sentence, such as
"Score 62 is below 70, so not validated".
Learning objective: The learner will predict the status that the extraction script assigns to a MicroSim given the state of its files, and will explain which rule produced the result.
Bloom's taxonomy level: Apply (verb: predict)
How to Use
- Use the checkboxes and sliders to describe a sim's files: whether the directory and
main.htmlexist, how many lines the.jsfile has, its quality score, whether the chapter has an iframe, and whether the spec says Reused. - Read the status in the strip and the rule that decided it.
- Press Predict first. The result and the rule trace are hidden. Change the files if you like, then choose the status you expect, either by clicking a box in the strip or from the list next to the button.
- The result is revealed with a check or cross on your choice, and the counter records how many of your predictions were right.
- Try the chapter's worked example: directory,
main.html, 120 lines, score 62 and an iframe. Predict first, then raise the score to 78 and predict again.
Iframe Embed Code
You can add this MicroSim to any web page by adding this to your HTML:
1 2 3 4 | |
Lesson Plan
Audience
Teachers, instructional designers, learning-technology developers and learning-analytics practitioners (college undergraduate and professional development).
Duration
15 minutes
Prerequisites
- The status lifecycle and the sim status file in Chapter 14
- What
quality_scorein anindex.mdfront matter records (Chapter 13)
Activities
- Worked example (4 min): Reproduce the chapter's example (120 lines, score 62, iframe present). Explain why the iframe does not make it deployed.
- Prediction round (6 min): In pairs, one learner sets the files and the other presses Predict first and predicts. Swap after five predictions. Include at least one case at exactly 50 lines and one at a score of exactly 70.
- Edge cases (5 min): Find a setting in which the files look finished but the status is
reused, and one in which a 300-line.jsfile is stillspecified. Write the rule that explains each.
Assessment
- The learner predicts the correct status in at least four of five scenarios.
- For a wrong prediction, the learner names the rule that decided the real status.
- The learner explains why status is recomputed from the file system and how that makes a batch run resumable.
References
- Finite-state machine - Wikipedia. A lifecycle of named states with rules for moving between them.
- YAML - Wikipedia. The format of the
index.mdfront matter that holdsquality_score. - p5.js createCheckbox() reference - p5.js. The control used for the file checkboxes.
- p5.js createSlider() reference - p5.js. The control used for the line count and the quality score.