// Numbas version: finer_feedback_settings
{"name": "Find Dracula", "extensions": ["stats"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"name": "Find Dracula", "tags": [], "metadata": {"description": "This question demonstrates how to use explore mode to simulate a game, where each choice made by the student changes the state of the game.
", "licence": "Creative Commons Attribution 4.0 International"}, "statement": "
You're trying to find Dracula. You've reached the grand gallery of Castle Dracula, and you know that the Count is hiding in one of the rooms. But which?
\nAll the rooms are on one side of the gallery. They each have internal doors between them, that only Dracula can use. Each time you look in a room that Dracula isn't in, he moves from the room he's in to an adjacent one.
\nCan you find Dracula?
", "advice": "", "rulesets": {}, "extensions": ["stats"], "variables": {"cells": {"name": "cells", "group": "Ungrouped variables", "definition": "repeat(true,n)", "description": "For each room, whether Dracula can be in that room.
", "templateType": "anything"}, "n": {"name": "n", "group": "Ungrouped variables", "definition": "4", "description": "The number of rooms
", "templateType": "anything"}, "cells_after_pick": {"name": "cells_after_pick", "group": "Ungrouped variables", "definition": "map(\n let(ncells,map(if(k=j,false,cells[k]),k,0..n-1),\n map(if(k>0,ncells[k-1],false) or if(kcells
after looking in that room.", "templateType": "anything"}, "room_names": {"name": "room_names", "group": "Ungrouped variables", "definition": "map(\"Room \"+j,j,1..n)", "description": "The names of the rooms, for display.
", "templateType": "anything"}, "dracula": {"name": "dracula", "group": "Ungrouped variables", "definition": "random(0..n-1)", "description": "The room Dracula is in.
", "templateType": "anything"}, "dracula_choices": {"name": "dracula_choices", "group": "Ungrouped variables", "definition": "switch(\n dracula=0,[1],\n dracula=n-1,[n-2],\n [dracula-1,dracula+1]\n)", "description": "The rooms Dracula can move to.
", "templateType": "anything"}, "chosen_room": {"name": "chosen_room", "group": "Ungrouped variables", "definition": "0", "description": "The last room that was looked in.
", "templateType": "anything"}, "look_marking": {"name": "look_marking", "group": "Ungrouped variables", "definition": "map(award(1,j=dracula),j,0..n-1)", "description": "Award 1 mark for looking in the room containing Dracula.
", "templateType": "anything"}}, "variablesTest": {"condition": "", "maxRuns": 100}, "ungrouped_variables": ["n", "dracula", "cells", "cells_after_pick", "room_names", "dracula_choices", "chosen_room", "look_marking"], "variable_groups": [], "functions": {}, "preamble": {"js": "", "css": ""}, "parts": [{"type": "numberentry", "useCustomName": true, "customName": "How many rooms does Castle Dracula have?", "marks": 1, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Look in a room", "rawLabel": "", "otherPart": 1, "variableReplacements": [{"variable": "n", "definition": "interpreted_answer"}], "availabilityCondition": "answered", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "How many rooms does Castle Dracula have?
\n(You can pick - a smaller number is easier, while a larger number will mean it takes longer to find Dracula)
", "minValue": "1", "maxValue": "100", "correctAnswerFraction": false, "allowFractions": false, "mustBeReduced": false, "mustBeReducedPC": 0, "showFractionHint": true, "notationStyles": ["plain", "en", "si-en"], "correctAnswerStyle": "plain"}, {"type": "1_n_2", "useCustomName": true, "customName": "Look in a room", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "student_choice: indices(interpreted_answer,[true])[0]", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": false, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Open the door", "rawLabel": "Open the door", "otherPart": 2, "variableReplacements": [{"variable": "chosen_room", "definition": "student_choice"}, {"variable": "cells", "definition": "cells_after_pick[student_choice]"}, {"variable": "dracula", "definition": "random(dracula_choices)"}], "availabilityCondition": "answered and student_choice<>dracula", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}, {"label": "Open the door", "rawLabel": "Open the door", "otherPart": 4, "variableReplacements": [], "availabilityCondition": "answered and student_choice=dracula", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Find Dracula", "prompt": "Which room would you like to look in now?
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": "map(\"Room \"+j,j,1..n)", "matrix": "repeat(0,n)"}, {"type": "information", "useCustomName": true, "customName": "Dracula wasn't in the room", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [{"label": "Where could Dracula be?", "rawLabel": "", "otherPart": 3, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}, {"label": "Look in another room", "rawLabel": "Look in another room", "otherPart": 1, "variableReplacements": [], "availabilityCondition": "", "penalty": "", "penaltyAmount": 0, "lockAfterLeaving": false}], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Dracula wasn't in room {chosen_room+1}. Drat!
\nYou go back to the hall, and close the door. Dracula leaves the room he is in and moves to an adjacent room.
"}, {"type": "m_n_2", "useCustomName": true, "customName": "Where could Dracula be?", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": false, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": true, "adaptiveMarkingPenalty": 0, "exploreObjective": null, "prompt": "Which rooms could Dracula be in right now?
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "checkbox", "displayColumns": 0, "minAnswers": 0, "maxAnswers": 0, "warningType": "none", "showCellAnswerState": true, "choices": "room_names", "matrix": "map(if(cells[k],1,-1),k,0..n-1)"}, {"type": "1_n_2", "useCustomName": true, "customName": "Confront Dracula!", "marks": 0, "scripts": {}, "customMarkingAlgorithm": "", "extendBaseMarkingAlgorithm": true, "unitTests": [], "showCorrectAnswer": true, "showFeedbackIcon": true, "variableReplacements": [], "variableReplacementStrategy": "originalfirst", "nextParts": [], "suggestGoingBack": false, "adaptiveMarkingPenalty": 0, "exploreObjective": "Find Dracula", "prompt": "You open the door and find the dread Count himself!
\nWhat do you do?
", "minMarks": 0, "maxMarks": 0, "shuffleChoices": false, "displayType": "radiogroup", "displayColumns": 0, "showCellAnswerState": true, "choices": ["A quick stake to the heart and the job's done. Bish bash bosh!", "Let him go."], "matrix": ["1", 0], "distractors": ["", ""]}], "partsMode": "explore", "maxMarks": 0, "objectives": [{"name": "Find Dracula", "limit": "1", "mode": "sum"}], "penalties": [], "objectiveVisibility": "always", "penaltyVisibility": "always", "type": "question", "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "http://localhost:8000/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}]}], "contributors": [{"name": "Christian Lawson-Perfect", "profile_url": "http://localhost:8000/accounts/profile/1/"}, {"name": "Christian Lawson-Perfect", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/7/"}]}