Skip to main content

fish-env

A PettingZoo AEC environment for Fish, a six-player team card game of asking, deduction and calls, and the environment of the Fish benchmark.

  • Six agents, seat_0 to seat_5, in two teams of three.
  • Each agent observes only what its seat may know (its own hand, the public state and the most recent event) as 648 bits, with a mask over 913 actions.
  • Declaration windows after every event, decided by a seeded priority order between teams.
  • Deterministic: reset(seed=...) gives the same game every time, and every game can be saved as a record and replayed exactly.
  • Passes PettingZoo's own API and seed tests.
  • Agent memory for training: memory_env(remembered) puts the observations each agent had just after the events it remembers (all, the latest k, or none) in its infos.
import numpy as np
from fish_env import env

game = env()
game.reset(seed=42)
rng = np.random.default_rng(0)
for agent in game.agent_iter():
    observation, reward, terminated, truncated, info = game.last()
    if terminated or truncated:
        action = None
    else:
        action = int(rng.choice(np.flatnonzero(observation["action_mask"])))
    game.step(action)

With memory, each agent's infos holds what it remembers:

import numpy as np
from fish_env import memory_env

game = memory_env(remembered=8)  # each agent remembers the last 8 events; None for all
game.reset(seed=42)
rng = np.random.default_rng(0)
for agent in game.agent_iter():
    observation, reward, terminated, truncated, info = game.last()
    past = info["memory"]  # the observations just after the events it remembers: (n, 648)
    assert past.shape[0] <= 8
    if terminated or truncated:
        action = None
    else:
        action = int(rng.choice(np.flatnonzero(observation["action_mask"])))
    game.step(action)

Install with pip install fish-env (Python 3.14 or later). The rules engine is fish-rules; baseline agents are in fish-agents. The environment guide is in the repository.

Licensed under Apache-2.0.

Metadata

Release files for fish-env 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fish-env 0.2.0
File Size Uploaded Provenance Actions
fish_env-0.2.0.tar.gz 11.8 kB Without provenance Details for fish_env-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fish-env 0.2.0
File Interpreter ABI Platform Actions
fish_env-0.2.0-py3-none-any.whl Python 3 none any Details for fish_env-0.2.0-py3-none-any.whl

Total release size: 24.9 kB

Release files / fish_env-0.2.0.tar.gz

Download URL fish_env-0.2.0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
71a7a410312850240db8116ba95640a5f06f41a015f738c094e6de0b2836cf84
BLAKE2b-256 checksum
How to use checksums
0f86ca377aa34eb41642d5c260cd2a09dd3898b2aa2fd8f049757dbabfc0a4d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fish_env-0.2.0-py3-none-any.whl

Download URL fish_env-0.2.0-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d395d0a63f79b4191e6643063b39072f559d0b251c0961d13aa0b61b8fc08772
BLAKE2b-256 checksum
How to use checksums
bd3be346147d134e41310b44277968e2286d5553b560cd417221ea146c0bbe0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for fish-env 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page