feat: Module 11, Conditions (NOUN ON NOUN IS ..., checked per object at use; NEAR as the Expansion Drop)
Adds course/11-conditions: lesson, scenarios, nine test_11 tests in both tracks, the cumulative reference (Module 10's plus conditions) and the NEAR drop. The engine learns a condition role, rules carry conditions, and Level.hasProperty and conversion evaluate content's condition checks against the board whenever a rule is used. Resolution pairs only rules with the same conditions. Catalog, harness contract, research notes and the diff-tracks generator follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
570e5d6826
commit
34c655c1a4
89 files changed
+11703
-4
No files matched your search
@@ -262,6 +262,14 @@ All five repos exist. I shallow-cloned each on 2026-10-28 and read the files lis
|
||||
|
||||
**Searched but not included:** XMage ability architecture (not fetched), the Forge "AbilityFactory/Triggers" subpages (not fetched, since the two pages above were enough), and general ECS-events results (gamedev.net 2013 thread, evenio crate; not read in depth).
|
||||
|
||||
### 10d. Wikipedia: Guarded Command Language and Guard (computer science) (fetched 2026-11-11, course v2 Task 8)
|
||||
- URLs: https://en.wikipedia.org/wiki/Guarded_Command_Language and https://en.wikipedia.org/wiki/Guard_(computer_science), loaded with curl as `index.php?title=<page>&action=raw` (HTTP 200).
|
||||
- Verbatim quotes (wikitext links removed):
|
||||
- Guarded Command Language: "A guarded command consists of a boolean condition or guard, and a statement "guarded" by it."
|
||||
- Guarded Command Language: "Since guards cannot have side effects and the choice of clause is arbitrary, an implementation may evaluate the guards in any sequence and choose the first true clause, for example."
|
||||
- Guard (computer science): "a guard is a Boolean expression that must evaluate to true if the execution of the program is to continue in the branch in question."
|
||||
- **Course use:** Module 11's Name it. A Baba Is You condition is a guard on a rule: `BABA ON KEY IS WIN` is the rule `BABA IS WIN` guarded by "on a key", evaluated per object at the moment of use.
|
||||
|
||||
---
|
||||
|
||||
## Best source per pattern
|
||||
|
||||
@@ -120,6 +120,21 @@ All pages were loaded as wikitext via `https://babaiswiki.fandom.com/api.php?act
|
||||
- **Existence confirmed** via YouTube oEmbed (https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=Jf5O8S5GiOo&format=json): `"title":"Reading the Rules of Baba Is You","author_name":"GDC Festival of Gaming"` (the GDC channel). WebFetch of the watch page also returned the title "Reading the Rules of Baba Is You."
|
||||
- **Speaker** (confirmed 2026-10-29, Task 17): the Game Developer post [Video: Understanding the rules of Baba Is You](https://www.gamedeveloper.com/design/video-understanding-the-rules-of-i-baba-is-you-i-) (April 14, 2020), loaded with curl, says: "In this GDC 2020 virtual talk Arvi Teikari, developer of the innovative and award-winning puzzle game Baba Is You, describes how the game's unique sentence-based rule system was implemented." The post points to the official GDC YouTube channel; its HTML does not contain the video id, so the match to `Jf5O8S5GiOo` rests on the title and channel. The gdconf.com news page still returns 404. The video itself was not watched, and no claim in this document relies on it. No lesson cites the talk.
|
||||
|
||||
### 7. Baba Is You Wiki: conditions (fetched 2026-11-11, course v2 Task 8, for Module 11)
|
||||
Loaded with curl through the MediaWiki API, as in §5: `https://babaiswiki.fandom.com/api.php?action=parse&page=<NAME>&prop=wikitext&format=json&redirects=1` (HTTP 200 for each). Revision ids from `action=query&prop=revisions`. Templates rendered by hand as before: `{{O|FLAG|ON|BABA|IS|WIN}}` is written FLAG ON BABA IS WIN, `{{ON}}` is ON, `{{O|flag}}` is flag.
|
||||
|
||||
| Page | Revision | Key verbatim quote(s) |
|
||||
|---|---|---|
|
||||
| [ON](https://babaiswiki.fandom.com/wiki/ON) | 17403 (2025-10-05) | "ON is an infix condition that makes a rule apply when object is overlapping another object." / "FLAG ON BABA IS WIN makes flag WIN only when it's on a baba." / "FLAG ON BABA AND BABA IS WIN makes flag WIN only when it's on two babas." / "FLAG NOT ON BABA IS WIN makes flag WIN only when it's not on a baba." / "ON ignores FLOAT levels: FLAG ON BABA IS WIN makes flag WIN when it's on a baba even if BABA IS FLOAT and FLAG IS NOT FLOAT or vice versa." / "Objects are parsed in order of object priority; earlier on the list goes first." |
|
||||
| [NEAR](https://babaiswiki.fandom.com/wiki/NEAR) | 18131 (2026-04-11) | "NEAR is an infix condition that makes a rule apply when an object is on a target or in one of the eight spaces around it" / "PILLAR NEAR FLAG IS PINK makes Pillar turn PINK if a Flag is ON the Pillar, directly adjacent, or diagonally adjacent." / "FLAG NEAR BABA AND KEKE IS WIN makes flag WIN if NEAR both a baba and a keke." / "NEAR can be stacked: ROCK NEAR GRASS AND GRASS IS WIN requires at least 2 grass NEAR the Rock for it to be WIN." / "PILLAR NOT NEAR FLAG IS GREEN makes Pillar turn GREEN if there is no Flag ON the Pillar, directly adjacent, or diagonally adjacent." The page says nothing about FLOAT. |
|
||||
| [Conditions](https://babaiswiki.fandom.com/wiki/Category:Conditions) (redirects to Category:Conditions) | 18040 (2026-02-02) | "Conditions are operators that allow only some of a particular object to be impacted by a rule." / "They are parsed as noun1 condition noun2 verb thing, where noun1 verb thing only if the condition is true." / "Conditions can be negated by prefixing with NOT." / "AND in the noun1 part works like normal. For example, BABA AND KEKE ON SKULL IS DEFEAT expands into BABA ON SKULL IS DEFEAT and KEKE ON SKULL IS DEFEAT" / "AND in the noun2 part requires at least as many objects as are mentioned." / "BABA ON KEKE AND KEKE IS WIN makes a Baba WIN if it is ON two (stacked) Kekes." / "Multiple conditions can share objects between the conditions." / "It is not possible to write something like noun1 condition1 noun2 condition2 noun3 verb thing. This will parse as noun2 condition2 noun3 verb thing." / On matching AND-ed nouns with NOT: "it doesn't backtract to try matching" (sic) and "the game first claims objects for all non-NOT cases, then claims objects for the NOT cases in order with the first object that matches." Prefix conditions (LONELY, IDLE, POWERED, ...) are "parsed as condition noun verb thing". |
|
||||
| [NOT](https://babaiswiki.fandom.com/wiki/NOT) (re-fetched) | 18314 | "When added after a verb it makes the corresponding rule not apply, overriding other instances of the rule it disables." / "ROCK ON BABA IS NOT PUSH makes ROCK that is on BABA not PUSHable." / "When added before a condition, it reverses the condition." / "FLAG ON NOT BABA IS WIN makes flag WIN when it is ON something other than baba" |
|
||||
| [Order of Operations](https://babaiswiki.fandom.com/wiki/Order_of_Operations) (re-fetched) | 17942 (2026-01-03) | Same text as §3 for the quotes recorded there. On conditions: "Conditions process when the game checks for what objects have a rule, which is usually right before it uses it." / "it completely finishes moving for a particular move stage before checking which units are in the next, so conditions (e.g. IT ON BABA IS YOU AND MOVE) reparse in between." / Under "Other considerations": "conditions on these rules are rechecked at the time of destruction, even if multiple destructions occur in the same turn." (about HAS). |
|
||||
|
||||
- **What the pages do not say.** None of them says in so many words how a conditional `NOT` rule meets an unconditional one (`BABA IS YOU` with `BABA ON KEY IS NOT YOU`). The NOT page says a negation overrides "other instances of the rule it disables", and its example "ROCK ON BABA IS NOT PUSH makes ROCK that is on BABA not PUSHable" names only the rocks on a Baba. Module 11 reads the two together: the negation wins for each object its condition holds for, and only for those. That reading is the course's.
|
||||
- **Whether an object can satisfy its own condition.** ON says "overlapping another object"; NEAR says "on a target or in one of the eight spaces around it". Neither says whether `ROCK ON ROCK` can be satisfied by the rock itself. The course counts only other objects.
|
||||
- **Course use (Module 11):** ON ignores float levels (stated). AND in the condition needs one distinct object per listed noun (stated: "at least as many objects as are mentioned"). The course's grammar has one condition per sentence, no `NOT` before a condition, and no prefix conditions; NEAR is the Expansion Drop.
|
||||
|
||||
---
|
||||
|
||||
## Answers
|
||||
|
||||
Reference in new issue
Block a user