中文/EnglishComparing game-playing policies4 sectionsA character walks straight into a wall. Did it fail to plan a detour, run out of moves, or enter a level with no route to the exit? A completion rate alone cannot distinguish those explanations. In this exercise you can change each condition separately and recover the explanation from the episode records. Two policies, five layoutsCopy Anchor Link The game is a seven-column, five-row grid. The character starts at the left edge of the middle row and the exit is at the opposite edge. A wall divides the grid vertically. Exactly one of its five cells is open. Movement is orthogonal and each move costs one step. Both policies have access to the same map and goal. They differ in how they use that information. The greedy policy takes a legal move only if it reduces Manhattan distance to the exit. The planner uses breadth-first search from the exit to find the shortest traversable distance to every reachable cell. Both policies stop if no neighbor improves their distance measure. Before running the comparison, sketch the layout with the opening in the top row. At which cell will the policies first disagree? Run the paired comparisonCopy Anchor Link Save the experiment script as grid-study.py. It uses only the Python 3 standard library. Run these commands in the directory containing the file. Each writes one CSV row per layout and policy, with the shortest available path, the stopping reason and the number of moves taken. Copy Textpython3 grid-study.py --gaps 1 --budget 12 python3 grid-study.py --gaps 1 --budget 8 python3 grid-study.py --gaps 0 --budget 12 With twelve moves available, the planner reaches the exit on all five layouts. The greedy policy reaches it on one. All four disagreements occur where the character must first move away from the goal. The maze with a central opening serves as a control. Both policies complete it in six moves. A different result on that map calls for checking movement, collision or scoring before interpreting the other four episodes. With an eight-move budget, the planner reaches three exits. The outermost openings require ten moves. Their rows now read cutoff. The controller still has a route when the evaluator stops it. In the sealed layout the shortest path reads unreachable. Retain this row when describing the generator's output. If the research question concerns performance on solvable tasks, report its exclusion and that denominator separately. Gymnasium makes a related distinction between a terminal event defined by the task and truncation imposed from outside it. Farama's time-limit guide What population does the score describe?Copy Anchor Link Five layouts exhaust the single-opening family. Repeating the deterministic run adds no layouts and no independent training runs. The four-win margin measures the value of this planner within this family and action budget. Both policies see the entire map, and the move count omits computation. A claim about planning from pixels, real-time performance or learning would require another experiment. For a learned policy, separate the levels used to train and select the checkpoint from those reserved for the final evaluation. Pair policies on the same test layouts and observation interface. Preserve the checkpoint identity, training seed, layout and episode outcome so a reader can distinguish variation across training runs from variation across test levels. Procgen illustrates how to vary the level distribution. Agarwal and colleagues explain why a few training runs can leave considerable uncertainty about an algorithm's relative performance. Procgen · Statistical evaluation in deep RL Write the resultCopy Anchor Link Give the two completion counts at each budget, the number of layouts on which the policies disagree, and a single episode that accounts for the change. Then state what information and computation the planner used. Someone reading the account should be able to reconstruct the denominator and decide whether the comparison applies to a character that can see only nearby tiles. To study how the maps themselves affect the result, continue with measuring a level generator.Sources & document informationEvidence for claims about playing games and developing them.View Markdown sourceTrace a claim to its sourcePrevious PageEvaluate a game development agentNext PageGameMapA little direction for your next playable world.GamesGame examplesToolsResourcesAgent toolkitTesting libraryResearchPapersRepository researchLearnGuides & notesGitHubGameMap