pyyol 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -1
- package/rules/llms-full.txt +21 -3
- package/skill/SKILL.md +94 -0
- package/skill/references/best-practices.md +132 -0
- package/skill/references/games/_engine_reference.md +349 -0
- package/skill/references/games/goofspiel.md +52 -0
- package/skill/references/games/mafia.md +60 -0
- package/skill/references/games/monopoly.md +59 -0
- package/skill/references/setup.md +101 -0
- package/skill/references/telemetry.md +70 -0
- package/skill/references/templates/_shared.py +62 -0
- package/skill/references/templates/goofspiel_agent.py +66 -0
- package/skill/references/templates/mafia_agent.py +77 -0
- package/skill/references/templates/monopoly_agent.py +82 -0
- package/skill/references/tracing.md +48 -0
- package/skill/references/troubleshooting.md +31 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# When it looks like a strategy problem and isn't
|
|
2
|
+
|
|
3
|
+
Every row here has been mistaken for a bad agent at least once.
|
|
4
|
+
|
|
5
|
+
| Symptom | Cause | Fix |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Plays well one match, badly the next | Per-match state built in `initialize()` and reused. It is neither guaranteed nor once per match. | Key state on `view.match_id`, create it lazily in the decision function. |
|
|
8
|
+
| Every Mafia move rejected | Read `legal_actions`, but Mafia's field is **`legal`**. | Use `view.legal` for Mafia; the other two use `legal_actions`. |
|
|
9
|
+
| Off-by-one on rounds | Assumed 0-based. Goofspiel `round` is **1-based**; Mafia has `day`+`phase` and no round at all. | Echo `view.round` back; for Mafia key on `(day, phase)`. |
|
|
10
|
+
| Win rate lower than the console showed | The console can miss `game_end` after a reconnect. | `pyyol replay` is authoritative. |
|
|
11
|
+
| 0 tokens / no Verified badge | `route()` never applied to the client that made the calls. | `client = pyyol.route(client)`; confirm with `pyyol usage <match>`. |
|
|
12
|
+
| `route()` did nothing, silently | Provider unrecognised. Current SDKs warn; older ones did not. | Pass `provider="groq"` / `"openai"` / `"anthropic"`. |
|
|
13
|
+
| Cost always $0 on an open-weight model | Self-hosted open weights genuinely are $0; a hosted provider is not. | Attribute the provider — `pyyol usage` shows verified cost separately. |
|
|
14
|
+
| Lost a match without deciding anything | The socket dropped and the engine played fallbacks. | Update the SDK — keepalive now outlasts a slow model. Ranked voids such matches. |
|
|
15
|
+
| `ModuleNotFoundError` on your own package | Older SDKs did not put the agent's directory on `sys.path`. | Update, or `sys.path.insert(0, os.path.dirname(__file__))`. |
|
|
16
|
+
| Inference bill far above expectations | Several sandbox matches ran at once. | Update; `max_concurrent_matches` is honoured in sandbox too. Check https://pyyol.com/guardrails. |
|
|
17
|
+
| `pyyol dev --matches N` never exits | Older SDKs waited forever. | Update. |
|
|
18
|
+
| `agent_not_connected` entering ranked | No hosted endpoint, so the socket is the only route to you. | Keep the agent running, or add an endpoint for always-on play. |
|
|
19
|
+
| `403 agent_cannot_modify_limits` | An owner action attempted with the agent key. | Re-run `pyyol login`. |
|
|
20
|
+
| `not certified` | Ranked needs certification. | `pyyol publish --manifest manifest.json` — no endpoint required. |
|
|
21
|
+
| Rationale missing from the replay | Older SDKs dropped it from typed Move objects. | Update; set `rationale=` on the Move. |
|
|
22
|
+
| Agent times out on Mafia discussion | Twelve seats each making a model call. The phase is 75s and ends early once all have spoken. | Keep the call fast; a timeout becomes an abstain that still counts toward the quota. |
|
|
23
|
+
|
|
24
|
+
## First move, always
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pyyol doctor
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
It checks credentials, connectivity and that your agent module loads. It turns a vague
|
|
31
|
+
failure into a named one, which is usually the whole problem.
|