This environment is part of the classic environments. Please read that page first for general information.
Name | Value |
---|---|
Actions | Discrete |
Agents | 2 |
Parallel API | Yes |
Manual Control | No |
Action Shape | Discrete(3) |
Action Values | Discrete(3) |
Observation Shape | Discrete(4) |
Observation Values | Discrete(4) |
Import | from pettingzoo.classic import rps_v1 |
Agents | agents= ['player_0', 'player_1'] |
Rock, Paper, Scissors is a 2-player hand game where each player chooses either rock, paper or scissors and reveals their choices simultaneously. If both players make the same choice, then it is a draw. However, if their choices are different, the winner is determined as follows: rock beats scissors, scissors beat paper, and paper beats rock.
The observation space is a scalar value with 4 possible values. Since both players reveal their choices at the same time, the observation is None until both players have acted. Therefore, 3 represents no action taken yet. Rock is represented with 0, paper with 1 and scissors with 2.
Value | Observation |
---|---|
0 | Rock |
1 | Paper |
2 | Scissors |
3 | None |
The action space is a scalar value with 3 possible values. The values are encoded as follows: Rock is 0, paper is 1 and scissors is 2.
Value | Action |
---|---|
0 | Rock |
1 | Paper |
2 | Scissors |
Winner | Loser |
---|---|
+1 | -1 |
If the game ends in a draw, both players will receive a reward of 0.