Payoff matrix

From enfascination

Jump to: navigation, search
 
 
Line 1: Line 1:
:''Talk page moved from [[Template talk:2x2 game]]'' ~ [[User:Trialsanderrors|trialsanderrors]] 08:30, 15 November 2006 (UTC)
+
{| id="Payoff matrix" style="background:white; float: {{{Float|right}}}; clear:right; text-align:center;" align={{{Float|right}}} cellspacing=0 cellpadding=8 width={{{Width|225}}}
 +
|-
 +
|style="width:33%;                                                    "|
 +
|style="width:33%;                      border-bottom: solid black 1px;"| {{{2L|Left}}}
 +
|style="width:33%;                      border-bottom: solid black 1px;"| {{{2R|Right}}}
 +
|-
 +
|style="border-right:  solid black 1px; text-align: right;            "| {{{1U|Up}}}
 +
|style="border-right:  solid black 1px; border-bottom: solid black 1px; background:{{{ULc|white}}}; font-size:120%; "| {{{UL|0, 0}}}
 +
|style="border-right:  solid black 1px; border-bottom: solid black 1px; background:{{{URc|white}}}; font-size:120%; "| {{{UR|0, 0}}}
 +
|-
 +
|style="border-right:  solid black 1px; text-align: right;            "| {{{1D|Down}}}
 +
|style="border-right:  solid black 1px; border-bottom: solid black 1px; background:{{{DLc|white}}}; font-size:120%; "| {{{DL|0, 0}}}
 +
|style="border-right:  solid black 1px; border-bottom: solid black 1px; background:{{{DRc|white}}}; font-size:120%; "| {{{DR|0, 0}}}
 +
|-
 +
|style="font-size: 90%;" colspan=3 |''{{{Name|{{PAGENAME}}}}}''
 +
|}<noinclude>
  
{{GameTheoryProject|class=NA|importance=mid}}
+
This template allows simple construction of 2-player, 2-strategy [[Normal form game|payoff matrices]] in [[game theory]] and other articles.
  
==deliberating==
+
There are no required fields:
A couple of things I've been deliberating:
+
*<u>Strategies</u> '''1U''', '''1D''' default to "Up", "Down", '''2L''', '''2R''' to "Left", "Right".  
* Should the title of the game appear as a caption?
+
*<u>Cell payoffs</u> '''UL''', '''UR''', '''DL''', '''DR''' all default to "0, 0".
* Should [[payoff matrix]] appear somewhere in the template?
+
*The <u>Name</u> field defaults to the page name.
* Should the payoffs for both player appear in one field? (<tt>PayoffUL = 1, 2</tt>)
+
*The <u>Float</u> field defaults to "right", but can also be set to "left" or "none" (for inline use).
* Should the template be renamed "Template:Payoff matrix" to accommodate future expansion to 2x3 and 3x3 games?
+
*The <u>Width</u> field defaults to "225" pixels (cell widths: 75|75|75), but can also be set to other absolute or percentage values.
Any input is appreciated. ~ [[User:Trialsanderrors|trialsanderrors]] 00:42, 3 July 2006 (UTC)
+
 
+
:Hmm.  Here are my thought:
+
:* Caption: I don't think its needed.  I like the title above better and both would be redundant.
+
:* "Payoff matrix" I don't know about others, but I usually wikilink payoff matrix when talking about it in the article, so this shouldn't be necessary
+
:* Single field: This might not be a bad idea, it would enable other types of matrices (where only the row payoff is presented for instance, cf. [[Payoff matrix]]).
+
:* The only nxn game matrix we have is on [[Nash equilibrium]], I think.  So, it might be more work than necessary.  Perhaps we should only cross this bridge if we need to.
+
:None of my opinions are particularly strong, so if anyone has any strong opinions... --''best, kevin'' <b>[</b>[[User:Kzollman|kzollman]]<b>][</b>[[User talk:Kzollman|talk]]<b>]</b> 01:57, 3 July 2006 (UTC)
+
 
+
::I agree with Kevin here, except that I have a weak preference for payoff in separate fields.  That being said, I can see how this mucks up the row only matrices.  We can rename if (preferably when) we have NxM matrices.  Good stuff. [[User:Pete.Hurd|Pete.Hurd]] 02:40, 3 July 2006 (UTC)
+
:::Do you mean the bottom-left/top-right notation? I usually prefer that one for teaching, since it's more intuitive, but I saw various comments that it's not standard notation. In any case it's definitely codeable. I'd rather settle the name issue now before we start using it in too many articles. ~ [[User:Trialsanderrors|trialsanderrors]] 03:11, 3 July 2006 (UTC)
+
::::Yeah, bottom left\top right, I like that one best.  If it were any of the others, I wouldn't think it worth the effort. ...not that I'm saying row\column is necessarily either. [[User:Pete.Hurd|Pete.Hurd]] 06:03, 3 July 2006 (UTC)
+
:::::We might revisit abandoning bottom left/top right notation.  I think one of the initial concerns was that the code was very ugly, but with a template this problem disappears.  I'm pretty neutral on the two, personally.  --''best, kevin'' <b>[</b>[[User:Kzollman|kzollman]]<b>][</b>[[User talk:Kzollman|talk]]<b>]</b> 06:46, 3 July 2006 (UTC)
+
::::::I just tried it but ran into problems because CSS doesn't recognize valign commands, so we would have to create a workaround. ~ [[User:Trialsanderrors|trialsanderrors]] 06:49, 3 July 2006 (UTC)
+
:::::::What I did was create little tables inside of each cell.  So for example:
+
 
+
{|border=0 align=center
+
| || 1
+
|-
+
|1 ||
+
|}
+
  
:::::::Would be one cell. Hence, incredibly ugly code :) --''best, kevin'' <b>[</b>[[User:Kzollman|kzollman]]<b>][</b>[[User talk:Kzollman|talk]]<b>]</b> 07:00, 3 July 2006 (UTC)
+
Standard matrix format:
 +
<nowiki>{{</nowiki>Payoff matrix | Name =
 +
                | 2L =            | 2R =            |
 +
1U =            | UL =            | UR =            |
 +
1D =            | DL =            | DR =            |
 +
Float =        | Width =                          }}
  
::::::::Ahhhh, I'd pull the rip-cord on this and move on to more productive things, one field is good enough for rock & roll... my 2c. [[User:Pete.Hurd|Pete.Hurd]] 22:31, 3 July 2006 (UTC)
+
Default color for all cells is white. To color the cells, include [[Web colors|color labels]] (e.g. "silver" or "#C0C0C0") in the '''ULc''', '''URc''', '''DLc''' and '''DRc''' fields:
 +
ULc =      | URc =      | DLc =      | DRc =      |
  
==non-game theory use==
+
[[Category:Game templates|{{PAGENAME}}]]
I've added a non-game theory use for this template at [[Common good (economics)]] (another article on goods that should be merged). ~ [[User:Trialsanderrors|trialsanderrors]] 16:05, 4 July 2006 (UTC)
+
</noinclude>

Latest revision as of 00:10, 8 October 2009

Left Right
Up 0, 0 0, 0
Down 0, 0 0, 0
Payoff matrix

This template allows simple construction of 2-player, 2-strategy payoff matrices in game theory and other articles.

There are no required fields:

  • Strategies 1U, 1D default to "Up", "Down", 2L, 2R to "Left", "Right".
  • Cell payoffs UL, UR, DL, DR all default to "0, 0".
  • The Name field defaults to the page name.
  • The Float field defaults to "right", but can also be set to "left" or "none" (for inline use).
  • The Width field defaults to "225" pixels (cell widths: 75|75|75), but can also be set to other absolute or percentage values.

Standard matrix format:

{{Payoff matrix | Name =
                | 2L =            | 2R =            |
1U =            | UL =            | UR =            |
1D =            | DL =            | DR =            |
Float =         | Width =                           }}

Default color for all cells is white. To color the cells, include color labels (e.g. "silver" or "#C0C0C0") in the ULc, URc, DLc and DRc fields:

ULc =       | URc =       | DLc =       | DRc =       |