Skip to content

Commit f558e7b

Browse files
authored
Merge pull request #313 from hingston/fix/readme-data-and-docs
Correct the README tables, document the rules, and add a checker that keeps them correct
2 parents 2d90b22 + 93c2ff2 commit f558e7b

15 files changed

Lines changed: 631 additions & 94 deletions

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Steam thread
4+
url: https://steamcommunity.com/app/792100/discussions/0/1739968490573286109/
5+
about: Post a solution or discuss the puzzles on Steam instead.
6+
- name: OCD+ challenge stat page
7+
url: https://tomorrowcorporation.com/7billionhumansStats/
8+
about: The shortest and fastest known solutions the tables are compared against.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Credit correction
2+
description: Claim or correct the credit for a solution
3+
labels: ["question"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
The Contributor column records who provided a solution here, which is not always who found it first.
9+
Earlier discovery can be credited if it was posted somewhere public and dated.
10+
- type: input
11+
id: level
12+
attributes:
13+
label: Level
14+
description: The year number and puzzle name, and whether it is the size, speed or both row.
15+
placeholder: Year 50 - Cubical Communication (size)
16+
validations:
17+
required: true
18+
- type: input
19+
id: credit
20+
attributes:
21+
label: Who should be credited?
22+
description: A name, and a link to a GitHub or Steam profile if there is one.
23+
validations:
24+
required: true
25+
- type: input
26+
id: evidence
27+
attributes:
28+
label: Link to the earlier posting
29+
description: A dated public link — a Steam thread, forum post, video or similar.
30+
validations:
31+
required: true
32+
- type: textarea
33+
id: notes
34+
attributes:
35+
label: Anything else
36+
description: For example if the solution was found independently by several people.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Paste-only solution
2+
description: Flag a listed solution that cannot be typed into the game's editor
3+
labels: ["question"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Solutions that can only be entered by pasting the text in are marked 📋 in the tables.
9+
The level a command becomes available at is easy to get wrong, so please say what you checked.
10+
- type: input
11+
id: level
12+
attributes:
13+
label: Level
14+
description: The year number and puzzle name, and whether it is the size, speed or both row.
15+
placeholder: Year 06 - Little Exterminator 1 (both)
16+
validations:
17+
required: true
18+
- type: input
19+
id: command
20+
attributes:
21+
label: Which command cannot be built?
22+
placeholder: pickup c,s
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: evidence
27+
attributes:
28+
label: How did you check?
29+
description: For example which options the editor offers at that level, or where the command is first unlocked.
30+
validations:
31+
required: true
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Better solution
2+
description: Report a solution that beats one in the tables
3+
labels: ["enhancement"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
If you can open a pull request instead, please do — it is quicker and you keep the credit.
9+
- type: input
10+
id: level
11+
attributes:
12+
label: Level
13+
description: The year number and puzzle name.
14+
placeholder: Year 34 - Seek and Destroy 1
15+
validations:
16+
required: true
17+
- type: dropdown
18+
id: type
19+
attributes:
20+
label: What does it improve?
21+
options:
22+
- Size
23+
- Speed
24+
- Both
25+
validations:
26+
required: true
27+
- type: input
28+
id: scores
29+
attributes:
30+
label: Size and speed
31+
description: The numbers the game reports when the solution finishes.
32+
placeholder: 7 commands, 890 steps
33+
validations:
34+
required: true
35+
- type: input
36+
id: reliability
37+
attributes:
38+
label: How often does it succeed?
39+
description: 99%+, 50-99% or under 50%. Say how you worked it out if it is not obvious.
40+
placeholder: 99%+
41+
validations:
42+
required: true
43+
- type: textarea
44+
id: solution
45+
attributes:
46+
label: The solution
47+
description: Paste the solution exactly as the game exports it.
48+
render: text
49+
validations:
50+
required: true
51+
- type: checkboxes
52+
id: pasteable
53+
attributes:
54+
label: Entering it
55+
options:
56+
- label: This solution has to be pasted in, because the editor cannot build it at that level

.github/dependabot.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@ updates:
66
- package-ecosystem: "github-actions"
77
directory: "/"
88
schedule:
9-
interval: "daily"
9+
interval: "weekly"
10+
groups:
11+
# One pull request for all action updates rather than one per action
12+
github-actions:
13+
patterns:
14+
- "*"

.github/pull_request_template.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Thanks for contributing! Delete anything below that does not apply. -->
2+
3+
## What is this?
4+
5+
<!-- e.g. "Year 34 Seek and Destroy 1 (size) down to 7 commands" -->
6+
7+
## Checklist
8+
9+
- [ ] The file is named `Year NUM - NAME (TYPE).txt` and is in the folder that matches how often it succeeds
10+
- [ ] The README row is updated, with the size and speed the game reports
11+
- [ ] `python check_names.py` and `python check_readme.py` both pass
12+
- [ ] Marked 📋 if the solution has to be pasted in because the editor cannot build it at that level
13+
- [ ] Credited to the right person (see [CONTRIBUTING.md](../CONTRIBUTING.md))

.github/workflows/check-format.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: Check Formatting
22
on:
33
pull_request:
4+
push:
5+
branches: [master]
6+
permissions:
7+
contents: read
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
411
jobs:
512
Formatting:
613
runs-on: ubuntu-latest
@@ -13,5 +20,7 @@ jobs:
1320
uses: actions/setup-python@v7
1421
with:
1522
python-version: ${{ matrix.python-version }}
16-
- name: Check formatting is correct
23+
- name: Check file names are correct
1724
run: python check_names.py
25+
- name: Check the README matches the solutions
26+
run: python check_readme.py

.github/workflows/lint.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
name: Lint
22
on:
33
pull_request:
4+
push:
5+
branches: [master]
6+
permissions:
7+
contents: read
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
411
jobs:
512
lint:
613
runs-on: ubuntu-latest
714
strategy:
815
matrix:
916
python-version: ["3.13"]
10-
lint-type: [black, flake8]
17+
lint-type: [black, flake8, mypy]
1118
steps:
1219
- uses: actions/checkout@v7.0.1
1320
- name: Set up Python ${{ matrix.python-version }}

CONTRIBUTING.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Contributing
2+
3+
Thanks for helping collect the best 7 Billion Humans solutions! Anyone is welcome to submit an improvement, either as
4+
a [pull request](https://help.github.com/articles/about-pull-requests/) or on
5+
the [Steam thread](https://steamcommunity.com/app/792100/discussions/0/1739968490573286109/).
6+
7+
## Submitting a solution
8+
9+
1. Copy the solution out of the game and save it as a `.txt` file in the folder that matches how reliable it is
10+
(see [Which folder](#which-folder)).
11+
2. Name the file `Year NUM - NAME (TYPE).txt`, where `NUM` is the two digit year, `NAME` is the puzzle's name and
12+
`TYPE` is `speed`, `size` or `both`.
13+
3. Add or update the row in the matching README table, keeping the rows in year order.
14+
4. Run the checks:
15+
16+
```bash
17+
python check_names.py && python check_readme.py
18+
```
19+
20+
Both run automatically on every pull request.
21+
22+
## Which folder
23+
24+
| Folder | Success rate | Contents |
25+
|:------------------------|:-------------|:--------------------------------------------------------------------------|
26+
| `Solutions99+` | 99% or more | The main table. |
27+
| `Solutions50+` | 50% to 99% | Solutions that beat the `Solutions99+` entry but do not always succeed. |
28+
| `SolutionsLowPercent` | under 50% | Solutions that beat the entries above but only succeed occasionally. |
29+
30+
A less reliable solution is only listed if it is strictly better than the entry above it: fewer commands, or fewer
31+
steps. A solution that only ties is not listed, because the more reliable solution is already the better answer.
32+
33+
## How size and speed are measured
34+
35+
**Size** is the number of commands the game counts, which is what its editor shows. Labels (`a:`), block ends
36+
(`endif`, `endwhile`, `endfor`) and comments are free; every other line costs one command, including `else` and `end`,
37+
and a condition split over several lines still only costs one. `check_readme.py` counts this for you and fails if the
38+
README disagrees with the file.
39+
40+
**Speed** is the number of steps the game reports when the solution finishes. Solutions that rely on randomness do not
41+
have a fixed speed, so their value is written with a `~` prefix (`~155`) for a typical run, or as a range (`10-11`)
42+
when it varies between a couple of values.
43+
44+
## How solutions are ranked
45+
46+
The size and speed the game reports are the only numbers used. Two solutions with the same reported speed are
47+
considered equally fast, even though one may finish a fraction of a second sooner: the game does not show that
48+
difference, and there is no way to record it that a contributor could check. When two solutions tie on the value being
49+
optimised, the one that is better in the other column wins, and if they tie in both then the existing entry stays.
50+
51+
## Solutions that have to be pasted in
52+
53+
Some solutions use a command the game's editor will not let you build at that level, so they can only be entered by
54+
pasting the text in. Those rows are marked with 📋 in the README so you can tell before you try to reproduce them.
55+
56+
If you submit a solution that has to be pasted in, please say so in your pull request and add the marker. If you spot
57+
a listed solution that should be marked, open an issue or a pull request; the level a command becomes available at is
58+
easy to get wrong, so please say which command is not available and where you checked.
59+
60+
## Credit
61+
62+
The **Contributor** column records who provided the solution to this repository, which is not always the person who
63+
first discovered it. Many of these solutions were found independently by several people, and some were posted
64+
elsewhere first.
65+
66+
If you know of an earlier public posting of a solution, open an issue with a dated link to it (a Steam thread, a
67+
Twitch VOD, a forum post) and the credit will be updated. Where a contributor knows their solution was not the first,
68+
that is noted in a comment at the top of the solution file.
69+
70+
If you would rather be credited under a different name or link, say so in your pull request or open an issue.

0 commit comments

Comments
 (0)