// 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;i1 ? ' and ' : '') + others[others.length-1];\n } else {\n s += 'nothing';\n }\n descriptions.push(s);\n}\nreturn descriptions.join('; ');", "parameters": [["actions", "list"], ["dominated_by", "matrix"]]}, "dominates": {"type": "number", "language": "javascript", "definition": "var strictly = false;\nfor(var i=0;iu2[i]) {\n strictly = true;\n }\n}\nreturn strictly ? 1 : 0;", "parameters": [["u1", "vector"], ["u2", "vector"]]}}, "showQuestionGroupNames": false, "parts": [{"displayType": "checkbox", "minMarks": 0, "layout": {"type": "expression", "expression": "map(map(j<>k,k,1..num_actions),j,1..num_actions)"}, "choices": ["{actions[0]} dominated by", "{actions[1]} dominated by", "{actions[2]} dominated by", "{actions[3]} dominated by", "{actions[4]} dominated by"], "showCorrectAnswer": true, "matrix": "dominated_by", "prompt": "

Identify 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[0]}

", "

{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;iA traveller wishes to go on a city break to Edinburgh during the Christmas vacation. The traveller wants as much time in Edinburgh as possible and must decide, knowing the weather may be bad, how to get to Edinburgh.

\n

The 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": "

a)

\n

An action $a_1$ dominates $a_2$ if:

\n
    \n
  1. $U(a_1,s_j) \\geq U(a_2,s_j) \\; \\forall s_j$.
  2. \n
  3. There is strict inequality for at least one state $j$.
  4. \n
\n

Drawing the utility set can help to identify which actions dominate others.

\n

{utility_set(utility,actions)}

\n

From the plot of the utility set, we can see that {describe_domination(actions,dominated_by)}.

\n

b)

\n

An 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/"}]}