Skip to content

Commit

Permalink
fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
benblack769 committed Sep 6, 2021
2 parents 139b2bd + 820b15f commit 561ed26
Show file tree
Hide file tree
Showing 159 changed files with 696 additions and 537 deletions.
5 changes: 5 additions & 0 deletions docs/atari/basketball_pong.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ basketball_pong_v2.env(num_players=2)

`num_players`: Number of players (must be either 2 or 4)

### Version History

* v2: No action timer (1.9.0)
* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
6 changes: 5 additions & 1 deletion docs/atari/boxing.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ that number and your opponent is penalized by that number.

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .

</div>
### Version History

* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
7 changes: 6 additions & 1 deletion docs/atari/combat_plane.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,9 @@ combat_plane_v1.env(game_version="jet", guided_missile=True)
`game_version`: Accepted arguments are "jet" or "bi-plane". Whether the plane is a bi-plane or a jet. (Jets move faster)

`guided_missile`: Whether the missile can be directed after being fired, or whether it is on a fixed path.
</div>

### Version History

* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
9 changes: 7 additions & 2 deletions docs/atari/combat_tank.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,17 @@ Some environment parameters are common to all Atari environments and are describ
Parameters specific to combat-tank are

```
combat_tank_v1.env(has_maze=False, is_invisible=False, billiard_hit=False)
combat_tank_v1.env(has_maze=True, is_invisible=False, billiard_hit=True)
```

`has_maze`: Set to true to have the map be a maze instead of an open field

`is_invisible`: If true, tanks are invisible unless they are firing or are running into a wall.

`billiard_hit`: If true, bullets bounce off walls, in fact, like billiards, they only count if they hit the opponent's tank after bouncing off a wall.
</div>

### Version History

* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
8 changes: 7 additions & 1 deletion docs/atari/double_dunk.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,10 @@ Scoring should be familiar to basketball fans (2-3 points per successful shot).
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v2: No action timer (1.9.0)
* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
8 changes: 7 additions & 1 deletion docs/atari/entombed_competitive.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,10 @@ Whenever your opponent dies, you get +1 reward, and your opponent gets -1 reward
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v2: Breaking changes to entire API, fixed Entombed rewards (1.4.0)
* v1: Fixes to how all environments handle premature death (1.3.0)
* v0: Initial versions release (1.0.0)
</div>
8 changes: 7 additions & 1 deletion docs/atari/entombed_cooperative.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,10 @@ The reward was designed to be identical to the single player rewards. In particu
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v2: Breaking changes to entire API, fixed Entombed rewards (1.4.0)
* v1: Fixes to how all environments handle premature death (1.3.0)
* v0: Initial versions release (1.0.0)
</div>
7 changes: 6 additions & 1 deletion docs/atari/flag_capture.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,9 @@ narrow down the location of the flag quickly and effectively.
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
8 changes: 7 additions & 1 deletion docs/atari/foozpong.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,10 @@ foozpong_v2.env(num_players=4)
```

`num_players`: Number of players (must be either 2 or 4)
</div>

### Version History

* v2: No action timer (1.9.0)
* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
7 changes: 6 additions & 1 deletion docs/atari/ice_hockey.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,9 @@ When you are on offense you must pass the puck between your two players (you con
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
8 changes: 7 additions & 1 deletion docs/atari/joust.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,10 @@ around 3000 points per wave.
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v2: Breaking changes to entire API (1.4.0)
* v1: Fixes to how all environments handle premature death (1.3.0)
* v0: Initial versions release (1.0.0)
</div>
8 changes: 7 additions & 1 deletion docs/atari/mario_bros.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,10 @@ There are other ways of earning points, by collecting bonus coins or wafers, ear
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v2: Breaking changes to entire API (1.4.0)
* v1: Fixes to how all environments handle premature death (1.3.0)
* v0: Initial versions release (1.0.0)
</div>
8 changes: 7 additions & 1 deletion docs/atari/maze_craze.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,10 @@ maze_craze.env(game_version="robbers", visibilty_level=0)
`game_version`: Possibilities are "robbers", "race", "capture", corresponding to the 3 game versions described above

`visibilty_level`: A number from 0-3. Set to 0 for 100% visible map, and 3 for 0% visibility map.
</div>

### Version History

* v2: Breaking changes to entire API (1.4.0)
* v1: Fixes to how all environments handle premature death (1.3.0)
* v0: Initial versions release (1.0.0)
</div>
8 changes: 7 additions & 1 deletion docs/atari/othello.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,10 @@ This is a timed game: if a player does not take a turn after 10 seconds, then th
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v2: Breaking changes to entire API (1.4.0)
* v1: Fixed othello auto reset issue (1.2.1)
* v0: Initial versions release (1.0.0)
</div>
8 changes: 7 additions & 1 deletion docs/atari/pong.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,10 @@ pong_v2.env(num_players=2)
```

`num_players`: Number of players (must be either 2 or 4)
</div>

### Version History

* v2: No action timer (1.9.0)
* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
9 changes: 8 additions & 1 deletion docs/atari/quadrapong.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,11 @@ Serves are timed: If the player does not serve within 2 seconds of receiving the
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v3: No action timer (1.9.0)
* v1: Breaking changes to entire API (1.4.0)
* v2: Fixed quadrapong rewards (1.2.0)
* v0: Initial versions release (1.0.0)
</div>
7 changes: 6 additions & 1 deletion docs/atari/space_invaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,9 @@ zigzaging_bombs=False, fast_bomb=False, invisible_invaders=False)

`invisible_invaders`: The invaders are invisible, making them more difficult to hit.

</div>

### Version History

* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
7 changes: 6 additions & 1 deletion docs/atari/space_war.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ Whenever you score a point, you are rewarded +1 and your opponent is penalized -
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
7 changes: 6 additions & 1 deletion docs/atari/surround.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,9 @@ But both players leave a trail of walls behind you, slowly filling the screen wi
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
8 changes: 7 additions & 1 deletion docs/atari/tennis.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@ Serves are timed: If the player does not serve within 3 seconds of receiving the
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v2: No action timer (1.9.0)
* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
9 changes: 8 additions & 1 deletion docs/atari/video_checkers.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,11 @@ This is a timed game: if a player does not take a turn after 10 seconds, then th
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v3: No action timer (1.9.0)
* v2: Fixed checkers rewards (1.5.0)
* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
8 changes: 7 additions & 1 deletion docs/atari/volleyball_pong.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,10 @@ volleyball_pong_v2.env(num_players=4)
```

`num_players`: Number of players (must be either 2 or 4)
</div>

### Version History

* v2: No action timer (1.9.0)
* v1: Breaking changes to entire API (1.4.0)
* v0: Initial versions release (1.0.0)
</div>
8 changes: 7 additions & 1 deletion docs/atari/warlords.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ When your fortress falls, you receive -1 reward and are done. If you are the las
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v2: Breaking changes to entire API (1.4.0)
* v1: Fixes to how all environments handle premature death (1.3.0)
* v0: Initial versions release (1.0.0)
</div>
8 changes: 7 additions & 1 deletion docs/atari/wizard_of_wor.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,10 @@ Note that in addition to the competitive aspect where you benefit from attacking
#### Environment parameters

Environment parameters are common to all Atari environments and are described in the [base Atari documentation](../atari) .
</div>

### Version History

* v2: Breaking changes to entire API (1.4.0)
* v1: Fixes to how all environments handle premature death (1.3.0)
* v0: Initial versions release (1.0.0)
</div>
3 changes: 2 additions & 1 deletion pettingzoo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pettingzoo.utils import AECEnv, ParallelEnv
import sys

from pettingzoo.utils import AECEnv, ParallelEnv

# Initializing pygame initializes audio connections through SDL. SDL uses alsa by default on all Linux systems
# SDL connecting to alsa frequently create these giant lists of warnings every time you import an environment using pygame
# DSP is far more benign (and should probably be the default in SDL anyways)
Expand Down
47 changes: 4 additions & 43 deletions pettingzoo/atari/__init__.py
Original file line number Diff line number Diff line change
@@ -1,44 +1,5 @@
from pettingzoo.utils.deprecated_module import DeprecatedModule
from pettingzoo.utils.deprecated_module import depricated_handler

basketball_pong_v0 = DeprecatedModule("basketball_pong", "v0", "v2")
basketball_pong_v1 = DeprecatedModule("basketball_pong", "v1", "v2")
boxing_v0 = DeprecatedModule("boxing", "v0", "v1")
combat_plane_v0 = DeprecatedModule("combat_plane", "v0", "v1")
combat_tank_v0 = DeprecatedModule("combat_tank", "v0", "v1")
double_dunk_v0 = DeprecatedModule("double_dunk", "v0", "v2")
double_dunk_v1 = DeprecatedModule("double_dunk", "v1", "v2")
entombed_competitive_v0 = DeprecatedModule("entombed_competitive", "v0", "v2")
entombed_competitive_v1 = DeprecatedModule("entombed_competitive", "v1", "v2")
entombed_cooperative_v0 = DeprecatedModule("entombed_cooperative", "v0", "v2")
entombed_cooperative_v1 = DeprecatedModule("entombed_cooperative", "v1", "v2")
flag_capture_v0 = DeprecatedModule("flag_capture", "v0", "v1")
foozpong_v0 = DeprecatedModule("foozpong", "v0", "v2")
foozpong_v1 = DeprecatedModule("foozpong", "v1", "v2")
ice_hockey_v0 = DeprecatedModule("ice_hockey", "v0", "v1")
joust_v0 = DeprecatedModule("joust", "v0", "v2")
joust_v1 = DeprecatedModule("joust", "v1", "v2")
mario_bros_v0 = DeprecatedModule("mario_bros", "v0", "v2")
mario_bros_v1 = DeprecatedModule("mario_bros", "v1", "v2")
maze_craze_v0 = DeprecatedModule("maze_craze", "v0", "v2")
maze_craze_v1 = DeprecatedModule("maze_craze", "v1", "v2")
othello_v0 = DeprecatedModule("othello", "v0", "v2")
othello_v1 = DeprecatedModule("othello", "v1", "v2")
pong_v0 = DeprecatedModule("pong", "v0", "v2")
pong_v1 = DeprecatedModule("pong", "v1", "v2")
quadrapong_v0 = DeprecatedModule("quadrapong", "v0", "v3")
quadrapong_v1 = DeprecatedModule("quadrapong", "v1", "v3")
quadrapong_v2 = DeprecatedModule("quadrapong", "v2", "v3")
space_invaders_v0 = DeprecatedModule("space_invaders", "v0", "v1")
space_war_v0 = DeprecatedModule("space_war", "v0", "v1")
surround_v0 = DeprecatedModule("surround", "v0", "v1")
tennis_v0 = DeprecatedModule("tennis", "v0", "v2")
tennis_v1 = DeprecatedModule("tennis", "v1", "v2")
video_checkers_v0 = DeprecatedModule("video_checkers", "v0", "v3")
video_checkers_v1 = DeprecatedModule("video_checkers", "v1", "v3")
video_checkers_v2 = DeprecatedModule("video_checkers", "v2", "v3")
volleyball_pong_v0 = DeprecatedModule("volleyball_pong", "v0", "v2")
volleyball_pong_v1 = DeprecatedModule("volleyball_pong", "v1", "v2")
warlords_v0 = DeprecatedModule("warlords", "v0", "v2")
warlords_v1 = DeprecatedModule("warlords", "v1", "v2")
wizard_of_wor_v0 = DeprecatedModule("wizard_of_wor", "v0", "v2")
wizard_of_wor_v1 = DeprecatedModule("wizard_of_wor", "v1", "v2")

def __getattr__(env_name):
return depricated_handler(env_name, __path__, __name__)
15 changes: 8 additions & 7 deletions pettingzoo/atari/base_atari_env.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import multi_agent_ale_py
from pathlib import Path
from pettingzoo import AECEnv

import gym
from gym.utils import seeding, EzPickle
from pettingzoo.utils import agent_selector, wrappers
from gym import spaces
import multi_agent_ale_py
import numpy as np
from pettingzoo.utils.conversions import from_parallel_wrapper
from pettingzoo.utils.conversions import parallel_wrapper_fn
from gym import spaces
from gym.utils import EzPickle, seeding

from pettingzoo import AECEnv
from pettingzoo.utils import agent_selector, wrappers
from pettingzoo.utils.conversions import from_parallel_wrapper, parallel_wrapper_fn
from pettingzoo.utils.env import ParallelEnv


Expand Down
3 changes: 2 additions & 1 deletion pettingzoo/atari/basketball_pong_v2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from .base_atari_env import BaseAtariEnv, base_env_wrapper_fn, parallel_wrapper_fn
import os

from .base_atari_env import BaseAtariEnv, base_env_wrapper_fn, parallel_wrapper_fn


def raw_env(num_players=2, **kwargs):
assert num_players == 2 or num_players == 4, "pong only supports 2 or 4 players"
Expand Down
Loading

0 comments on commit 561ed26

Please sign in to comment.