Lights Out Game - Target Patterns
Loading the math board and drawing, please wait…
In collections
GeoGebra day at MoMath
This example demonstrates the classic logic game 'Lights Out'. Players need to click on a 5x5 grid to change the state of a cell and its neighbors. By adjusting the initial state and target patterns, one can explore logic reasoning and state transitions. It uses Polygon, Sequence, If, and other GeoGebra commands for construction. Suitable for logic training and programming thinking development.
GeoGebra Commands & Parameters
Polygon((B$1, $A2), (B$1 + 1, $A2), 4) → B2Polygon((C$1, $A2), (C$1 + 1, $A2), 4) → C2Polygon((D$1, $A2), (D$1 + 1, $A2), 4) → D2Polygon((E$1, $A2), (E$1 + 1, $A2), 4) → E2Polygon((F$1, $A2), (F$1 + 1, $A2), 4) → F2Polygon((G$1, $A2), (G$1 + 1, $A2), 4) → G2Polygon((H$1, $A2), (H$1 + 1, $A2), 4) → H2Polygon((B$1, $A3), (B$1 + 1, $A3), 4) → B3Polygon((B$1, $A4), (B$1 + 1, $A4), 4) → B4Polygon((B$1, $A5), (B$1 + 1, $A5), 4) → B5Polygon((B$1, $A6), (B$1 + 1, $A6), 4) → B6Polygon((B$1, $A7), (B$1 + 1, $A7), 4) → B7Polygon((B$1, $A8), (B$1 + 1, $A8), 4) → B8Polygon((C$1, $A3), (C$1 + 1, $A3), 4) → C3Polygon((C$1, $A4), (C$1 + 1, $A4), 4) → C4Polygon((C$1, $A5), (C$1 + 1, $A5), 4) → C5Polygon((C$1, $A6), (C$1 + 1, $A6), 4) → C6Polygon((C$1, $A7), (C$1 + 1, $A7), 4) → C7Polygon((C$1, $A8), (C$1 + 1, $A8), 4) → C8Polygon((D$1, $A3), (D$1 + 1, $A3), 4) → D3Polygon((D$1, $A4), (D$1 + 1, $A4), 4) → D4Polygon((D$1, $A5), (D$1 + 1, $A5), 4) → D5Polygon((D$1, $A6), (D$1 + 1, $A6), 4) → D6Polygon((D$1, $A7), (D$1 + 1, $A7), 4) → D7Polygon((D$1, $A8), (D$1 + 1, $A8), 4) → D8Polygon((E$1, $A3), (E$1 + 1, $A3), 4) → E3Polygon((E$1, $A4), (E$1 + 1, $A4), 4) → E4Polygon((E$1, $A5), (E$1 + 1, $A5), 4) → E5Polygon((E$1, $A6), (E$1 + 1, $A6), 4) → E6Polygon((E$1, $A7), (E$1 + 1, $A7), 4) → E7Polygon((E$1, $A8), (E$1 + 1, $A8), 4) → E8Polygon((F$1, $A3), (F$1 + 1, $A3), 4) → F3Polygon((F$1, $A4), (F$1 + 1, $A4), 4) → F4Polygon((F$1, $A5), (F$1 + 1, $A5), 4) → F5Polygon((F$1, $A6), (F$1 + 1, $A6), 4) → F6Polygon((F$1, $A7), (F$1 + 1, $A7), 4) → F7Polygon((F$1, $A8), (F$1 + 1, $A8), 4) → F8Polygon((G$1, $A3), (G$1 + 1, $A3), 4) → G3Polygon((G$1, $A4), (G$1 + 1, $A4), 4) → G4Polygon((G$1, $A5), (G$1 + 1, $A5), 4) → G5Polygon((G$1, $A6), (G$1 + 1, $A6), 4) → G6Polygon((G$1, $A7), (G$1 + 1, $A7), 4) → G7Polygon((G$1, $A8), (G$1 + 1, $A8), 4) → G8Polygon((H$1, $A3), (H$1 + 1, $A3), 4) → H3Polygon((H$1, $A4), (H$1 + 1, $A4), 4) → H4Polygon((H$1, $A5), (H$1 + 1, $A5), 4) → H5Polygon((H$1, $A6), (H$1 + 1, $A6), 4) → H6Polygon((H$1, $A7), (H$1 + 1, $A7), 4) → H7Polygon((H$1, $A8), (H$1 + 1, $A8), 4) → H8Sequence(Segment[(1, i), (6, i)], i, 1, 6) → hlinesSequence(Segment[(i, 1), (i, 6)], i, 1, 6) → vlinesIf(C11, "1", "0") → C18If(D11, "1", "0") → D18If(E11, "1", "0") → E18If(F11, "1", "0") → F18If(G11, "1", "0") → G18If(C12, "1", "0") → C19If(C13, "1", "0") → C20If(C14, "1", "0") → C21If(C15, "1", "0") → C22If(D12, "1", "0") → D19If(D13, "1", "0") → D20If(D14, "1", "0") → D21If(D15, "1", "0") → D22If(E12, "1", "0") → E19If(E13, "1", "0") → E20If(E14, "1", "0") → E21If(E15, "1", "0") → E22If(F12, "1", "0") → F19If(F13, "1", "0") → F20If(F14, "1", "0") → F21If(F15, "1", "0") → F22If(G12, "1", "0") → G19If(G13, "1", "0") → G20If(G14, "1", "0") → G21If(G15, "1", "0") → G22
AI Drawing Prompt Reference
Draw a 5x5 grid of squares, each with four vertices. Start from the top-left and move right and down, drawing the boundaries of each square, ensuring that the vertices of each square align with the adjacent squares.
The prompt above was compiled from the original drawing commands and is for reference only.