Skip to content

Commit

Permalink
bumped kaz, prison, battlfield versions
Browse files Browse the repository at this point in the history
  • Loading branch information
benblack769 committed Mar 5, 2022
1 parent 988e240 commit 1cf919f
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 49 deletions.
4 changes: 2 additions & 2 deletions docs/_includes/services.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ <h4 class="service-heading">{{ service.title | markdownify }}</h4>
<div class="service-code">
<pre>
<code>
from pettingzoo.butterfly import knights_archers_zombies_v8
env = knights_archers_zombies_v8.env()
from pettingzoo.butterfly import knights_archers_zombies_v9
env = knights_archers_zombies_v9.env()
env.reset()
for agent in env.agent_iter():
observation, reward, done, info = env.last()
Expand Down
10 changes: 5 additions & 5 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ Where `max_episodes` and `max_steps` both limit the total number of evaluations
Often, you want to be able to play before trying to learn it to get a better feel for it. Some of our games directly support this:

``` python
from pettingzoo.butterfly import prison_v3
prison_v3.manual_control(<environment parameters>)
from pettingzoo.butterfly import prison_v4
prison_v4.manual_control(<environment parameters>)
```

Environments say if they support this functionality in their documentation, and what the specific controls are.
Expand All @@ -201,12 +201,12 @@ Some games support this via:

``` python
import time
from pettingzoo.butterfly import knights_archers_zombies_v8
from pettingzoo.butterfly import knights_archers_zombies_v9

env = knights_archers_zombies_v8.env()
env = knights_archers_zombies_v9.env()
env.reset()

manual_policy = knights_archers_zombies_v8.ManualPolicy(env)
manual_policy = knights_archers_zombies_v9.ManualPolicy(env)

for agent in env.agent_iter():
observation, reward, done, info = env.last()
Expand Down
5 changes: 3 additions & 2 deletions docs/butterfly/knights_archers_zombies.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ observation-values: "(0, 255)"
state-shape: "(720, 1280, 3)"
state-values: "(0, 255)"
average-total-reward: "2.95"
import: "from pettingzoo.butterfly import knights_archers_zombies_v8"
import: "from pettingzoo.butterfly import knights_archers_zombies_v9"
agent-labels: "agents= ['archer_0', 'archer_1', 'knight_0', 'knight_1']"
---

Expand Down Expand Up @@ -43,7 +43,7 @@ Press 'M' key to spawn a new knight.
### Arguments

``` python
knights_archers_zombies_v8.env(spawn_rate=20, num_knights=2, num_archers=2,
knights_archers_zombies_v9.env(spawn_rate=20, num_knights=2, num_archers=2,
killable_knights=True, killable_archers=True, line_death=True, pad_observation=True,
max_cycles=900)
```
Expand All @@ -66,6 +66,7 @@ max_cycles=900)

### Version History

* v9: Code rewrite and numerous fixes (1.16.0)
* v8: Code cleanup and several bug fixes (1.14.0)
* v7: Minor bug fix relating to end of episode crash (1.6.0)
* v6: Fixed reward structure (1.5.2)
Expand Down
7 changes: 4 additions & 3 deletions docs/butterfly/prison.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ observation-values: "(0, 255) or (-300, 300)"
state-shape: "(650, 750, 3)"
state-values: "(0, 255)"
average-total-reward: "2.77"
import: "from pettingzoo.butterfly import prison_v3"
import: "from pettingzoo.butterfly import prison_v4"
agent-labels: "agents= ['prisoner_0', 'prisoner_1', ..., 'prisoner_7']"
---

Expand Down Expand Up @@ -39,7 +39,7 @@ Select different aliens with 'W', 'A', 'S' or 'D'. Move the selected alien left
### Arguments

``` python
prison_v3.env(vector_observation=False, continuous=False, synchronized_start=False,
prison_v4.env(vector_observation=False, continuous=False, synchronized_start=False,
identical_aliens=False, max_cycles=150, num_floors=4, random_aliens=False)
```

Expand All @@ -61,8 +61,9 @@ identical_aliens=False, max_cycles=150, num_floors=4, random_aliens=False)

### Version History

* v4: Fixed state() space (1.16.0)
* v3: Changed default argument for `max_cycles` (1.6.0)
* v2: Misc fixes, bumped PyGame and PyMunk version (1.4.0)
* v1: Fix to continuous mode (1.0.1)
* v0: Initial versions release (1.0.0)
</div>
</div>
2 changes: 1 addition & 1 deletion docs/magent/battlefield.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ observation-shape: "(13,13,5)"
observation-values: "[0,2]"
state-shape: "(80, 80, 5)"
state-values: "(0, 2)"
import: "from pettingzoo.magent import battlefield_v3"
import: "from pettingzoo.magent import battlefield_v4"
agent-labels: "agents= [red_[0-11], blue_[0-11]]"
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class raw_env(AECEnv, EzPickle):

metadata = {
"render.modes": ["human", "rgb_array"],
"name": "knights_archers_zombies_v8",
"name": "knights_archers_zombies_v9",
"is_parallelizable": True,
"video.frames_per_second": const.FPS,
}
Expand Down
6 changes: 3 additions & 3 deletions pettingzoo/butterfly/knights_archers_zombies/manual_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ def available_agents(self):


if __name__ == "__main__":
from pettingzoo.butterfly import knights_archers_zombies_v8
from pettingzoo.butterfly import knights_archers_zombies_v9

clock = pygame.time.Clock()

env = knights_archers_zombies_v8.env()
env = knights_archers_zombies_v9.env()
env.reset()

manual_policy = knights_archers_zombies_v8.ManualPolicy(env)
manual_policy = knights_archers_zombies_v9.ManualPolicy(env)

for agent in env.agent_iter():
clock.tick(env.metadata['video.frames_per_second'])
Expand Down
2 changes: 1 addition & 1 deletion pettingzoo/butterfly/prison/prison.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __init__(self, continuous=False, vector_observation=False, max_cycles=150, n
self.sprite_img_heights = [40, 40, 46, 48, 32, 54, 48, 53]
self.metadata = {
'render.modes': ['human', "rgb_array"],
'name': "prison_v3",
'name': "prison_v4",
'is_parallelizable': True,
'video.frames_per_second': FPS,
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def raw_env(map_size=default_map_size, max_cycles=max_cycles_default, minimap_mo
class _parallel_env(magent_parallel_env, EzPickle):
metadata = {
"render.modes": ["human", "rgb_array"],
'name': "battlefield_v3",
'name': "battlefield_v4",
"video.frames_per_second": 5,
}

Expand Down
12 changes: 6 additions & 6 deletions test/all_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@
from pettingzoo.classic import hanabi_v4
from pettingzoo.classic import backgammon_v3

from pettingzoo.butterfly import knights_archers_zombies_v8
from pettingzoo.butterfly import knights_archers_zombies_v9
from pettingzoo.butterfly import pistonball_v6
from pettingzoo.butterfly import cooperative_pong_v5
from pettingzoo.butterfly import prison_v3
from pettingzoo.butterfly import prison_v4
from pettingzoo.butterfly import prospector_v4

from pettingzoo.magent import battle_v3
from pettingzoo.magent import adversarial_pursuit_v3
from pettingzoo.magent import gather_v4
from pettingzoo.magent import combined_arms_v5
from pettingzoo.magent import tiger_deer_v3
from pettingzoo.magent import battlefield_v3
from pettingzoo.magent import battlefield_v4

from pettingzoo.mpe import simple_adversary_v2
from pettingzoo.mpe import simple_crypto_v2
Expand Down Expand Up @@ -119,15 +119,15 @@
"classic/hanabi_v4": hanabi_v4,
"classic/backgammon_v3": backgammon_v3,

"butterfly/knights_archers_zombies_v8": knights_archers_zombies_v8,
"butterfly/knights_archers_zombies_v9": knights_archers_zombies_v9,
"butterfly/pistonball_v6": pistonball_v6,
"butterfly/cooperative_pong_v5": cooperative_pong_v5,
"butterfly/prison_v3": prison_v3,
"butterfly/prison_v4": prison_v4,
"butterfly/prospector_v4": prospector_v4,

"magent/adversarial_pursuit_v3": adversarial_pursuit_v3,
"magent/battle_v3": battle_v3,
"magent/battlefield_v3": battlefield_v3,
"magent/battlefield_v4": battlefield_v4,
"magent/combined_arms_v5": combined_arms_v5,
"magent/gather_v4": gather_v4,
"magent/tiger_deer_v3": tiger_deer_v3,
Expand Down
48 changes: 24 additions & 24 deletions test/all_parameter_combs.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,32 @@
(texas_holdem_no_limit_v6, dict(num_players=3)),
(texas_holdem_no_limit_v6, dict(num_players=4)),

(knights_archers_zombies_v8, dict(spawn_rate=50)),
(knights_archers_zombies_v8, dict(num_knights=4, num_archers=5)),
(knights_archers_zombies_v8, dict(killable_knights=True, killable_archers=True)),
(knights_archers_zombies_v8, dict(killable_knights=False, killable_archers=False)),
(knights_archers_zombies_v8, dict(line_death=False)),
(knights_archers_zombies_v8, dict(pad_observation=False)),
(knights_archers_zombies_v8, dict(max_cycles=100)),
(knights_archers_zombies_v9, dict(spawn_rate=50)),
(knights_archers_zombies_v9, dict(num_knights=4, num_archers=5)),
(knights_archers_zombies_v9, dict(killable_knights=True, killable_archers=True)),
(knights_archers_zombies_v9, dict(killable_knights=False, killable_archers=False)),
(knights_archers_zombies_v9, dict(line_death=False)),
(knights_archers_zombies_v9, dict(pad_observation=False)),
(knights_archers_zombies_v9, dict(max_cycles=100)),

(pistonball_v6, dict(continuous=True)),
(pistonball_v6, dict(n_pistons=30)),
(pistonball_v6, dict(continuous=False)),
(pistonball_v6, dict(random_drop=True, random_rotate=True)),
(pistonball_v6, dict(random_drop=False, random_rotate=False)),

(prison_v3, dict(continuous=True)),
(prison_v3, dict(continuous=False)),
(prison_v3, dict(vector_observation=True)),
(prison_v3, dict(vector_observation=False)),
(prison_v3, dict(num_floors=1)),
(prison_v3, dict(num_floors=5)),
(prison_v3, dict(synchronized_start=True)),
(prison_v3, dict(synchronized_start=False)),
(prison_v3, dict(identical_aliens=True)),
(prison_v3, dict(identical_aliens=False)),
(prison_v3, dict(random_aliens=True)),
(prison_v3, dict(random_aliens=False)),
(prison_v4, dict(continuous=True)),
(prison_v4, dict(continuous=False)),
(prison_v4, dict(vector_observation=True)),
(prison_v4, dict(vector_observation=False)),
(prison_v4, dict(num_floors=1)),
(prison_v4, dict(num_floors=5)),
(prison_v4, dict(synchronized_start=True)),
(prison_v4, dict(synchronized_start=False)),
(prison_v4, dict(identical_aliens=True)),
(prison_v4, dict(identical_aliens=False)),
(prison_v4, dict(random_aliens=True)),
(prison_v4, dict(random_aliens=False)),

(prospector_v4, dict(ind_reward=0.8, group_reward=0.1, other_group_reward=0.1,
prospec_find_gold_reward=1, prospec_handoff_gold_reward=1, banker_receive_gold_reward=1,
Expand All @@ -90,13 +90,13 @@

(tiger_deer_v3, dict(minimap_mode=True)),
(battle_v3, dict(minimap_mode=False)),
(battlefield_v3, dict(minimap_mode=False, extra_features=False)),
(battlefield_v3, dict(minimap_mode=False, extra_features=True)),
(battlefield_v3, dict(minimap_mode=True, extra_features=False)),
(battlefield_v3, dict(minimap_mode=True, extra_features=True)),
(battlefield_v4, dict(minimap_mode=False, extra_features=False)),
(battlefield_v4, dict(minimap_mode=False, extra_features=True)),
(battlefield_v4, dict(minimap_mode=True, extra_features=False)),
(battlefield_v4, dict(minimap_mode=True, extra_features=True)),
(adversarial_pursuit_v3, dict(map_size=15)),
(battle_v3, dict(map_size=15)),
(battlefield_v3, dict(map_size=46)),
(battlefield_v4, dict(map_size=46)),
(combined_arms_v5, dict(map_size=16)),
(tiger_deer_v3, dict(map_size=15)),

Expand Down

0 comments on commit 1cf919f

Please sign in to comment.