Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symmetric two-player normal form games #5

Open
oyamad opened this issue Mar 17, 2016 · 1 comment
Open

Symmetric two-player normal form games #5

oyamad opened this issue Mar 17, 2016 · 1 comment

Comments

@oyamad
Copy link
Member

oyamad commented Mar 17, 2016

Should we have a specialized constructor, say normal_form_game_sym_2p, for symmetric NormalFormGame with two players?

It replaces this:

function normal_form_game_sym_2p{T<:Real}(payoff_matrix::Matrix{T})
    n, m = size(payoff_matrix)
    n != m && throw(ArgumentError(
        "symmetric two-player game must be represented by a square matrix"
    ))
    player = Player(payoff_matrix)
    return NormalFormGame(player, player)
end

This will resolve the type instability issue #2 (comment).

@oyamad
Copy link
Member Author

oyamad commented Jun 10, 2016

Should we add a NormalFormGameSym2p type?

type NormalFormGameSym2p{T<:Real}
    player::Player{2,T}  # player.payoff_array must be square
    num_actions::Int
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant