// Numbas version: exam_results_page_options {"name": "Decision analysis: identify admissible actions", "extensions": ["jsxgraph", "optimisation"], "custom_part_types": [], "resources": [], "navigation": {"allowregen": true, "showfrontpage": false, "preventleave": false, "typeendtoleave": false}, "question_groups": [{"pickingStrategy": "all-ordered", "questions": [{"variable_groups": [{"variables": ["actions", "states", "num_actions", "num_states", "utility_ranges"], "name": "Setup"}, {"variables": ["first_state_utility", "second_state_utility", "utility"], "name": "Utility"}, {"variables": ["dominated_by", "admissible"], "name": "Admissibility"}], "variables": {"admissible": {"templateType": "anything", "group": "Admissibility", "definition": "map(\n sum(list(dominated_by[j]))=0,\n j,\n 0..num_actions-1\n)", "description": "", "name": "admissible"}, "utility_ranges": {"templateType": "anything", "group": "Setup", "definition": "[1..20,1..8]", "description": "
Ranges to select utility from for each state.
", "name": "utility_ranges"}, "first_state_utility": {"templateType": "anything", "group": "Utility", "definition": "let(\n q,\n sort(shuffle(list(utility_ranges[0]))[0..num_actions-1]),\n \n q+[random(max(q)+1..21)]\n)", "description": "", "name": "first_state_utility"}, "states": {"templateType": "list of strings", "group": "Setup", "definition": "[ \"Good weather\", \"Bad weather\" ]", "description": "", "name": "states"}, "num_states": {"templateType": "anything", "group": "Setup", "definition": "len(states)", "description": "", "name": "num_states"}, "second_state_utility": {"templateType": "anything", "group": "Utility", "definition": "let(\n q,\n shuffle(list(utility_ranges[1]))[0..num_actions-1],\n q+[random(1..max(q)-1)]\n)", "description": "", "name": "second_state_utility"}, "dominated_by": {"templateType": "anything", "group": "Admissibility", "definition": "matrix(map(\n map(\n if(j=k,0,\n dominates(utility[k],utility[j])\n ),\n k,\n 0..num_actions-1\n ),\n j,\n 0..num_actions-1\n))", "description": "", "name": "dominated_by"}, "actions": {"templateType": "list of strings", "group": "Setup", "definition": "[ \"Bus\", \"Taxi\", \"Car\", \"Train\", \"Plane\" ]", "description": "", "name": "actions"}, "utility": {"templateType": "anything", "group": "Utility", "definition": "matrix(map(\n [first_state_utility[action], second_state_utility[action]],\n action,\n 0..num_actions-1\n))", "description": "Utility for each combination of action and state.
", "name": "utility"}, "num_actions": {"templateType": "anything", "group": "Setup", "definition": "len(actions)", "description": "", "name": "num_actions"}}, "ungrouped_variables": [], "question_groups": [{"pickingStrategy": "all-ordered", "questions": [], "name": "", "pickQuestions": 0}], "name": "Decision analysis: identify admissible actions", "functions": {"describe_domination": {"type": "string", "language": "javascript", "definition": "var descriptions = [];\nfor(var i=0;iIdentify which actions dominate other actions.
", "type": "m_n_x", "maxAnswers": 0, "shuffleChoices": false, "warningType": "none", "scripts": {"mark": {"script": "// award a point each time the student's answer matches the dominated_by matrix\n// then scale the points down so a completely correct board is worth 100% credit\n\nthis.answered = true;\nthis.validation.numTicks = 1; // override the check for number of ticks\n\nvar max = this.numAnswers * this.numChoices;\nvar dominated_by = question.unwrappedVariables.dominated_by;\nvar correct = 0;\nfor(var i=0;i{actions[1]}
", "{actions[2]}
", "{actions[3]}
", "{actions[4]}
"], "showCorrectAnswer": true, "matrix": "map(if(x,1,0),x,admissible)", "prompt": "Which actions are admissible?
", "distractors": ["", "", "", "", ""], "variableReplacements": [], "type": "m_n_2", "maxAnswers": 0, "shuffleChoices": false, "warningType": "none", "scripts": {"mark": {"script": "// award a point each time the student's answer matches the dominated_by matrix\n// then scale the points down so a completely correct board is worth 100% credit\n\nthis.answered = true;\nthis.validation.numTicks = 1; // override the check for number of ticks\n\nvar max = this.numAnswers * this.numChoices;\nvar admissible = question.unwrappedVariables.admissible;\nvar correct = 0;\nfor(var i=0;iThe traveller knows how long it will take to get to Edinburgh using each of the available modes of transport, but bad weather might cause delays. Estimates of the number of hours gained by using the various modes of travel are given in the payoff table below.
\n{table(map([actions[j]]+list(utility[j]),j,0..num_actions-1),['']+states)}
", "tags": [], "rulesets": {}, "preamble": {"css": "", "js": "question.onHTMLAttached(function() {\n});"}, "type": "question", "metadata": {"notes": "", "licence": "Creative Commons Attribution 4.0 International", "description": "Given a payoff table with two states and five actions, identify which actions dominate others, and identify admissible actions.
"}, "variablesTest": {"condition": "", "maxRuns": 100}, "advice": "An action $a_1$ dominates $a_2$ if:
\nDrawing the utility set can help to identify which actions dominate others.
\n{utility_set(utility,actions)}
\nFrom the plot of the utility set, we can see that {describe_domination(actions,dominated_by)}.
\nAn action is admissible if it is not dominated by any other action.
", "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}]}], "contributors": [{"name": "Newcastle University Mathematics and Statistics", "profile_url": "https://numbas.mathcentre.ac.uk/accounts/profile/697/"}]}