Lights Out Game - Target Patterns

Lights Out Game - Target Patterns
Loading the math board and drawing, please wait…
2011-10-29 19:53
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

  1. Polygon((B$1, $A2), (B$1 + 1, $A2), 4) → B2
  2. Polygon((C$1, $A2), (C$1 + 1, $A2), 4) → C2
  3. Polygon((D$1, $A2), (D$1 + 1, $A2), 4) → D2
  4. Polygon((E$1, $A2), (E$1 + 1, $A2), 4) → E2
  5. Polygon((F$1, $A2), (F$1 + 1, $A2), 4) → F2
  6. Polygon((G$1, $A2), (G$1 + 1, $A2), 4) → G2
  7. Polygon((H$1, $A2), (H$1 + 1, $A2), 4) → H2
  8. Polygon((B$1, $A3), (B$1 + 1, $A3), 4) → B3
  9. Polygon((B$1, $A4), (B$1 + 1, $A4), 4) → B4
  10. Polygon((B$1, $A5), (B$1 + 1, $A5), 4) → B5
  11. Polygon((B$1, $A6), (B$1 + 1, $A6), 4) → B6
  12. Polygon((B$1, $A7), (B$1 + 1, $A7), 4) → B7
  13. Polygon((B$1, $A8), (B$1 + 1, $A8), 4) → B8
  14. Polygon((C$1, $A3), (C$1 + 1, $A3), 4) → C3
  15. Polygon((C$1, $A4), (C$1 + 1, $A4), 4) → C4
  16. Polygon((C$1, $A5), (C$1 + 1, $A5), 4) → C5
  17. Polygon((C$1, $A6), (C$1 + 1, $A6), 4) → C6
  18. Polygon((C$1, $A7), (C$1 + 1, $A7), 4) → C7
  19. Polygon((C$1, $A8), (C$1 + 1, $A8), 4) → C8
  20. Polygon((D$1, $A3), (D$1 + 1, $A3), 4) → D3
  21. Polygon((D$1, $A4), (D$1 + 1, $A4), 4) → D4
  22. Polygon((D$1, $A5), (D$1 + 1, $A5), 4) → D5
  23. Polygon((D$1, $A6), (D$1 + 1, $A6), 4) → D6
  24. Polygon((D$1, $A7), (D$1 + 1, $A7), 4) → D7
  25. Polygon((D$1, $A8), (D$1 + 1, $A8), 4) → D8
  26. Polygon((E$1, $A3), (E$1 + 1, $A3), 4) → E3
  27. Polygon((E$1, $A4), (E$1 + 1, $A4), 4) → E4
  28. Polygon((E$1, $A5), (E$1 + 1, $A5), 4) → E5
  29. Polygon((E$1, $A6), (E$1 + 1, $A6), 4) → E6
  30. Polygon((E$1, $A7), (E$1 + 1, $A7), 4) → E7
  31. Polygon((E$1, $A8), (E$1 + 1, $A8), 4) → E8
  32. Polygon((F$1, $A3), (F$1 + 1, $A3), 4) → F3
  33. Polygon((F$1, $A4), (F$1 + 1, $A4), 4) → F4
  34. Polygon((F$1, $A5), (F$1 + 1, $A5), 4) → F5
  35. Polygon((F$1, $A6), (F$1 + 1, $A6), 4) → F6
  36. Polygon((F$1, $A7), (F$1 + 1, $A7), 4) → F7
  37. Polygon((F$1, $A8), (F$1 + 1, $A8), 4) → F8
  38. Polygon((G$1, $A3), (G$1 + 1, $A3), 4) → G3
  39. Polygon((G$1, $A4), (G$1 + 1, $A4), 4) → G4
  40. Polygon((G$1, $A5), (G$1 + 1, $A5), 4) → G5
  41. Polygon((G$1, $A6), (G$1 + 1, $A6), 4) → G6
  42. Polygon((G$1, $A7), (G$1 + 1, $A7), 4) → G7
  43. Polygon((G$1, $A8), (G$1 + 1, $A8), 4) → G8
  44. Polygon((H$1, $A3), (H$1 + 1, $A3), 4) → H3
  45. Polygon((H$1, $A4), (H$1 + 1, $A4), 4) → H4
  46. Polygon((H$1, $A5), (H$1 + 1, $A5), 4) → H5
  47. Polygon((H$1, $A6), (H$1 + 1, $A6), 4) → H6
  48. Polygon((H$1, $A7), (H$1 + 1, $A7), 4) → H7
  49. Polygon((H$1, $A8), (H$1 + 1, $A8), 4) → H8
  50. Sequence(Segment[(1, i), (6, i)], i, 1, 6) → hlines
  51. Sequence(Segment[(i, 1), (i, 6)], i, 1, 6) → vlines
  52. If(C11, "1", "0") → C18
  53. If(D11, "1", "0") → D18
  54. If(E11, "1", "0") → E18
  55. If(F11, "1", "0") → F18
  56. If(G11, "1", "0") → G18
  57. If(C12, "1", "0") → C19
  58. If(C13, "1", "0") → C20
  59. If(C14, "1", "0") → C21
  60. If(C15, "1", "0") → C22
  61. If(D12, "1", "0") → D19
  62. If(D13, "1", "0") → D20
  63. If(D14, "1", "0") → D21
  64. If(D15, "1", "0") → D22
  65. If(E12, "1", "0") → E19
  66. If(E13, "1", "0") → E20
  67. If(E14, "1", "0") → E21
  68. If(E15, "1", "0") → E22
  69. If(F12, "1", "0") → F19
  70. If(F13, "1", "0") → F20
  71. If(F14, "1", "0") → F21
  72. If(F15, "1", "0") → F22
  73. If(G12, "1", "0") → G19
  74. If(G13, "1", "0") → G20
  75. If(G14, "1", "0") → G21
  76. If(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.