(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 7.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 75598, 1687] NotebookOptionsPosition[ 71675, 1566] NotebookOutlinePosition[ 73278, 1616] CellTagsIndexPosition[ 72950, 1604] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["2x2 Ordinal Games", "DemoTitle", CellChangeTimes->{ 3.35696210375764*^9, {3.459430890703125*^9, 3.459430895734375*^9}, { 3.459610912627567*^9, 3.4596109135181975`*^9}}], Cell["", "InitializationSection"], Cell[CellGroupData[{ Cell["", "ManipulateSection"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"rankings", "=", RowBox[{"Permutations", "[", RowBox[{"{", RowBox[{"1", ",", "2", ",", "3", ",", "4"}], "}"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"alternatives", "=", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"strategyPairs", "=", RowBox[{"Tuples", "[", RowBox[{"alternatives", ",", "2"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"outcomes", "=", RowBox[{"Row", "/@", RowBox[{"Tuples", "[", RowBox[{"alternatives", ",", "2"}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"Switch", "[", RowBox[{ "game", ",", "\[IndentingNewLine]", "pd", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"rowRank", "=", RowBox[{"{", RowBox[{"3", ",", "1", ",", "4", ",", "2"}], "}"}]}], ";", RowBox[{"colRank", "=", RowBox[{"{", RowBox[{"3", ",", "4", ",", "1", ",", "2"}], "}"}]}]}], ",", "\[IndentingNewLine]", "chicken", ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"rowRank", "=", RowBox[{"{", RowBox[{"3", ",", "2", ",", "4", ",", "1"}], "}"}]}], ";", RowBox[{"colRank", "=", RowBox[{"{", RowBox[{"3", ",", "4", ",", "2", ",", "1"}], "}"}]}]}]}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"dominantStrategyForRow", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"dominantStrategyForCol", "=", RowBox[{"{", "}"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"rankTable", "=", RowBox[{"Flatten", "/@", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"strategyPairs", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"outcomes", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"rowRank", "[", RowBox[{"[", "i", "]"}], "]"}], ",", RowBox[{"colRank", "[", RowBox[{"[", "i", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "4"}], "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", RowBox[{"rankTableDisplay", "=", RowBox[{"Style", "[", RowBox[{ RowBox[{"TableForm", "[", RowBox[{"rankTable", ",", RowBox[{"TableHeadings", "\[Rule]", RowBox[{"{", RowBox[{"None", ",", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], "}"}]}]}], "]"}], ",", "16"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"rowsMatrix", "=", RowBox[{"Partition", "[", RowBox[{"rowRank", ",", "2"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"colsMatrix", "=", RowBox[{"Partition", "[", RowBox[{"colRank", ",", "2"}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"gameMatrix", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"rowsMatrix", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}], ",", RowBox[{"colsMatrix", "[", RowBox[{"[", RowBox[{"i", ",", "j"}], "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", "2"}], "}"}]}], "]"}]}], ";", RowBox[{"gameMatrixDisplay", "=", RowBox[{"Style", "[", RowBox[{ RowBox[{"Grid", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\<\>\"", ",", RowBox[{"Row", "[", RowBox[{"{", RowBox[{"\"\< \>\"", ",", RowBox[{"Framed", "[", RowBox[{"\"\\"", ",", RowBox[{"Background", "\[Rule]", "Gray"}]}], "]"}]}], "}"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"Framed", "[", RowBox[{"\"\\"", ",", RowBox[{"Background", "\[Rule]", "Gray"}]}], "]"}], ",", RowBox[{"Style", "[", RowBox[{ RowBox[{"Grid", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\<\>\"", ",", "\"\\"", ",", "\"\\""}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"gameMatrix", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], ",", RowBox[{"gameMatrix", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"gameMatrix", "[", RowBox[{"[", RowBox[{"2", ",", "1"}], "]"}], "]"}], ",", RowBox[{"gameMatrix", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}]}], "}"}]}], "}"}], ",", RowBox[{"Dividers", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"False", ",", RowBox[{"2", "\[Rule]", "True"}]}], "}"}], ",", RowBox[{"{", RowBox[{"False", ",", RowBox[{"2", "\[Rule]", "True"}]}], "}"}]}], "}"}]}]}], "]"}], ",", "Bold", ",", "20"}], "]"}]}], "}"}]}], "}"}], ",", " ", RowBox[{"Frame", " ", "\[Rule]", " ", "True"}]}], "]"}], ",", "Bold", ",", "20"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Which", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"rowsMatrix", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "<", RowBox[{"rowsMatrix", "[", RowBox[{"[", RowBox[{"2", ",", "1"}], "]"}], "]"}]}], "&&", RowBox[{ RowBox[{"rowsMatrix", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}], "<", RowBox[{"rowsMatrix", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}]}]}], ",", RowBox[{"dominantStrategyForRow", "=", RowBox[{"{", "\"\\"", "}"}]}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"rowsMatrix", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], ">", RowBox[{"rowsMatrix", "[", RowBox[{"[", RowBox[{"2", ",", "1"}], "]"}], "]"}]}], "&&", RowBox[{ RowBox[{"rowsMatrix", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}], ">", RowBox[{"rowsMatrix", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}]}]}], ",", RowBox[{"dominantStrategyForRow", "=", RowBox[{"{", "\"\\"", "}"}]}]}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Which", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"colsMatrix", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "<", RowBox[{"colsMatrix", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}]}], "&&", RowBox[{ RowBox[{"colsMatrix", "[", RowBox[{"[", RowBox[{"2", ",", "1"}], "]"}], "]"}], "<", RowBox[{"colsMatrix", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}]}]}], ",", RowBox[{"dominantStrategyForCol", "=", RowBox[{"{", "\"\\"", "}"}]}], ",", RowBox[{ RowBox[{ RowBox[{"colsMatrix", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], ">", RowBox[{"colsMatrix", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}]}], "&&", RowBox[{ RowBox[{"colsMatrix", "[", RowBox[{"[", RowBox[{"2", ",", "1"}], "]"}], "]"}], ">", RowBox[{"colsMatrix", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}]}]}], ",", RowBox[{"dominantStrategyForCol", "=", RowBox[{"{", "\"\\"", "}"}]}]}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"NEqTester", "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{"rowsMatrix", "[", RowBox[{"[", RowBox[{"#1", ",", "#2"}], "]"}], "]"}], ">", RowBox[{"rowsMatrix", "[", RowBox[{"[", RowBox[{ RowBox[{"3", "-", "#1"}], ",", "#2"}], "]"}], "]"}]}], "&&", RowBox[{ RowBox[{"colsMatrix", "[", RowBox[{"[", RowBox[{"#1", ",", "#2"}], "]"}], "]"}], ">", RowBox[{"colsMatrix", "[", RowBox[{"[", RowBox[{"#1", ",", RowBox[{"3", "-", "#2"}]}], "]"}], "]"}]}]}], "&"}]}], ";", "\[IndentingNewLine]", RowBox[{"NEqTestResults", "=", RowBox[{"{", RowBox[{ RowBox[{"NEqTester", "[", RowBox[{"1", ",", "1"}], "]"}], ",", RowBox[{"NEqTester", "[", RowBox[{"1", ",", "2"}], "]"}], ",", RowBox[{"NEqTester", "[", RowBox[{"2", ",", "1"}], "]"}], ",", RowBox[{"NEqTester", "[", RowBox[{"2", ",", "2"}], "]"}]}], "}"}]}], ";", "\[IndentingNewLine]", RowBox[{"NashEquilibria", "=", RowBox[{"Pick", "[", RowBox[{"outcomes", ",", "NEqTestResults"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Pane", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Text", "@", RowBox[{"Style", "[", RowBox[{ RowBox[{"Column", "[", RowBox[{ RowBox[{"{", RowBox[{ "rankTableDisplay", ",", "\"\<\>\"", ",", "gameMatrixDisplay", ",", "\"\<\>\"", ",", "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{ RowBox[{"dominantStrategyForRow", "\[NotEqual]", RowBox[{"{", "}"}]}], ",", RowBox[{"Row", "[", RowBox[{"{", RowBox[{ "\"\\"", ",", "dominantStrategyForRow", ",", "\"\<.\>\""}], "}"}], "]"}], ",", RowBox[{"Row", "[", RowBox[{ "{", "\"\\"", "}"}], "]"}]}], "]"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"dominantStrategyForCol", "\[NotEqual]", RowBox[{"{", "}"}]}], ",", RowBox[{"Row", "[", RowBox[{"{", RowBox[{ "\"\\"", ",", "dominantStrategyForCol", ",", "\"\<.\>\""}], "}"}], "]"}], ",", RowBox[{"Row", "[", RowBox[{ "{", "\"\\"", "}"}], "]"}]}], "]"}], ",", RowBox[{"If", "[", RowBox[{ RowBox[{"NashEquilibria", "\[NotEqual]", RowBox[{"{", "}"}]}], ",", RowBox[{"Row", "[", RowBox[{"{", RowBox[{ "\"\\"", ",", "NashEquilibria", ",", "\"\<.\>\""}], "}"}], "]"}], ",", RowBox[{"Row", "[", RowBox[{ "{", "\"\\"", "}"}], "]"}]}], "]"}]}], "\[IndentingNewLine]", "}"}], ",", "Left"}], "]"}], ",", "Bold", ",", "16"}], "]"}]}], ",", RowBox[{"{", RowBox[{"400", ",", "400"}], "}"}]}], "]"}]}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"game", ",", "pd"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"pd", "\[Rule]", "\"\\""}], ",", RowBox[{"chicken", "\[Rule]", "\"\\""}], ",", RowBox[{"any", "\[Rule]", "\"\\""}]}], "}"}], ",", RowBox[{"ControlType", "\[Rule]", "PopupMenu"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"rowRank", ",", RowBox[{"{", RowBox[{"3", ",", "1", ",", "4", ",", "2"}], "}"}], ",", "\"\\""}], "}"}], ",", RowBox[{"Permutations", "[", RowBox[{"{", RowBox[{"1", ",", "2", ",", "3", ",", "4"}], "}"}], "]"}], ",", RowBox[{"Enabled", "\[Rule]", RowBox[{"game", "\[Equal]", "any"}]}], ",", RowBox[{"ControlPlacement", "\[Rule]", "Left"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"colRank", ",", RowBox[{"{", RowBox[{"3", ",", "4", ",", "1", ",", "2"}], "}"}], ",", "\"\\""}], "}"}], ",", RowBox[{"Permutations", "[", RowBox[{"{", RowBox[{"1", ",", "2", ",", "3", ",", "4"}], "}"}], "]"}], ",", RowBox[{"Enabled", "\[Rule]", RowBox[{"game", "\[Equal]", "any"}]}], ",", RowBox[{"ControlPlacement", "\[Rule]", "Left"}]}], "}"}], ",", RowBox[{"TrackedSymbols", "\[Rule]", "True"}], ",", RowBox[{"AutorunSequencing", "\[Rule]", RowBox[{"{", "1", "}"}]}]}], "]"}]], "Input", CellChangeTimes->{ 3.35696210375764*^9, 3.459430986625*^9, {3.4595541307230153`*^9, 3.459554160532996*^9}, {3.4595541976267047`*^9, 3.459554208932039*^9}, { 3.459554288537039*^9, 3.459554290019039*^9}, {3.459554609685911*^9, 3.459554609711914*^9}, {3.4596107951893153`*^9, 3.4596109003931136`*^9}, { 3.459680450846177*^9, 3.45968049213309*^9}, {3.45968124200807*^9, 3.4596812424911184`*^9}}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`colRank$$ = {3, 4, 1, 2}, $CellContext`game$$ = $CellContext`pd, $CellContext`rowRank$$ = {3, 1, 4, 2}, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`game$$], $CellContext`pd}, {$CellContext`pd -> "prisoner's dilemma", $CellContext`chicken -> "chicken", $CellContext`any -> "choose your own"}}, {{ Hold[$CellContext`rowRank$$], {3, 1, 4, 2}, "player 1's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, {1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}}, {{ Hold[$CellContext`colRank$$], {3, 4, 1, 2}, "player 2's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, {1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}}}, Typeset`size$$ = { 400., {197.5, 202.5}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`game$72220$$ = False, $CellContext`rowRank$72221$$ = 0, $CellContext`colRank$72222$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`colRank$$ = {3, 4, 1, 2}, $CellContext`game$$ = $CellContext`pd, $CellContext`rowRank$$ = { 3, 1, 4, 2}}, "ControllerVariables" :> { Hold[$CellContext`game$$, $CellContext`game$72220$$, False], Hold[$CellContext`rowRank$$, $CellContext`rowRank$72221$$, 0], Hold[$CellContext`colRank$$, $CellContext`colRank$72222$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> ($CellContext`rankings = Permutations[{1, 2, 3, 4}]; $CellContext`alternatives = { "C", "N"}; $CellContext`strategyPairs = Tuples[$CellContext`alternatives, 2]; $CellContext`outcomes = Map[Row, Tuples[$CellContext`alternatives, 2]]; Switch[$CellContext`game$$, $CellContext`pd, $CellContext`rowRank$$ = { 3, 1, 4, 2}; $CellContext`colRank$$ = {3, 4, 1, 2}, $CellContext`chicken, $CellContext`rowRank$$ = {3, 2, 4, 1}; $CellContext`colRank$$ = {3, 4, 2, 1}]; $CellContext`dominantStrategyForRow = {}; \ $CellContext`dominantStrategyForCol = {}; $CellContext`rankTable = Map[Flatten, Table[{ Part[$CellContext`strategyPairs, $CellContext`i], Part[$CellContext`outcomes, $CellContext`i], Part[$CellContext`rowRank$$, $CellContext`i], Part[$CellContext`colRank$$, $CellContext`i]}, {$CellContext`i, 4}]]; $CellContext`rankTableDisplay = Style[ TableForm[$CellContext`rankTable, TableHeadings -> { None, {"player 1's\nchoice", "player 2's\nchoice", "outcome\nof game", "player 1's\nranking", "player 2's\nranking"}}], 16]; $CellContext`rowsMatrix = Partition[$CellContext`rowRank$$, 2]; $CellContext`colsMatrix = Partition[$CellContext`colRank$$, 2]; $CellContext`gameMatrix = Table[{ Part[$CellContext`rowsMatrix, $CellContext`i, $CellContext`j], Part[$CellContext`colsMatrix, $CellContext`i, $CellContext`j]}, \ {$CellContext`i, 2}, {$CellContext`j, 2}]; $CellContext`gameMatrixDisplay = Style[ Grid[{{"", Row[{" ", Framed["player 2", Background -> Gray]}]}, { Framed["player 1", Background -> Gray], Style[ Grid[{{"", "C", "N"}, {"C", Part[$CellContext`gameMatrix, 1, 1], Part[$CellContext`gameMatrix, 1, 2]}, {"N", Part[$CellContext`gameMatrix, 2, 1], Part[$CellContext`gameMatrix, 2, 2]}}, Dividers -> {{False, 2 -> True}, {False, 2 -> True}}], Bold, 20]}}, Frame -> True], Bold, 20]; Which[ And[ Part[$CellContext`rowsMatrix, 1, 1] < Part[$CellContext`rowsMatrix, 2, 1], Part[$CellContext`rowsMatrix, 1, 2] < Part[$CellContext`rowsMatrix, 2, 2]], $CellContext`dominantStrategyForRow = {"N"}, And[ Part[$CellContext`rowsMatrix, 1, 1] > Part[$CellContext`rowsMatrix, 2, 1], Part[$CellContext`rowsMatrix, 1, 2] > Part[$CellContext`rowsMatrix, 2, 2]], $CellContext`dominantStrategyForRow = {"C"}]; Which[ And[ Part[$CellContext`colsMatrix, 1, 1] < Part[$CellContext`colsMatrix, 1, 2], Part[$CellContext`colsMatrix, 2, 1] < Part[$CellContext`colsMatrix, 2, 2]], $CellContext`dominantStrategyForCol = {"N"}, And[ Part[$CellContext`colsMatrix, 1, 1] > Part[$CellContext`colsMatrix, 1, 2], Part[$CellContext`colsMatrix, 2, 1] > Part[$CellContext`colsMatrix, 2, 2]], $CellContext`dominantStrategyForCol = { "C"}]; $CellContext`NEqTester = And[Part[$CellContext`rowsMatrix, #, #2] > Part[$CellContext`rowsMatrix, 3 - #, #2], Part[$CellContext`colsMatrix, #, #2] > Part[$CellContext`colsMatrix, #, 3 - #2]]& ; $CellContext`NEqTestResults = { $CellContext`NEqTester[1, 1], $CellContext`NEqTester[1, 2], $CellContext`NEqTester[2, 1], $CellContext`NEqTester[2, 2]}; $CellContext`NashEquilibria = Pick[$CellContext`outcomes, $CellContext`NEqTestResults]; Pane[ Text[ Style[ Column[{$CellContext`rankTableDisplay, "", $CellContext`gameMatrixDisplay, "", If[$CellContext`dominantStrategyForRow != {}, Row[{"The dominant strategy for player 1 is ", \ $CellContext`dominantStrategyForRow, "."}], Row[{"Player 1 does not have a dominant strategy in this \ game."}]], If[$CellContext`dominantStrategyForCol != {}, Row[{"The dominant strategy for player 2 is ", \ $CellContext`dominantStrategyForCol, "."}], Row[{"Player 2 does not have a dominant strategy in this \ game."}]], If[$CellContext`NashEquilibria != {}, Row[{"The Nash equilibria correspond to outcome(s) ", \ $CellContext`NashEquilibria, "."}], Row[{"There are no Nash equilibria in this game."}]]}, Left], Bold, 16]], {400, 400}]), "Specifications" :> {{{$CellContext`game$$, $CellContext`pd}, \ {$CellContext`pd -> "prisoner's dilemma", $CellContext`chicken -> "chicken", $CellContext`any -> "choose your own"}, ControlType -> PopupMenu}, {{$CellContext`rowRank$$, {3, 1, 4, 2}, "player 1's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, { 1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}, Enabled -> Dynamic[$CellContext`game$$ == $CellContext`any], ControlPlacement -> Left}, {{$CellContext`colRank$$, {3, 4, 1, 2}, "player 2's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, { 1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}, Enabled -> Dynamic[$CellContext`game$$ == $CellContext`any], ControlPlacement -> Left}}, "Options" :> { TrackedSymbols -> True, AutorunSequencing -> {1}}, "DefaultOptions" :> {ControllerLinking -> True}], ImageSizeCache->{641., {246., 251.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellID->842747760] }, {2}]] }, Open ]], Cell[CellGroupData[{ Cell["", "ManipulateCaptionSection"], Cell["\<\ A 2\[Times]2 ordinal game consists of two players, each with the strategy \ options of cooperation or noncooperation with the other player (these options \ are denoted C and N, respectively, in this Demonstration). Each player then \ ranks the four possible resulting outcomes from four (most desirable for that \ player) down to 1 (least desirable). The game is summarized in a 2\[Times]2 \ matrix of ordered pairs, with the entries in each ordered pair being the \ rankings of the corresponding outcome by player 1 and player 2, respectively. \ A dominant strategy for a player is a strategy (a choice of C or N) with the \ property that such a choice results in a more favorable outcome for that \ player than the other choice would, regardless of the other player's choice \ of strategy. A Nash equilibrium is a choice of strategy by each player with \ the property that a unilateral change of strategy by either player is \ unfavorable to that player.\ \>", "ManipulateCaption", CellChangeTimes->{ 3.35696210375764*^9, {3.45943100753125*^9, 3.459431197171875*^9}, { 3.45943126346875*^9, 3.459431401359375*^9}, {3.45943143359375*^9, 3.459431618234375*^9}, {3.459431667859375*^9, 3.459431833671875*^9}, { 3.459431914625*^9, 3.459431921328125*^9}, 3.45943198275*^9, { 3.459554579420885*^9, 3.459554609453888*^9}, {3.4596109348777094`*^9, 3.459611041769018*^9}, {3.4596146981355057`*^9, 3.459614704349655*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["", "ThumbnailSection"], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`colRank$$ = {3, 4, 1, 2}, $CellContext`game$$ = $CellContext`pd, $CellContext`rowRank$$ = {3, 1, 4, 2}, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`game$$], $CellContext`pd}, {$CellContext`pd -> "prisoner's dilemma", $CellContext`chicken -> "chicken", $CellContext`any -> "choose your own"}}, {{ Hold[$CellContext`rowRank$$], {3, 1, 4, 2}, "player 1's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, {1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}}, {{ Hold[$CellContext`colRank$$], {3, 4, 1, 2}, "player 2's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, {1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}}}, Typeset`size$$ = { 400., {197.5, 202.5}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`game$72282$$ = False, $CellContext`rowRank$72283$$ = 0, $CellContext`colRank$72284$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`colRank$$ = {3, 4, 1, 2}, $CellContext`game$$ = $CellContext`pd, $CellContext`rowRank$$ = { 3, 1, 4, 2}}, "ControllerVariables" :> { Hold[$CellContext`game$$, $CellContext`game$72282$$, False], Hold[$CellContext`rowRank$$, $CellContext`rowRank$72283$$, 0], Hold[$CellContext`colRank$$, $CellContext`colRank$72284$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> ($CellContext`rankings = Permutations[{1, 2, 3, 4}]; $CellContext`alternatives = { "C", "N"}; $CellContext`strategyPairs = Tuples[$CellContext`alternatives, 2]; $CellContext`outcomes = Map[Row, Tuples[$CellContext`alternatives, 2]]; Switch[$CellContext`game$$, $CellContext`pd, $CellContext`rowRank$$ = { 3, 1, 4, 2}; $CellContext`colRank$$ = {3, 4, 1, 2}, $CellContext`chicken, $CellContext`rowRank$$ = {3, 2, 4, 1}; $CellContext`colRank$$ = {3, 4, 2, 1}]; $CellContext`dominantStrategyForRow = {}; \ $CellContext`dominantStrategyForCol = {}; $CellContext`rankTable = Map[Flatten, Table[{ Part[$CellContext`strategyPairs, $CellContext`i], Part[$CellContext`outcomes, $CellContext`i], Part[$CellContext`rowRank$$, $CellContext`i], Part[$CellContext`colRank$$, $CellContext`i]}, {$CellContext`i, 4}]]; $CellContext`rankTableDisplay = Style[ TableForm[$CellContext`rankTable, TableHeadings -> { None, {"player 1's\nchoice", "player 2's\nchoice", "outcome\nof game", "player 1's\nranking", "player 2's\nranking"}}], 16]; $CellContext`rowsMatrix = Partition[$CellContext`rowRank$$, 2]; $CellContext`colsMatrix = Partition[$CellContext`colRank$$, 2]; $CellContext`gameMatrix = Table[{ Part[$CellContext`rowsMatrix, $CellContext`i, $CellContext`j], Part[$CellContext`colsMatrix, $CellContext`i, $CellContext`j]}, \ {$CellContext`i, 2}, {$CellContext`j, 2}]; $CellContext`gameMatrixDisplay = Style[ Grid[{{"", Row[{" ", Framed["player 2", Background -> Gray]}]}, { Framed["player 1", Background -> Gray], Style[ Grid[{{"", "C", "N"}, {"C", Part[$CellContext`gameMatrix, 1, 1], Part[$CellContext`gameMatrix, 1, 2]}, {"N", Part[$CellContext`gameMatrix, 2, 1], Part[$CellContext`gameMatrix, 2, 2]}}, Dividers -> {{False, 2 -> True}, {False, 2 -> True}}], Bold, 20]}}, Frame -> True], Bold, 20]; Which[ And[ Part[$CellContext`rowsMatrix, 1, 1] < Part[$CellContext`rowsMatrix, 2, 1], Part[$CellContext`rowsMatrix, 1, 2] < Part[$CellContext`rowsMatrix, 2, 2]], $CellContext`dominantStrategyForRow = {"N"}, And[ Part[$CellContext`rowsMatrix, 1, 1] > Part[$CellContext`rowsMatrix, 2, 1], Part[$CellContext`rowsMatrix, 1, 2] > Part[$CellContext`rowsMatrix, 2, 2]], $CellContext`dominantStrategyForRow = {"C"}]; Which[ And[ Part[$CellContext`colsMatrix, 1, 1] < Part[$CellContext`colsMatrix, 1, 2], Part[$CellContext`colsMatrix, 2, 1] < Part[$CellContext`colsMatrix, 2, 2]], $CellContext`dominantStrategyForCol = {"N"}, And[ Part[$CellContext`colsMatrix, 1, 1] > Part[$CellContext`colsMatrix, 1, 2], Part[$CellContext`colsMatrix, 2, 1] > Part[$CellContext`colsMatrix, 2, 2]], $CellContext`dominantStrategyForCol = { "C"}]; $CellContext`NEqTester = And[Part[$CellContext`rowsMatrix, #, #2] > Part[$CellContext`rowsMatrix, 3 - #, #2], Part[$CellContext`colsMatrix, #, #2] > Part[$CellContext`colsMatrix, #, 3 - #2]]& ; $CellContext`NEqTestResults = { $CellContext`NEqTester[1, 1], $CellContext`NEqTester[1, 2], $CellContext`NEqTester[2, 1], $CellContext`NEqTester[2, 2]}; $CellContext`NashEquilibria = Pick[$CellContext`outcomes, $CellContext`NEqTestResults]; Pane[ Text[ Style[ Column[{$CellContext`rankTableDisplay, "", $CellContext`gameMatrixDisplay, "", If[$CellContext`dominantStrategyForRow != {}, Row[{"The dominant strategy for player 1 is ", \ $CellContext`dominantStrategyForRow, "."}], Row[{"Player 1 does not have a dominant strategy in this \ game."}]], If[$CellContext`dominantStrategyForCol != {}, Row[{"The dominant strategy for player 2 is ", \ $CellContext`dominantStrategyForCol, "."}], Row[{"Player 2 does not have a dominant strategy in this \ game."}]], If[$CellContext`NashEquilibria != {}, Row[{"The Nash equilibria correspond to outcome(s) ", \ $CellContext`NashEquilibria, "."}], Row[{"There are no Nash equilibria in this game."}]]}, Left], Bold, 16]], {400, 400}]), "Specifications" :> {{{$CellContext`game$$, $CellContext`pd}, \ {$CellContext`pd -> "prisoner's dilemma", $CellContext`chicken -> "chicken", $CellContext`any -> "choose your own"}, ControlType -> PopupMenu}, {{$CellContext`rowRank$$, {3, 1, 4, 2}, "player 1's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, { 1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}, Enabled -> Dynamic[$CellContext`game$$ == $CellContext`any], ControlPlacement -> Left}, {{$CellContext`colRank$$, {3, 4, 1, 2}, "player 2's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, { 1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}, Enabled -> Dynamic[$CellContext`game$$ == $CellContext`any], ControlPlacement -> Left}}, "Options" :> { TrackedSymbols -> True, AutorunSequencing -> {1}}, "DefaultOptions" :> {ControllerLinking -> True}], ImageSizeCache->{641., {246., 251.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellID->116726944] }, Open ]], Cell[CellGroupData[{ Cell["", "SnapshotsSection"], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`colRank$$ = {3, 4, 2, 1}, $CellContext`game$$ = $CellContext`chicken, $CellContext`rowRank$$ = { 3, 2, 4, 1}, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`game$$], $CellContext`chicken}, {$CellContext`pd -> "prisoner's dilemma", $CellContext`chicken -> "chicken", $CellContext`any -> "choose your own"}}, {{ Hold[$CellContext`rowRank$$], {3, 2, 4, 1}, "player 1's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, {1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}}, {{ Hold[$CellContext`colRank$$], {3, 4, 2, 1}, "player 2's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, {1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}}}, Typeset`size$$ = Automatic, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`game$72344$$ = False, $CellContext`rowRank$72345$$ = 0, $CellContext`colRank$72346$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`colRank$$ = {3, 4, 2, 1}, $CellContext`game$$ = $CellContext`chicken, \ $CellContext`rowRank$$ = {3, 2, 4, 1}}, "ControllerVariables" :> { Hold[$CellContext`game$$, $CellContext`game$72344$$, False], Hold[$CellContext`rowRank$$, $CellContext`rowRank$72345$$, 0], Hold[$CellContext`colRank$$, $CellContext`colRank$72346$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> ($CellContext`rankings = Permutations[{1, 2, 3, 4}]; $CellContext`alternatives = { "C", "N"}; $CellContext`strategyPairs = Tuples[$CellContext`alternatives, 2]; $CellContext`outcomes = Map[Row, Tuples[$CellContext`alternatives, 2]]; Switch[$CellContext`game$$, $CellContext`pd, $CellContext`rowRank$$ = { 3, 1, 4, 2}; $CellContext`colRank$$ = {3, 4, 1, 2}, $CellContext`chicken, $CellContext`rowRank$$ = {3, 2, 4, 1}; $CellContext`colRank$$ = {3, 4, 2, 1}]; $CellContext`dominantStrategyForRow = {}; \ $CellContext`dominantStrategyForCol = {}; $CellContext`rankTable = Map[Flatten, Table[{ Part[$CellContext`strategyPairs, $CellContext`i], Part[$CellContext`outcomes, $CellContext`i], Part[$CellContext`rowRank$$, $CellContext`i], Part[$CellContext`colRank$$, $CellContext`i]}, {$CellContext`i, 4}]]; $CellContext`rankTableDisplay = Style[ TableForm[$CellContext`rankTable, TableHeadings -> { None, {"player 1's\nchoice", "player 2's\nchoice", "outcome\nof game", "player 1's\nranking", "player 2's\nranking"}}], 16]; $CellContext`rowsMatrix = Partition[$CellContext`rowRank$$, 2]; $CellContext`colsMatrix = Partition[$CellContext`colRank$$, 2]; $CellContext`gameMatrix = Table[{ Part[$CellContext`rowsMatrix, $CellContext`i, $CellContext`j], Part[$CellContext`colsMatrix, $CellContext`i, $CellContext`j]}, \ {$CellContext`i, 2}, {$CellContext`j, 2}]; $CellContext`gameMatrixDisplay = Style[ Grid[{{"", Row[{" ", Framed["player 2", Background -> Gray]}]}, { Framed["player 1", Background -> Gray], Style[ Grid[{{"", "C", "N"}, {"C", Part[$CellContext`gameMatrix, 1, 1], Part[$CellContext`gameMatrix, 1, 2]}, {"N", Part[$CellContext`gameMatrix, 2, 1], Part[$CellContext`gameMatrix, 2, 2]}}, Dividers -> {{False, 2 -> True}, {False, 2 -> True}}], Bold, 20]}}, Frame -> True], Bold, 20]; Which[ And[ Part[$CellContext`rowsMatrix, 1, 1] < Part[$CellContext`rowsMatrix, 2, 1], Part[$CellContext`rowsMatrix, 1, 2] < Part[$CellContext`rowsMatrix, 2, 2]], $CellContext`dominantStrategyForRow = {"N"}, And[ Part[$CellContext`rowsMatrix, 1, 1] > Part[$CellContext`rowsMatrix, 2, 1], Part[$CellContext`rowsMatrix, 1, 2] > Part[$CellContext`rowsMatrix, 2, 2]], $CellContext`dominantStrategyForRow = {"C"}]; Which[ And[ Part[$CellContext`colsMatrix, 1, 1] < Part[$CellContext`colsMatrix, 1, 2], Part[$CellContext`colsMatrix, 2, 1] < Part[$CellContext`colsMatrix, 2, 2]], $CellContext`dominantStrategyForCol = {"N"}, And[ Part[$CellContext`colsMatrix, 1, 1] > Part[$CellContext`colsMatrix, 1, 2], Part[$CellContext`colsMatrix, 2, 1] > Part[$CellContext`colsMatrix, 2, 2]], $CellContext`dominantStrategyForCol = { "C"}]; $CellContext`NEqTester = And[Part[$CellContext`rowsMatrix, #, #2] > Part[$CellContext`rowsMatrix, 3 - #, #2], Part[$CellContext`colsMatrix, #, #2] > Part[$CellContext`colsMatrix, #, 3 - #2]]& ; $CellContext`NEqTestResults = { $CellContext`NEqTester[1, 1], $CellContext`NEqTester[1, 2], $CellContext`NEqTester[2, 1], $CellContext`NEqTester[2, 2]}; $CellContext`NashEquilibria = Pick[$CellContext`outcomes, $CellContext`NEqTestResults]; Pane[ Text[ Style[ Column[{$CellContext`rankTableDisplay, "", $CellContext`gameMatrixDisplay, "", If[$CellContext`dominantStrategyForRow != {}, Row[{"The dominant strategy for player 1 is ", \ $CellContext`dominantStrategyForRow, "."}], Row[{"Player 1 does not have a dominant strategy in this \ game."}]], If[$CellContext`dominantStrategyForCol != {}, Row[{"The dominant strategy for player 2 is ", \ $CellContext`dominantStrategyForCol, "."}], Row[{"Player 2 does not have a dominant strategy in this \ game."}]], If[$CellContext`NashEquilibria != {}, Row[{"The Nash equilibria correspond to outcome(s) ", \ $CellContext`NashEquilibria, "."}], Row[{"There are no Nash equilibria in this game."}]]}, Left], Bold, 16]], {400, 400}]), "Specifications" :> {{{$CellContext`game$$, $CellContext`chicken}, \ {$CellContext`pd -> "prisoner's dilemma", $CellContext`chicken -> "chicken", $CellContext`any -> "choose your own"}, ControlType -> PopupMenu}, {{$CellContext`rowRank$$, {3, 2, 4, 1}, "player 1's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, { 1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}, Enabled -> Dynamic[$CellContext`game$$ == $CellContext`any], ControlPlacement -> Left}, {{$CellContext`colRank$$, {3, 4, 2, 1}, "player 2's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, { 1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}, Enabled -> Dynamic[$CellContext`game$$ == $CellContext`any], ControlPlacement -> Left}}, "Options" :> { TrackedSymbols -> True, AutorunSequencing -> {1}}, "DefaultOptions" :> {ControllerLinking -> True}], SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellID->61571999], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`colRank$$ = {3, 1, 4, 2}, $CellContext`game$$ = $CellContext`any, $CellContext`rowRank$$ = {1, 4, 2, 3}, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`game$$], $CellContext`any}, {$CellContext`pd -> "prisoner's dilemma", $CellContext`chicken -> "chicken", $CellContext`any -> "choose your own"}}, {{ Hold[$CellContext`rowRank$$], {1, 4, 2, 3}, "player 1's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, {1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}}, {{ Hold[$CellContext`colRank$$], {3, 1, 4, 2}, "player 2's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, {1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}}}, Typeset`size$$ = Automatic, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`game$72406$$ = False, $CellContext`rowRank$72407$$ = 0, $CellContext`colRank$72408$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`colRank$$ = {3, 1, 4, 2}, $CellContext`game$$ = $CellContext`any, $CellContext`rowRank$$ = \ {1, 4, 2, 3}}, "ControllerVariables" :> { Hold[$CellContext`game$$, $CellContext`game$72406$$, False], Hold[$CellContext`rowRank$$, $CellContext`rowRank$72407$$, 0], Hold[$CellContext`colRank$$, $CellContext`colRank$72408$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> ($CellContext`rankings = Permutations[{1, 2, 3, 4}]; $CellContext`alternatives = { "C", "N"}; $CellContext`strategyPairs = Tuples[$CellContext`alternatives, 2]; $CellContext`outcomes = Map[Row, Tuples[$CellContext`alternatives, 2]]; Switch[$CellContext`game$$, $CellContext`pd, $CellContext`rowRank$$ = { 3, 1, 4, 2}; $CellContext`colRank$$ = {3, 4, 1, 2}, $CellContext`chicken, $CellContext`rowRank$$ = {3, 2, 4, 1}; $CellContext`colRank$$ = {3, 4, 2, 1}]; $CellContext`dominantStrategyForRow = {}; \ $CellContext`dominantStrategyForCol = {}; $CellContext`rankTable = Map[Flatten, Table[{ Part[$CellContext`strategyPairs, $CellContext`i], Part[$CellContext`outcomes, $CellContext`i], Part[$CellContext`rowRank$$, $CellContext`i], Part[$CellContext`colRank$$, $CellContext`i]}, {$CellContext`i, 4}]]; $CellContext`rankTableDisplay = Style[ TableForm[$CellContext`rankTable, TableHeadings -> { None, {"player 1's\nchoice", "player 2's\nchoice", "outcome\nof game", "player 1's\nranking", "player 2's\nranking"}}], 16]; $CellContext`rowsMatrix = Partition[$CellContext`rowRank$$, 2]; $CellContext`colsMatrix = Partition[$CellContext`colRank$$, 2]; $CellContext`gameMatrix = Table[{ Part[$CellContext`rowsMatrix, $CellContext`i, $CellContext`j], Part[$CellContext`colsMatrix, $CellContext`i, $CellContext`j]}, \ {$CellContext`i, 2}, {$CellContext`j, 2}]; $CellContext`gameMatrixDisplay = Style[ Grid[{{"", Row[{" ", Framed["player 2", Background -> Gray]}]}, { Framed["player 1", Background -> Gray], Style[ Grid[{{"", "C", "N"}, {"C", Part[$CellContext`gameMatrix, 1, 1], Part[$CellContext`gameMatrix, 1, 2]}, {"N", Part[$CellContext`gameMatrix, 2, 1], Part[$CellContext`gameMatrix, 2, 2]}}, Dividers -> {{False, 2 -> True}, {False, 2 -> True}}], Bold, 20]}}, Frame -> True], Bold, 20]; Which[ And[ Part[$CellContext`rowsMatrix, 1, 1] < Part[$CellContext`rowsMatrix, 2, 1], Part[$CellContext`rowsMatrix, 1, 2] < Part[$CellContext`rowsMatrix, 2, 2]], $CellContext`dominantStrategyForRow = {"N"}, And[ Part[$CellContext`rowsMatrix, 1, 1] > Part[$CellContext`rowsMatrix, 2, 1], Part[$CellContext`rowsMatrix, 1, 2] > Part[$CellContext`rowsMatrix, 2, 2]], $CellContext`dominantStrategyForRow = {"C"}]; Which[ And[ Part[$CellContext`colsMatrix, 1, 1] < Part[$CellContext`colsMatrix, 1, 2], Part[$CellContext`colsMatrix, 2, 1] < Part[$CellContext`colsMatrix, 2, 2]], $CellContext`dominantStrategyForCol = {"N"}, And[ Part[$CellContext`colsMatrix, 1, 1] > Part[$CellContext`colsMatrix, 1, 2], Part[$CellContext`colsMatrix, 2, 1] > Part[$CellContext`colsMatrix, 2, 2]], $CellContext`dominantStrategyForCol = { "C"}]; $CellContext`NEqTester = And[Part[$CellContext`rowsMatrix, #, #2] > Part[$CellContext`rowsMatrix, 3 - #, #2], Part[$CellContext`colsMatrix, #, #2] > Part[$CellContext`colsMatrix, #, 3 - #2]]& ; $CellContext`NEqTestResults = { $CellContext`NEqTester[1, 1], $CellContext`NEqTester[1, 2], $CellContext`NEqTester[2, 1], $CellContext`NEqTester[2, 2]}; $CellContext`NashEquilibria = Pick[$CellContext`outcomes, $CellContext`NEqTestResults]; Pane[ Text[ Style[ Column[{$CellContext`rankTableDisplay, "", $CellContext`gameMatrixDisplay, "", If[$CellContext`dominantStrategyForRow != {}, Row[{"The dominant strategy for player 1 is ", \ $CellContext`dominantStrategyForRow, "."}], Row[{"Player 1 does not have a dominant strategy in this \ game."}]], If[$CellContext`dominantStrategyForCol != {}, Row[{"The dominant strategy for player 2 is ", \ $CellContext`dominantStrategyForCol, "."}], Row[{"Player 2 does not have a dominant strategy in this \ game."}]], If[$CellContext`NashEquilibria != {}, Row[{"The Nash equilibria correspond to outcome(s) ", \ $CellContext`NashEquilibria, "."}], Row[{"There are no Nash equilibria in this game."}]]}, Left], Bold, 16]], {400, 400}]), "Specifications" :> {{{$CellContext`game$$, $CellContext`any}, \ {$CellContext`pd -> "prisoner's dilemma", $CellContext`chicken -> "chicken", $CellContext`any -> "choose your own"}, ControlType -> PopupMenu}, {{$CellContext`rowRank$$, {1, 4, 2, 3}, "player 1's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, { 1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}, Enabled -> Dynamic[$CellContext`game$$ == $CellContext`any], ControlPlacement -> Left}, {{$CellContext`colRank$$, {3, 1, 4, 2}, "player 2's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, { 1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}, Enabled -> Dynamic[$CellContext`game$$ == $CellContext`any], ControlPlacement -> Left}}, "Options" :> { TrackedSymbols -> True, AutorunSequencing -> {1}}, "DefaultOptions" :> {ControllerLinking -> True}], SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellID->335300245], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`colRank$$ = {1, 4, 3, 2}, $CellContext`game$$ = $CellContext`any, $CellContext`rowRank$$ = {2, 3, 1, 4}, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`game$$], $CellContext`any}, {$CellContext`pd -> "prisoner's dilemma", $CellContext`chicken -> "chicken", $CellContext`any -> "choose your own"}}, {{ Hold[$CellContext`rowRank$$], {2, 3, 1, 4}, "player 1's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, {1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}}, {{ Hold[$CellContext`colRank$$], {1, 4, 3, 2}, "player 2's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, {1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}}}, Typeset`size$$ = Automatic, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`game$72468$$ = False, $CellContext`rowRank$72469$$ = 0, $CellContext`colRank$72470$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`colRank$$ = {1, 4, 3, 2}, $CellContext`game$$ = $CellContext`any, $CellContext`rowRank$$ = \ {2, 3, 1, 4}}, "ControllerVariables" :> { Hold[$CellContext`game$$, $CellContext`game$72468$$, False], Hold[$CellContext`rowRank$$, $CellContext`rowRank$72469$$, 0], Hold[$CellContext`colRank$$, $CellContext`colRank$72470$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> ($CellContext`rankings = Permutations[{1, 2, 3, 4}]; $CellContext`alternatives = { "C", "N"}; $CellContext`strategyPairs = Tuples[$CellContext`alternatives, 2]; $CellContext`outcomes = Map[Row, Tuples[$CellContext`alternatives, 2]]; Switch[$CellContext`game$$, $CellContext`pd, $CellContext`rowRank$$ = { 3, 1, 4, 2}; $CellContext`colRank$$ = {3, 4, 1, 2}, $CellContext`chicken, $CellContext`rowRank$$ = {3, 2, 4, 1}; $CellContext`colRank$$ = {3, 4, 2, 1}]; $CellContext`dominantStrategyForRow = {}; \ $CellContext`dominantStrategyForCol = {}; $CellContext`rankTable = Map[Flatten, Table[{ Part[$CellContext`strategyPairs, $CellContext`i], Part[$CellContext`outcomes, $CellContext`i], Part[$CellContext`rowRank$$, $CellContext`i], Part[$CellContext`colRank$$, $CellContext`i]}, {$CellContext`i, 4}]]; $CellContext`rankTableDisplay = Style[ TableForm[$CellContext`rankTable, TableHeadings -> { None, {"player 1's\nchoice", "player 2's\nchoice", "outcome\nof game", "player 1's\nranking", "player 2's\nranking"}}], 16]; $CellContext`rowsMatrix = Partition[$CellContext`rowRank$$, 2]; $CellContext`colsMatrix = Partition[$CellContext`colRank$$, 2]; $CellContext`gameMatrix = Table[{ Part[$CellContext`rowsMatrix, $CellContext`i, $CellContext`j], Part[$CellContext`colsMatrix, $CellContext`i, $CellContext`j]}, \ {$CellContext`i, 2}, {$CellContext`j, 2}]; $CellContext`gameMatrixDisplay = Style[ Grid[{{"", Row[{" ", Framed["player 2", Background -> Gray]}]}, { Framed["player 1", Background -> Gray], Style[ Grid[{{"", "C", "N"}, {"C", Part[$CellContext`gameMatrix, 1, 1], Part[$CellContext`gameMatrix, 1, 2]}, {"N", Part[$CellContext`gameMatrix, 2, 1], Part[$CellContext`gameMatrix, 2, 2]}}, Dividers -> {{False, 2 -> True}, {False, 2 -> True}}], Bold, 20]}}, Frame -> True], Bold, 20]; Which[ And[ Part[$CellContext`rowsMatrix, 1, 1] < Part[$CellContext`rowsMatrix, 2, 1], Part[$CellContext`rowsMatrix, 1, 2] < Part[$CellContext`rowsMatrix, 2, 2]], $CellContext`dominantStrategyForRow = {"N"}, And[ Part[$CellContext`rowsMatrix, 1, 1] > Part[$CellContext`rowsMatrix, 2, 1], Part[$CellContext`rowsMatrix, 1, 2] > Part[$CellContext`rowsMatrix, 2, 2]], $CellContext`dominantStrategyForRow = {"C"}]; Which[ And[ Part[$CellContext`colsMatrix, 1, 1] < Part[$CellContext`colsMatrix, 1, 2], Part[$CellContext`colsMatrix, 2, 1] < Part[$CellContext`colsMatrix, 2, 2]], $CellContext`dominantStrategyForCol = {"N"}, And[ Part[$CellContext`colsMatrix, 1, 1] > Part[$CellContext`colsMatrix, 1, 2], Part[$CellContext`colsMatrix, 2, 1] > Part[$CellContext`colsMatrix, 2, 2]], $CellContext`dominantStrategyForCol = { "C"}]; $CellContext`NEqTester = And[Part[$CellContext`rowsMatrix, #, #2] > Part[$CellContext`rowsMatrix, 3 - #, #2], Part[$CellContext`colsMatrix, #, #2] > Part[$CellContext`colsMatrix, #, 3 - #2]]& ; $CellContext`NEqTestResults = { $CellContext`NEqTester[1, 1], $CellContext`NEqTester[1, 2], $CellContext`NEqTester[2, 1], $CellContext`NEqTester[2, 2]}; $CellContext`NashEquilibria = Pick[$CellContext`outcomes, $CellContext`NEqTestResults]; Pane[ Text[ Style[ Column[{$CellContext`rankTableDisplay, "", $CellContext`gameMatrixDisplay, "", If[$CellContext`dominantStrategyForRow != {}, Row[{"The dominant strategy for player 1 is ", \ $CellContext`dominantStrategyForRow, "."}], Row[{"Player 1 does not have a dominant strategy in this \ game."}]], If[$CellContext`dominantStrategyForCol != {}, Row[{"The dominant strategy for player 2 is ", \ $CellContext`dominantStrategyForCol, "."}], Row[{"Player 2 does not have a dominant strategy in this \ game."}]], If[$CellContext`NashEquilibria != {}, Row[{"The Nash equilibria correspond to outcome(s) ", \ $CellContext`NashEquilibria, "."}], Row[{"There are no Nash equilibria in this game."}]]}, Left], Bold, 16]], {400, 400}]), "Specifications" :> {{{$CellContext`game$$, $CellContext`any}, \ {$CellContext`pd -> "prisoner's dilemma", $CellContext`chicken -> "chicken", $CellContext`any -> "choose your own"}, ControlType -> PopupMenu}, {{$CellContext`rowRank$$, {2, 3, 1, 4}, "player 1's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, { 1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}, Enabled -> Dynamic[$CellContext`game$$ == $CellContext`any], ControlPlacement -> Left}, {{$CellContext`colRank$$, {1, 4, 3, 2}, "player 2's ranking"}, {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, { 1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}, Enabled -> Dynamic[$CellContext`game$$ == $CellContext`any], ControlPlacement -> Left}}, "Options" :> { TrackedSymbols -> True, AutorunSequencing -> {1}}, "DefaultOptions" :> {ControllerLinking -> True}], SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellID->38724088] }, Open ]], Cell[CellGroupData[{ Cell["", "DetailsSection"], Cell["\<\ The two most famous examples of 2\[Times]2 ordinal games are \"The Prisoner's \ Dilemma\", which is shown in the thumbnail, and \"Chicken\", which is shown \ in snapshot 1. Snapshot 2 illustrates a game in which one player has a \ dominant strategy while the other does not, and snapshot 3 illustrates a game \ in which there is no Nash equilibrium. \ \>", "DetailNotes", CellChangeTimes->{ 3.35696210375764*^9, {3.45943237103125*^9, 3.459432481046875*^9}, { 3.459432569046875*^9, 3.459432571546875*^9}, {3.4595546096479073`*^9, 3.459554623105253*^9}, {3.4596110664723015`*^9, 3.4596110877224374`*^9}, { 3.45961471457351*^9, 3.459614735661297*^9}}, CellID->62747862], Cell[TextData[{ "For further details, see A. D. Taylor, ", StyleBox["Mathematics and Politics\[LongDash]Strategy, Voting, Power and \ Proof", FontSlant->"Italic"], ", New York: Springer\[Dash]Verlag, 1995." }], "DetailNotes", CellChangeTimes->{ 3.35696210375764*^9, {3.459432572078125*^9, 3.4594325829375*^9}, { 3.4596110992537613`*^9, 3.4596111002381425`*^9}, {3.45961474328013*^9, 3.4596147444133787`*^9}}, CellID->49802690] }, Open ]], Cell[CellGroupData[{ Cell["", "ControlSuggestionsSection"], Cell[BoxData[ TooltipBox[ RowBox[{ CheckboxBox[False], Cell[" Resize Images"]}], "\"Click inside an image to reveal its orange resize frame.\\nDrag any of \ the orange resize handles to resize the image.\""]], "ControlSuggestions", FontFamily->"Verdana", CellTags->"ResizeImages"], Cell[BoxData[ TooltipBox[ RowBox[{ CheckboxBox[False], Cell[" Rotate and Zoom in 3D"]}], RowBox[{ "\"Drag a 3D graphic to rotate it. Starting the drag near the center \ tumbles\\nthe graphic; starting near a corner turns it parallel to the plane \ of the screen.\\nHold down \"", FrameBox[ "Ctrl", Background -> GrayLevel[0.9], FrameMargins -> 2, FrameStyle -> GrayLevel[0.9]], "\" (or \"", FrameBox[ "Cmd", Background -> GrayLevel[0.9], FrameMargins -> 2, FrameStyle -> GrayLevel[0.9]], "\" on Mac) and drag up and down to zoom.\""}]]], "ControlSuggestions", FontFamily->"Verdana", CellTags->"RotateAndZoomIn3D"], Cell[BoxData[ TooltipBox[ RowBox[{ CheckboxBox[False], Cell[" Drag Locators"]}], RowBox[{"\"Drag any locator (\"", GraphicsBox[ LocatorBox[ Scaled[{0.5, 0.5}]], ImageSize -> 20], "\", etc.) to move it around.\""}]]], "ControlSuggestions", FontFamily->"Verdana", CellTags->"DragLocators"], Cell[BoxData[ TooltipBox[ RowBox[{ CheckboxBox[False], Cell[" Create and Delete Locators"]}], RowBox[{"\"Insert a new locator in the graphic by holding down the \"", FrameBox[ "Alt", Background -> GrayLevel[0.9], FrameMargins -> 2, FrameStyle -> GrayLevel[0.9]], "\" key\\nand clicking where you want it to be. Delete a locator by \ clicking it\\nwhile holding down the \"", FrameBox[ "Alt", Background -> GrayLevel[0.9], FrameMargins -> 2, FrameStyle -> GrayLevel[0.9]], "\" key.\""}]]], "ControlSuggestions", FontFamily->"Verdana", CellTags->"CreateAndDeleteLocators"], Cell[BoxData[ TooltipBox[ RowBox[{ CheckboxBox[False], Cell[" Slider Zoom"]}], RowBox[{"\"Hold down the \"", FrameBox[ "Alt", Background -> GrayLevel[0.9], FrameMargins -> 2, FrameStyle -> GrayLevel[0.9]], "\" key while moving a slider to make fine adjustments in the slider \ value.\\nHold \"", FrameBox[ "Ctrl", Background -> GrayLevel[0.9], FrameMargins -> 2, FrameStyle -> GrayLevel[0.9]], "\" and/or \"", FrameBox[ "Shift", Background -> GrayLevel[0.9], FrameMargins -> 2, FrameStyle -> GrayLevel[0.9]], "\" at the same time as \"", FrameBox[ "Alt", Background -> GrayLevel[0.9], FrameMargins -> 2, FrameStyle -> GrayLevel[0.9]], "\" to make ever finer adjustments.\""}]]], "ControlSuggestions", FontFamily->"Verdana", CellTags->"SliderZoom"], Cell[BoxData[ TooltipBox[ RowBox[{ CheckboxBox[False], Cell[" Gamepad Controls"]}], "\"Control this Demonstration with a gamepad or other\\nhuman interface \ device connected to your computer.\""]], "ControlSuggestions", CellChangeTimes->{3.35696210375764*^9, 3.3895522232313623`*^9}, FontFamily->"Verdana", CellTags->"GamepadControls"], Cell[BoxData[ TooltipBox[ RowBox[{ CheckboxBox[False], Cell[" Automatic Animation"]}], RowBox[{"\"Animate a slider in this Demonstration by clicking the\"", AdjustmentBox[ Cell[ GraphicsData[ "CompressedBitmap", "eJzzTSzJSM1NLMlMTlRwL0osyMhMLlZwyy8CCjEzMjAwcIKwAgOI/R/IhBKc\n\ /4EAyGAG0f+nTZsGwgysIJIRKsWKLAXGIHFmEpUgLADxWUAkI24jZs+eTaEt\n\ IG+wQKRmzJgBlYf5lhEA30OqWA=="], "Graphics", ImageSize -> {9, 9}, ImageMargins -> 0, CellBaseline -> Baseline], BoxBaselineShift -> 0.1839080459770115, BoxMargins -> {{0., 0.}, {-0.1839080459770115, 0.1839080459770115}}], "\"button\\nnext to the slider, and then clicking the play button that \ appears.\\nAnimate all controls by selecting \"", StyleBox["Autorun", FontWeight -> "Bold"], "\" from the\"", AdjustmentBox[ Cell[ GraphicsData[ "CompressedBitmap", "eJyNULENwyAQfEySIlMwTVJlCGRFsosokeNtqBmDBagoaZjAI1C8/8GUUUC6\n\ 57h7cQ8PvU7Pl17nUav7oj/TPH7V7b2QJAUAXBkKmCPRowxICy64bRvGGNF7\n\ X8CctGoDSN4xhIDGGDhzFXwUh3/ClBKrDQPmnGXtI6u0OOd+tZBVUqy1xSaH\n\ UqiK6pPe4XdEdAz6563tx/gejuORGMxJaz8mdpJn7hc="], "Graphics", ImageSize -> {10, 10}, ImageMargins -> 0, CellBaseline -> Baseline], BoxBaselineShift -> 0.1839080459770115, BoxMargins -> {{0., 0.}, {-0.1839080459770115, 0.1839080459770115}}], "\"menu.\""}]]], "ControlSuggestions", FontFamily->"Verdana", CellTags->"AutomaticAnimation"], Cell[BoxData[ TooltipBox[ RowBox[{ CheckboxBox[False], Cell[" Bookmark Animation"]}], RowBox[{ "\"See a prepared animation of this Demonstration by selecting\\n\"", StyleBox["Animate Bookmarks", FontWeight -> "Bold"], "\" from the\"", AdjustmentBox[ Cell[ GraphicsData[ "CompressedBitmap", "eJyNULENwyAQfEySIlMwTVJlCGRFsosokeNtqBmDBagoaZjAI1C8/8GUUUC6\n\ 57h7cQ8PvU7Pl17nUav7oj/TPH7V7b2QJAUAXBkKmCPRowxICy64bRvGGNF7\n\ X8CctGoDSN4xhIDGGDhzFXwUh3/ClBKrDQPmnGXtI6u0OOd+tZBVUqy1xSaH\n\ UqiK6pPe4XdEdAz6563tx/gejuORGMxJaz8mdpJn7hc="], "Graphics", ImageSize -> {10, 10}, ImageMargins -> 0, CellBaseline -> Baseline], BoxBaselineShift -> 0.1839080459770115, BoxMargins -> {{0., 0.}, {-0.1839080459770115, 0.1839080459770115}}], "\"menu.\""}]]], "ControlSuggestions", FontFamily->"Verdana", CellTags->"BookmarkAnimation"] }, Open ]], Cell[CellGroupData[{ Cell["", "SearchTermsSection"], Cell["2 x 2 ordinal games", "SearchTerms", CellChangeTimes->{ 3.35696210375764*^9, {3.459432489921875*^9, 3.459432498171875*^9}, { 3.459433084359375*^9, 3.459433084359375*^9}}, CellID->757394417], Cell["dominant strategy", "SearchTerms", CellChangeTimes->{ 3.35696210375764*^9, {3.4594330845625*^9, 3.45943308721875*^9}}, CellID->188329214], Cell["Nash equilibrium", "SearchTerms", CellChangeTimes->{ 3.35696210375764*^9, {3.459432500296875*^9, 3.45943250390625*^9}}, CellID->726094093] }, Open ]], Cell[CellGroupData[{ Cell["", "RelatedLinksSection"], Cell[TextData[ButtonBox["Nash Equilibrium", BaseStyle->"Hyperlink", ButtonData->{ URL["http://mathworld.wolfram.com/NashEquilibrium.html"], None}, ButtonNote-> "http://mathworld.wolfram.com/NashEquilibrium.html"]], "RelatedLinks", CellChangeTimes->{ 3.35696210375764*^9, {3.459554655258468*^9, 3.459554665163459*^9}}, CellID->388970707] }, Open ]], Cell[CellGroupData[{ Cell["", "AuthorSection"], Cell[TextData[{ "Contributed by: ", ButtonBox["Marc Brodie", BaseStyle->"Hyperlink", ButtonData->{ URL["http://demonstrations.wolfram.com/author.html?author=Marc+Brodie"], None}, ButtonNote-> "http://demonstrations.wolfram.com/author.html?author=Marc+Brodie"], " (Wheeling Jesuit University)" }], "Author", CellChangeTimes->{ 3.35696210375764*^9, {3.432333043774981*^9, 3.432333045441087*^9}, { 3.459432515875*^9, 3.459432525359375*^9}}] }, Open ]] }, Open ]] }, WindowSize->{820, 797}, WindowMargins->{{82, Automatic}, {Automatic, 23}}, FrontEndVersion->"7.0 for Microsoft Windows (64-bit) (February 18, 2009)", StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "Demonstration.nb", CharacterEncoding -> "WindowsANSI"] ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{ "ResizeImages"->{ Cell[64719, 1366, 290, 7, 22, "ControlSuggestions", CellTags->"ResizeImages"]}, "RotateAndZoomIn3D"->{ Cell[65012, 1375, 661, 16, 22, "ControlSuggestions", CellTags->"RotateAndZoomIn3D"]}, "DragLocators"->{ Cell[65676, 1393, 318, 10, 22, "ControlSuggestions", CellTags->"DragLocators"]}, "CreateAndDeleteLocators"->{ Cell[65997, 1405, 615, 14, 22, "ControlSuggestions", CellTags->"CreateAndDeleteLocators"]}, "SliderZoom"->{ Cell[66615, 1421, 827, 21, 22, "ControlSuggestions", CellTags->"SliderZoom"]}, "GamepadControls"->{ Cell[67445, 1444, 347, 8, 22, "ControlSuggestions", CellTags->"GamepadControls"]}, "AutomaticAnimation"->{ Cell[67795, 1454, 1442, 30, 22, "ControlSuggestions", CellTags->"AutomaticAnimation"]}, "BookmarkAnimation"->{ Cell[69240, 1486, 886, 20, 22, "ControlSuggestions", CellTags->"BookmarkAnimation"]} } *) (*CellTagsIndex CellTagsIndex->{ {"ResizeImages", 72051, 1577}, {"RotateAndZoomIn3D", 72160, 1580}, {"DragLocators", 72270, 1583}, {"CreateAndDeleteLocators", 72386, 1586}, {"SliderZoom", 72500, 1589}, {"GamepadControls", 72606, 1592}, {"AutomaticAnimation", 72719, 1595}, {"BookmarkAnimation", 72836, 1598} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[567, 22, 180, 3, 74, "DemoTitle"], Cell[750, 27, 33, 0, 266, "InitializationSection"], Cell[CellGroupData[{ Cell[808, 31, 29, 0, 188, "ManipulateSection"], Cell[CellGroupData[{ Cell[862, 35, 14684, 371, 1308, "Input"], Cell[15549, 408, 9278, 175, 509, "Output", CellID->842747760] }, {2}]] }, Open ]], Cell[CellGroupData[{ Cell[24873, 589, 36, 0, 166, "ManipulateCaptionSection"], Cell[24912, 591, 1441, 21, 142, "ManipulateCaption"] }, Open ]], Cell[CellGroupData[{ Cell[26390, 617, 28, 0, 168, "ThumbnailSection"], Cell[26421, 619, 9278, 175, 509, "Output", CellID->116726944] }, Open ]], Cell[CellGroupData[{ Cell[35736, 799, 28, 0, 138, "SnapshotsSection"], Cell[35767, 801, 9233, 174, 37, "Output", CellID->61571999], Cell[45003, 977, 9218, 174, 37, "Output", CellID->335300245], Cell[54224, 1153, 9217, 174, 37, "Output", CellID->38724088] }, Open ]], Cell[CellGroupData[{ Cell[63478, 1332, 26, 0, 332, "DetailsSection"], Cell[63507, 1334, 690, 12, 82, "DetailNotes", CellID->62747862], Cell[64200, 1348, 442, 11, 37, "DetailNotes", CellID->49802690] }, Open ]], Cell[CellGroupData[{ Cell[64679, 1364, 37, 0, 120, "ControlSuggestionsSection"], Cell[64719, 1366, 290, 7, 22, "ControlSuggestions", CellTags->"ResizeImages"], Cell[65012, 1375, 661, 16, 22, "ControlSuggestions", CellTags->"RotateAndZoomIn3D"], Cell[65676, 1393, 318, 10, 22, "ControlSuggestions", CellTags->"DragLocators"], Cell[65997, 1405, 615, 14, 22, "ControlSuggestions", CellTags->"CreateAndDeleteLocators"], Cell[66615, 1421, 827, 21, 22, "ControlSuggestions", CellTags->"SliderZoom"], Cell[67445, 1444, 347, 8, 22, "ControlSuggestions", CellTags->"GamepadControls"], Cell[67795, 1454, 1442, 30, 22, "ControlSuggestions", CellTags->"AutomaticAnimation"], Cell[69240, 1486, 886, 20, 22, "ControlSuggestions", CellTags->"BookmarkAnimation"] }, Open ]], Cell[CellGroupData[{ Cell[70163, 1511, 30, 0, 152, "SearchTermsSection"], Cell[70196, 1513, 202, 4, 22, "SearchTerms", CellID->757394417], Cell[70401, 1519, 147, 3, 22, "SearchTerms", CellID->188329214], Cell[70551, 1524, 148, 3, 22, "SearchTerms", CellID->726094093] }, Open ]], Cell[CellGroupData[{ Cell[70736, 1532, 31, 0, 138, "RelatedLinksSection"], Cell[70770, 1534, 348, 8, 22, "RelatedLinks", CellID->388970707] }, Open ]], Cell[CellGroupData[{ Cell[71155, 1547, 25, 0, 136, "AuthorSection"], Cell[71183, 1549, 464, 13, 22, "Author"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)