Rock Paper Scissors
This environment is part of the Classic environments. Please read that page first for general information.
Possible Agents |
(‘0’, ‘1’) |
Action Spaces |
{‘0’: Discrete(3), ‘1’: Discrete(3)} |
Observation Spaces |
{‘0’: Discrete(3), ‘1’: Discrete(3)} |
Symmetric |
True |
Import |
|
The Rock Paper Scissors Environment.
This is the classic game of rock, paper, scissors (RPS).
This scenario involves two agents. Each step both agents choose an action out of ‘ROCK’, ‘PAPER’ or ‘SCISSORS’ and are rewarded based on the actions taken in comparison to their opponent.
Possible Agents
The environment supports two agents: ‘0’ and ‘1’. Both agents are always active in the environment.
State Space
There is only a single state in RPS: state 0.
Action Space
Both agents have three available actions: ROCK=0, PAPER=1, SCISSORS=2.
Observation Space
Agents observe the last action played by their opponent: ROCK=0, PAPER=1,
SCISSORS=2
Rewards
Agents are rewarded based on the following pay-off matrix (shows pay-off for row agent):
ROCK |
PAPER |
SCISSORS |
|
|---|---|---|---|
ROCK |
0 |
-1 |
1 |
PAPER |
1 |
0 |
-1 |
SCISSORS |
-1 |
1 |
0 |
Dynamics
There is only a single state so the transition function is the identity function.
Starting State
There is only a single state, which the environment always starts and remains in.
Episode End
By default episodes continue infinitely long. To set a step limit, specify
max_episode_steps when initializing the environment with posggym.make.
Arguments
No additional arguments are currently supported during construction.
Version History
v0: Initial version