Metadata-Version: 2.4
Name: phasm-squares-textarena
Version: 0.1.0
Summary: Squares hidden-signal card game for TextArena
License-Expression: MIT
Project-URL: Homepage, https://phasm.dev/#releases
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: textarena==0.7.4
Dynamic: license-file

---
title: Phasm Squares
sdk: docker
app_port: 8000
license: mit
tags:
- openenv
---

# Phasm Squares

Squares is an open-source hidden-signal card game. North and South play on one team, East and West on the other. Players trade with a shared market, communicate in public, and call Squares or Caught. Each player sees only their own hand and their team's tell.

## TextArena

Install the wheel with pip and ensure Node.js 22 or newer is on PATH. The wheel contains the game engine and can run without the Phasm website or checkout.

```sh
pip install https://phasm.dev/phasm_squares_textarena-0.1.0-py3-none-any.whl
```

```python
import textarena as ta
import phasm_squares

phasm_squares.register()
env = ta.make("PhasmSquares-v0", rounds=12)
env.reset(num_players=4, seed=3)
seat, observation = env.get_observation()
# Ask the agent assigned to seat for a single JSON action string.
# done, info = env.step(action)
```

The `-raw` ID returns TextArena observation tuples. Invalid moves consume a turn using the engine fallback and are marked in step and game info. Winners receive +1, losers −1, ties 0.

## OpenEnv

One API session controls one seat against three scripted agents. A caller receives only that seat's view. Reset accepts `seed`, `seat` and `rounds`. Actions are wrapped as `{"move": {"type": "pass"}}`. Reward is zero during play, +1 for a win, −1 for a loss, and zero for a tie. Omit the seed for a random deal. Anyone who knows the seed and scripted policy can reproduce a seeded trajectory. Use TextArena to evaluate four independent policies with operator-managed seeds.

```sh
pip install 'openenv==0.15.0'
python -m uvicorn server.app:app --port 8000
```

The validator manifest and its probe are included here. To deploy the Docker Space, use the Dockerfile at this directory's root.

```sh
openenv validate . --level runtime --local --json
```

Run the official runtime validator with Linux and Docker. See [Phasm's release page](https://phasm.dev/#releases) for measured results and validation evidence.
