Rock Paper scissors environment for OpenAI Gym environment
Rock-paper-scissors environment is an implementation of the repeated game of rock-paper-scissors. Where the agents repeatedly play the normal form game of rock paper scissors.
The action set is common to all agents, and it contains three elements: [ROCK, PAPER, SCISSORS]
.
The normal form version of rock paper scissors does not have a state representation per se. However we can represent the state of a repeated game by keeping track of the actions taken by each player. If we only keep track of the last n
iterations of the game, we can say that we have a recall of n
. Let n
be an environment parameter, and let (a1t, a2t) be the action pair for both player 1 and 2 at timestep t. The state representation at time
At the initial stages of the game, when the full state vector has not been filled with actions, placeholder empty actions occupy the state.
Follows the classical rules of rock paper scissors. Rock beats scissors, scissors beats paper, paper beats rock. If both players take the same action, they both get get a reward of 0
.
cd gym-rock-paper-scissors
pip install -e .