Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
14db264
Rotate images in KAZ
dm-ackerman Apr 21, 2025
3fb1c23
Fix arrow position bug in KAZ
dm-ackerman Apr 21, 2025
606a8e5
Update Zombie class in KAZ
dm-ackerman Apr 21, 2025
0b5dc3e
Remove unneeded data structures in KAZ
dm-ackerman Apr 21, 2025
226222e
remove pad_observation parameter in KAZ
dm-ackerman Apr 21, 2025
0e82470
Move ManualPolicy import in KAZ
dm-ackerman Apr 21, 2025
b3df40a
Remove duplicate code in KAZ
dm-ackerman Apr 21, 2025
3cd0ce4
Clearly define actions for KAZ
dm-ackerman Apr 21, 2025
f2bd13e
change update() -> act() in KAZ
dm-ackerman Apr 21, 2025
d4bcb3a
Revise termination code for KAZ
dm-ackerman Apr 21, 2025
a549897
Split KAZ observation function into two parts
dm-ackerman Apr 21, 2025
d14c16d
Remove redundant angle in KAZ players
dm-ackerman Apr 22, 2025
70e91f6
Change alive -> is_alive in KAZ
dm-ackerman Apr 22, 2025
4f01f3b
Add base class for weapons in KAZ
dm-ackerman Apr 22, 2025
e6a29ba
Updated Player,Knight,Archer in KAZ
dm-ackerman Apr 22, 2025
81022da
Add type hints to KAZ
dm-ackerman Apr 22, 2025
2dfecaa
Simplify KAZ input arguments
dm-ackerman Apr 22, 2025
604dfae
Move KAZ space generation to separate function
dm-ackerman Apr 22, 2025
78f68d0
Use a single background image in KAZ
dm-ackerman Apr 23, 2025
2bee361
Remove redundant agent_name_mapping from KAZ
dm-ackerman Apr 24, 2025
7ed73c9
Move KAZ space creation to own functions
dm-ackerman Apr 24, 2025
d4b5799
Use dict comprehension in KAZ
dm-ackerman Apr 24, 2025
a759b44
Move KAZ screen creation to own function
dm-ackerman Apr 24, 2025
e8736d2
Change KAZ state calculation, but not result
dm-ackerman Apr 24, 2025
1ce6e72
Confirm KAZ render_mode value is supported.
dm-ackerman Apr 24, 2025
a5a6271
Add TypeAlias for KAZ observations
dm-ackerman Apr 24, 2025
56c7c8a
Make KAZ objects track their own masked state
dm-ackerman Apr 24, 2025
8c5b732
Combine archer and knight into one list in KAZ
dm-ackerman Apr 25, 2025
18b48ce
Combine weapon actions in KAZ
dm-ackerman Apr 25, 2025
327d0b9
Combine KAZ zombie actions into single function
dm-ackerman Apr 25, 2025
6bcb717
Add function to remove player in KAZ
dm-ackerman Apr 25, 2025
6c470a1
Keep arrows when archer is killed in KAZ
dm-ackerman Apr 25, 2025
40b214a
Make objects return vector state with typemask
dm-ackerman Apr 25, 2025
dca2a58
Move attack and timeout logic to Player classes
dm-ackerman Apr 25, 2025
0df68df
Fix misc style issues in KAZ
dm-ackerman Apr 25, 2025
18ba65f
Use Inteval for KAZ Zombie wobble
dm-ackerman Apr 25, 2025
0df3dc4
Update kaz vector state to match docs
dm-ackerman Apr 28, 2025
557f8f8
remove unused KAZ code
dm-ackerman Apr 28, 2025
113f792
clean up kaz state code and fix to match docs
dm-ackerman Apr 28, 2025
55ce075
In KAZ, change 'spawn_rate' to 'spawn_delay'.
dm-ackerman Apr 29, 2025
b508951
Add KAZ state types
dm-ackerman Apr 29, 2025
abd3af1
Change KAZ screen handling
dm-ackerman Apr 29, 2025
5bfe12f
Fix types in KAZ Zombie
dm-ackerman Apr 29, 2025
8229a46
Remove KAZ manual control docs - they are wrong
dm-ackerman Apr 29, 2025
6af57aa
Update KAZ docs
dm-ackerman Apr 29, 2025
39f0c67
Clean up confusing KAZ render return
dm-ackerman Apr 29, 2025
ea2d627
Add/remove __future__.annotations from KAZ
dm-ackerman Apr 29, 2025
1174eb9
Fix KAZ type checks
dm-ackerman Apr 30, 2025
4a0a1c7
Add tests for Knights,Archers,Zombies
dm-ackerman Apr 30, 2025
b4f23bb
Update tests for new KAZ parameters
dm-ackerman Apr 30, 2025
2a52225
Fix bounds on KAZ agent movement
dm-ackerman Apr 30, 2025
98fe0ec
Fix zombie limits and end condition
dm-ackerman Apr 30, 2025
e66083c
Bump KAZ version to 11
dm-ackerman Apr 30, 2025
943b00a
fix constants that were messed up in rebase
dm-ackerman Apr 30, 2025
4485e93
Fix python 3.9 issue
dm-ackerman Apr 30, 2025
e5b84cf
update KAZ tutorial to v11
dm-ackerman Apr 30, 2025
4a72328
Merge branch 'master' into kaz_update
dm-ackerman Apr 30, 2025
5f9d5b9
Remove ill-advised window hiding
dm-ackerman Apr 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/api/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ Where `max_episodes` and `max_steps` both limit the total number of evaluations
[//]: # ()
[//]: # (``` python)

[//]: # (from pettingzoo.butterfly knights_archers_zombies_v10)
[//]: # (from pettingzoo.butterfly knights_archers_zombies_v11)

[//]: # (knights_archers_zombies_v10.manual_control&#40;<environment parameters>&#41;)
[//]: # (knights_archers_zombies_v11.manual_control&#40;<environment parameters>&#41;)

[//]: # (```)

Expand Down Expand Up @@ -80,15 +80,15 @@ Where `max_episodes` and `max_steps` both limit the total number of evaluations

[//]: # (import time)

[//]: # (from pettingzoo.butterfly import knights_archers_zombies_v10)
[//]: # (from pettingzoo.butterfly import knights_archers_zombies_v11)

[//]: # ()
[//]: # (env = knights_archers_zombies_v10.env&#40;&#41;)
[//]: # (env = knights_archers_zombies_v11.env&#40;&#41;)

[//]: # (env.reset&#40;&#41;)

[//]: # ()
[//]: # (manual_policy = knights_archers_zombies_v10.ManualPolicy&#40;env&#41;)
[//]: # (manual_policy = knights_archers_zombies_v11.ManualPolicy&#40;env&#41;)

[//]: # ()
[//]: # (for agent in env.agent_iter&#40;&#41;:)
Expand Down
6 changes: 3 additions & 3 deletions docs/content/basic_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ When an agent is terminated or truncated, it's removed from `agents`, so when th
If you have a wrapped environment, and you want to get the unwrapped environment underneath all the layers of wrappers (so that you can manually call a function or change some underlying aspect of the environment), you can use the `.unwrapped` attribute. If the environment is already a base environment, the `.unwrapped` attribute will just return itself.

``` python
from pettingzoo.butterfly import knights_archers_zombies_v10
from pettingzoo.butterfly import knights_archers_zombies_v11

base_env = knights_archers_zombies_v10.env().unwrapped
base_env = knights_archers_zombies_v11.env().unwrapped
```

### Variable Numbers of Agents (Death)
Expand All @@ -149,5 +149,5 @@ Environments are by default wrapped in a handful of lightweight wrappers that ha

``` python
environment_parameters = {} # any parameters to pass to the environment
env = knights_archers_zombies_v10.raw_env(**environment_parameters)
env = knights_archers_zombies_v11.raw_env(**environment_parameters)
```
6 changes: 3 additions & 3 deletions docs/content/environment_creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ The DeprecatedModule is used in PettingZoo to help guide the user away from old
For example, when the user tries to import the `knights_archers_zombies_v0` environment, they import the following variable (defined in `pettingzoo/butterfly/__init__.py`):
``` python
from pettingzoo.utils.deprecated_module import DeprecatedModule
knights_archers_zombies_v0 = DeprecatedModule("knights_archers_zombies", "v0", "v10")
knights_archers_zombies_v0 = DeprecatedModule("knights_archers_zombies", "v0", "v11")
```
This declaration tells the user that `knights_archers_zombies_v0` is deprecated and `knights_archers_zombies_v10` should be used instead. In particular, it gives the following error:
This declaration tells the user that `knights_archers_zombies_v0` is deprecated and `knights_archers_zombies_v11` should be used instead. In particular, it gives the following error:
``` python notest
from pettingzoo.butterfly import knights_archers_zombies_v0
knights_archers_zombies_v0.env()
# pettingzoo.utils.deprecated_module.DeprecatedEnv: knights_archers_zombies_v0 is now deprecated, use knights_archers_zombies_v10 instead
# pettingzoo.utils.deprecated_module.DeprecatedEnv: knights_archers_zombies_v0 is now deprecated, use knights_archers_zombies_v11 instead
```
6 changes: 3 additions & 3 deletions docs/environments/butterfly.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ env.close()
To launch a [Knights Archers Zombies](/environments/butterfly/knights_archers_zombies/) environment with interactive user input (see [manual_policy.py](https://github.com/Farama-Foundation/PettingZoo/blob/master/pettingzoo/butterfly/knights_archers_zombies/manual_policy.py)):
```python
import pygame
from pettingzoo.butterfly import knights_archers_zombies_v10
from pettingzoo.butterfly import knights_archers_zombies_v11

env = knights_archers_zombies_v10.env(render_mode="human")
env = knights_archers_zombies_v11.env(render_mode="human")
env.reset(seed=42)

manual_policy = knights_archers_zombies_v10.ManualPolicy(env)
manual_policy = knights_archers_zombies_v11.ManualPolicy(env)

for agent in env.agent_iter():
observation, reward, termination, truncation, info = env.last()
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ The [AEC API](/api/aec/) supports sequential turn based environments, while the
Environments can be interacted with using a similar interface to [Gymnasium](https://gymnasium.farama.org):

```python
from pettingzoo.butterfly import knights_archers_zombies_v10
env = knights_archers_zombies_v10.env(render_mode="human")
from pettingzoo.butterfly import knights_archers_zombies_v11
env = knights_archers_zombies_v11.env(render_mode="human")
env.reset(seed=42)

for agent in env.agent_iter():
Expand Down
4 changes: 2 additions & 2 deletions pettingzoo/butterfly/all_modules.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from pettingzoo.butterfly import (
cooperative_pong_v5,
knights_archers_zombies_v10,
knights_archers_zombies_v11,
pistonball_v6,
)

butterfly_environments = {
"butterfly/knights_archers_zombies_v10": knights_archers_zombies_v10,
"butterfly/knights_archers_zombies_v11": knights_archers_zombies_v11,
"butterfly/pistonball_v6": pistonball_v6,
"butterfly/cooperative_pong_v5": cooperative_pong_v5,
}
Binary file modified pettingzoo/butterfly/knights_archers_zombies/img/archer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified pettingzoo/butterfly/knights_archers_zombies/img/knight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading