public final class FirstPlayerAdvantageGame extends Object implements TwoPlayerGame
Some games have a "first-mover advantage" - meaning the player that moves first has a greater chance of winning than the player that moves second. To avoid "first-mover advantage" causing players to be unfairly ranked, each pair plays each other twice - with each having the opportunity to move first.
Constructor and Description |
---|
FirstPlayerAdvantageGame(TwoPlayerGame twoPlayerGame)
Creates a
FirstPlayerAdvantageGame that uses the given TwoPlayerGame . |
Modifier and Type | Method and Description |
---|---|
double |
evaluate(Node player1,
Node player2)
Determines the outcome of the two specified players competing against each other.
|
public FirstPlayerAdvantageGame(TwoPlayerGame twoPlayerGame)
FirstPlayerAdvantageGame
that uses the given TwoPlayerGame
.public double evaluate(Node player1, Node player2)
TwoPlayerGame
evaluate
in interface TwoPlayerGame
player1
- represents the game-logic of a player participating in the gameplayer2
- represents the game-logic of the other player participating in the gameplayer1
, as implementations of TwoPlayerGame
represent zero-sum games then the
corresponding outcome for player2
can be determined by negating this valueOakGP Genetic Programming Framework