Datasets:
|
Download python/game_context/sokoban_train_full.md from ssundaram/self-org: direct link, hf CLI and curl.
- Browser
- Download file 5.26 kB
-
https://huggingface.co/datasets/ssundaram/self-org/resolve/main/python/game_context/sokoban_train_full.md
- Command line
-
hf download hf://datasets/ssundaram/self-org/python/game_context/sokoban_train_full.md
-
curl -L -o sokoban_train_full.md https://huggingface.co/datasets/ssundaram/self-org/resolve/main/python/game_context/sokoban_train_full.md
5.26 kB
| You will be dealing with a collection of small, turn-based, grid-based puzzle games. All of them were written in PuzzleScript, a hobbyist scripting language in which a game is defined by a set of objects, a short list of pattern-matching rewrite rules that fire every turn, a collision-layer structure that decides which objects may share a cell, a win condition, and a sequence of hand-authored levels. The games in this collection were made by many different authors and vary widely in theme, mechanics, and polish. | |
| A single episode consists of one level from one game. Levels are drawn from anywhere in a game's level sequence — the first level of a game, or the fortieth — so an episode may land in a level that the original game introduced only after many earlier levels and tutorial messages. None of that surrounding context is available: the player is not told the game's title, its rules, which level they are in, or what the win condition is. The only information is the grid they are shown and how it changes in response to their actions. | |
| # What a turn looks like | |
| On each turn the player receives a text rendering of the whole level and chooses one of `up`, `down`, `left`, `right`, or `action`, with `undo` and `restart` also available. The game applies its rules and the next rendering is shown. The episode ends when the game's win condition is satisfied or when a fixed budget of turns is exhausted. The optimal solutions for the levels in this collection are generally short — on the order of five to a dozen moves — though the player is not told the optimal length and the turn budget is larger than that. | |
| The rendering is a grid of cells separated by `|`. Every cell has the same number of character slots, and each slot holds either a single letter standing for one object or `.` for an empty slot, so a cell with several stacked objects shows several letters. A legend accompanies the grid mapping each letter to the name of an object. The letters are assigned per game and are not always mnemonic: a letter may be the initial of its object's name or may be an arbitrary unused letter, and the same letter means different things in different games. The object names come straight from the game's source, so they can be terse, numbered, idiosyncratic, or stylistically inconsistent (e.g. several near-identical objects distinguished only by a digit, or the same conceptual thing having different names in different games). The legend lists only objects present in the current state; objects that the game can create later — a transformed version of the player, a colored region, a countdown digit, a door that becomes a floor tile — appear in the legend only once they exist. Some objects that were visually invisible or decorative in the original game (transparent markers, floor variants, background shading) are rendered as ordinary letters here, so not everything shown necessarily participates in the puzzle. | |
| # What the games have in common | |
| Nearly every game has a player-controlled avatar that moves one cell per turn in the four cardinal directions and is stopped by walls or by the level boundary. Most involve some form of pushing: moving into an adjacent object moves that object along if the space beyond it is free. Most win conditions are of the form "every object of type X is on an object of type Y" — crates on targets, the player on a goal, colored blocks on matching outlines — and several games combine multiple such conditions at once. The `action` button does nothing in many games; some games disable it entirely. | |
| Beyond this common core, the games differ in ways that are only discoverable through play. Across the collection the mechanics include, for example: lines of identical pushable blocks that vanish when enough of them are adjacent; blocks of different colors that merge into a new color when pushed into one another; blocks that can only be pushed along one axis; buttons that open or close doors elsewhere when something rests on them; keys that change the player's form and let them pass through locks; teleport tiles that send the player or a pushed object to the far side of a line of obstacles; enemies that kill the player on contact and restart the level; a counter that ticks down each turn and resets the level's movable pieces when it reaches zero, alongside pickups that extend the count or grant abilities such as destroying blocks or moving two cells at a time; paint that spreads across the floor, flows downward first, and mixes with other colors, with sponges that wipe it up; terrain the player cannot step onto and connected platforms that slide when particular blocks are moved; and levels with several simultaneously controlled avatars that all move together on each input. Some rules fire automatically after the player's move, so a single input can produce changes far from the avatar or chain reactions that take a turn or more to settle. Some games also permit arrangements that make the level unwinnable without any visible signal, since the environment never announces failure. | |
| Rule complexity ranges from a single rule to several dozen, and level layouts range from a one-row corridor to large mazes of several hundred cells with many interacting pieces. |