Skip to content

Commit 8cf98f6

Browse files
amcheste-ai-agentclaude
authored andcommitted
Add standard project documentation files
Six adds + one edit to bring the repo's project files up to the standard expected for a research codebase that external researchers might fork or cite. Nothing in this PR affects code paths. CITATION.cff Schema-compliant citation metadata. Drives GitHub's "Cite this repository" sidebar widget and APA / BibTeX / RIS exports. CONTRIBUTING.md Scope policy (in / out of scope), branch and commit conventions, test-suite expectations, code style, reproducibility expectations (seed_utils, eval.py, compute_ledger), reporting bug template pointers. Codifies the workflow we've been using on PRs #21#31. .github/PULL_REQUEST_TEMPLATE.md Forces every PR to include Summary, Linked issues, Test plan, Reproducibility considerations, Out of scope. Reproducibility section calls out research-relevant code paths explicitly. .github/ISSUE_TEMPLATE/{bug_report,feature_request}.md + config.yml Two opinionated templates plus a config that disables blank issues and routes general questions to Discussions. Bug template prompts for env / dep versions and W&B run URLs; feature template includes a scope check against the pre-registered analysis plan. .editorconfig Whitespace and indent conventions per file type. Standard for cross-editor consistency; reduces churn from contributors using different IDEs. DEVELOPER_GUIDE.md Refresh Project Overview opening to frame this as the research codebase backing the 3-paper cascade rather than a generic toolkit. Update directory structure to include analysis/, alerts.py, event_flags.py, scripts/, paper/, bin/, configs/, docs/. Add a Research Apparatus section after CLI architecture covering the analysis layer, monitoring callbacks, alerting system, Streamlit dashboards, pilot grid launcher, and Overleaf integration. No changes to existing accurate sections. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ded1f1e commit 8cf98f6

8 files changed

Lines changed: 469 additions & 22 deletions

File tree

.editorconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Editor and IDE conventions for this project.
2+
# See https://editorconfig.org/ — most editors auto-detect.
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
indent_style = space
12+
indent_size = 4
13+
14+
[*.{md,markdown}]
15+
# Markdown is whitespace-sensitive (trailing two spaces = hard line break)
16+
trim_trailing_whitespace = false
17+
18+
[{*.yml,*.yaml,*.json,*.toml}]
19+
indent_size = 2
20+
21+
[Makefile]
22+
indent_style = tab
23+
24+
[*.{sh,bash}]
25+
indent_size = 2
26+
27+
[*.tex]
28+
indent_size = 2
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Bug report
3+
about: Something doesn't work the way you expected
4+
title: "[Bug] "
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Description
10+
11+
<!-- What did you expect to happen? What actually happened? -->
12+
13+
## Reproduction
14+
15+
<!-- Smallest possible script / command sequence that reproduces the
16+
bug. If it only reproduces under specific data, attach a
17+
minimal snapshot or paste the relevant config. -->
18+
19+
```
20+
# command(s) you ran
21+
```
22+
23+
## Environment
24+
25+
- Python version:
26+
- Project version (or git SHA):
27+
- OS:
28+
- Key dependency versions (run `pip show pyboy stable_baselines3 sb3-contrib gymnasium torch` and paste):
29+
30+
## Logs
31+
32+
<!-- For training crashes, paste the relevant section of the log
33+
and (if applicable) the W&B run URL. -->
34+
35+
```
36+
```
37+
38+
## Additional context
39+
40+
<!-- Anything else worth knowing — recent changes, multi-process setup,
41+
non-standard hardware, etc. -->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Disable blank issues — force users through a template so we get
2+
# actionable bug reports instead of "it doesn't work" one-liners.
3+
blank_issues_enabled: false
4+
5+
contact_links:
6+
- name: Question or discussion
7+
url: https://github.com/amcheste/pokemon-red-ai/discussions
8+
about: For research questions, design discussion, or anything that's
9+
not a clear bug or feature request, please use Discussions.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Feature request
3+
about: Propose a new feature or enhancement
4+
title: "[Feature] "
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Problem
10+
11+
<!-- What problem are you trying to solve? Be specific — "training is
12+
slow" is harder to act on than "PyBoy stepping is the bottleneck
13+
in profiling, accounting for 80% of wall clock". -->
14+
15+
## Proposed solution
16+
17+
<!-- What you'd like to see, at whatever level of detail you have. -->
18+
19+
## Alternatives considered
20+
21+
<!-- Other ways this problem could be solved, and why you prefer the
22+
proposed solution. -->
23+
24+
## Scope check
25+
26+
<!-- Does this fit within the project's research scope? See
27+
CONTRIBUTING.md. Quick checklist: -->
28+
29+
- [ ] Doesn't change the pre-registered analysis plan
30+
- [ ] Doesn't change the 18 pre-registered event flags
31+
- [ ] Doesn't break reproducibility of completed runs
32+
33+
If any of the above are unchecked, please explain in the proposal.
34+
35+
## Additional context
36+
37+
<!-- Links to related work, blog posts, papers, etc. -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!--
2+
Thanks for opening a PR! Fill in the sections below — leave any
3+
heading present but write "n/a" if a section doesn't apply. See
4+
CONTRIBUTING.md for branch / commit / scope conventions.
5+
-->
6+
7+
## Summary
8+
9+
<!-- 1-3 bullet points describing what this PR does and why. -->
10+
11+
-
12+
13+
## Linked issues
14+
15+
<!-- Link any Linear issues (AMC-NN) or GitHub issues this resolves.
16+
Use "Closes #123" / "Fixes AMC-67" syntax for auto-close. -->
17+
18+
## Test plan
19+
20+
<!-- Concrete checklist of what you've verified. -->
21+
22+
- [ ]
23+
- [ ]
24+
25+
## Reproducibility considerations
26+
27+
<!-- Required only for changes that touch:
28+
* pokemon_red_ai/environment/ (env / reward / observation)
29+
* pokemon_red_ai/training/ (callbacks, models, trainer)
30+
* scripts/{train,eval,analyze}.py (training / eval / analysis)
31+
If your change can affect numerical results, document:
32+
- Are existing runs in compute_ledger.md still valid? (yes/no)
33+
- Does this change affect the pre-registered analysis plan? (yes/no)
34+
- If yes to either: what's the migration path?
35+
If your change is purely doc / tooling / test, write "n/a".
36+
-->
37+
38+
n/a
39+
40+
## Out of scope
41+
42+
<!-- Things this PR explicitly does *not* fix or change. Helps the
43+
reviewer understand follow-up work. -->
44+
45+
-

CITATION.cff

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Citation File Format — used by GitHub's "Cite this repository" widget.
2+
# See https://citation-file-format.github.io/ for the schema.
3+
cff-version: 1.2.0
4+
title: "Pokémon Red — A Long-Horizon RL Benchmark"
5+
message: "If you use this software in your research, please cite the working paper below."
6+
type: software
7+
authors:
8+
- given-names: Alan
9+
family-names: Chester
10+
email: amcheste@gmail.com
11+
affiliation: CAM Labs LLC
12+
repository-code: "https://github.com/amcheste/pokemon-red-ai"
13+
url: "https://github.com/amcheste/pokemon-red-ai"
14+
abstract: >-
15+
A controlled empirical study of observation representations
16+
(pixel, symbolic, hybrid) in long-horizon, sparse-reward
17+
reinforcement learning, using Pokémon Red as the benchmark
18+
environment. RecurrentPPO agents are trained against an
19+
18-flag event-progress reward; results are reported with
20+
rliable interquartile means and 95% stratified-bootstrap
21+
confidence intervals. Released as a 3-paper cascade
22+
(EWRL 2026 → NeurIPS 2026 workshop → TMLR).
23+
keywords:
24+
- reinforcement-learning
25+
- long-horizon-rl
26+
- representation-learning
27+
- pokemon-red
28+
- benchmark
29+
- rliable
30+
license: MIT
31+
preferred-citation:
32+
type: unpublished
33+
authors:
34+
- given-names: Alan
35+
family-names: Chester
36+
email: amcheste@gmail.com
37+
affiliation: CAM Labs LLC
38+
title: >-
39+
Symbols or Pixels? A Controlled Study of Observation
40+
Representations in Long-Horizon Reinforcement Learning
41+
year: 2026
42+
notes: >-
43+
EWRL 2026 workshop submission. Pre-print available at
44+
https://github.com/amcheste/pokemon-red-ai

CONTRIBUTING.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Contributing
2+
3+
Thanks for your interest in contributing. This is an active research
4+
codebase — we welcome bug reports, fixes, and small enhancements that
5+
fit the project's scope. For larger changes, please open an issue
6+
first to discuss design.
7+
8+
## Scope
9+
10+
The project is the supporting code for a 3-paper research cascade
11+
(EWRL 2026 → NeurIPS 2026 workshop → TMLR). Contributions that align
12+
with the cascade are most likely to be merged:
13+
14+
- Bug fixes in any layer
15+
- Reproducibility improvements (deterministic seeding, environment hygiene)
16+
- Test coverage on under-tested code paths
17+
- Documentation accuracy fixes
18+
- New observation treatments, reward strategies, or callbacks that
19+
don't break the existing pre-registered protocol
20+
- Performance improvements that don't change behaviour
21+
22+
Out of scope without prior discussion:
23+
24+
- Changes that alter the pre-registered analysis plan
25+
([`paper/analysis_plan.md`](paper/analysis_plan.md))
26+
- Changes to the 18 pre-registered event flags
27+
([`pokemon_red_ai/game/event_flags.py`](pokemon_red_ai/game/event_flags.py))
28+
- New reward components that retroactively affect already-completed runs
29+
30+
## Development setup
31+
32+
```bash
33+
git clone https://github.com/amcheste/pokemon-red-ai.git
34+
cd pokemon-red-ai
35+
python3 -m venv venv && source venv/bin/activate
36+
pip install -e .
37+
pip install -r requirements.txt
38+
```
39+
40+
Run the test suite:
41+
42+
```bash
43+
./venv/bin/python3 -m pytest # full suite (~17s)
44+
./venv/bin/python3 -m pytest tests/unit/ # unit only
45+
./venv/bin/python3 -m pytest -k comparison # specific module
46+
```
47+
48+
All 833 tests should pass on a clean checkout. PRs that drop coverage
49+
or break tests will not be merged.
50+
51+
## Branch and PR conventions
52+
53+
- **Never commit to `main` or `master`** — always work on a feature
54+
branch and open a pull request.
55+
- Branch names: `feature/<short-description>`, `fix/<short-description>`,
56+
`docs/<short-description>`, `chore/<short-description>`.
57+
- Open the PR against `main`. PRs are routed to `@amcheste` via
58+
`CODEOWNERS`; leave the assignee field unset.
59+
- Keep PRs focused — one logical change per PR. Big mixed-bag PRs
60+
that combine refactors, features, and docs are hard to review and
61+
often get split anyway.
62+
- Include a `Test plan` section in the PR body covering what you ran
63+
and what you didn't.
64+
65+
## Commit style
66+
67+
- Imperative subject line under 72 characters
68+
(`Add reward breakdowns to monitoring callback` rather than
69+
`added reward breakdowns to monitoring callback`).
70+
- Body explains *why*, not what — the diff explains what. Wrap the
71+
body at 72 characters.
72+
- One logical change per commit.
73+
74+
## Code style
75+
76+
- Python 3.10+
77+
- Follow the existing module structure (see [`DEVELOPER_GUIDE.md`](DEVELOPER_GUIDE.md))
78+
- Type hints on every public function (`Optional[str]`, `Dict[str, Any]`, etc.)
79+
- Docstrings on every public class and function. Args / Returns
80+
/ Raises sections where applicable.
81+
- Tests for every behaviour change — both the happy path and the
82+
obvious failure modes
83+
- No emojis in code, comments, or documentation unless they're part of
84+
user-facing CLI output that's intended to be visually distinctive
85+
86+
## Reporting bugs
87+
88+
Use the issue templates under `.github/ISSUE_TEMPLATE/`. At minimum:
89+
90+
- What you expected to happen
91+
- What actually happened
92+
- Steps to reproduce (smallest possible example)
93+
- Versions: Python, the project, key dependencies (PyBoy, SB3,
94+
Gymnasium, PyTorch)
95+
96+
For training crashes, please include the relevant section of the
97+
training log and the W&B run URL if applicable.
98+
99+
## Reproducibility expectations
100+
101+
Because this is a research codebase, reproducibility is unusually
102+
important:
103+
104+
- Use `scripts/seed_utils.py` for any RNG seeding in new code
105+
- Use `scripts/eval.py` for evaluation results (no ad-hoc eval loops
106+
in notebooks or scripts)
107+
- Log every significant training run to
108+
[`paper/compute_ledger.md`](paper/compute_ledger.md)
109+
- Don't commit secrets (W&B keys, Slack webhooks, ROM files) — the
110+
`.gitignore` covers the obvious cases but always sanity-check
111+
`git status` before pushing
112+
113+
## License
114+
115+
By contributing, you agree that your contributions will be licensed
116+
under the [MIT License](LICENSE), the same license as the rest of the
117+
project.

0 commit comments

Comments
 (0)