Symmetry Puzzle

Symmetry Puzzle preview image

1 collaborator

Default-person Ian Chapman (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.4.0 • Viewed 4 times • Downloaded 0 times • Run 0 times
Download the 'Symmetry Puzzle' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This is an example of a puzzle cited in Leidy Klotz's book Subtract. Each of the squares in the figure can toggle between green and blue.

GOAL

Try to find the simplest way to make this figure symmetrical from right to left and top to bottom.

HOW TO USE IT

Press SETUP to set up the board, then press GO to play the game.

While GO is pressed, click on squares to toggle their colors.

CREDITS AND REFERENCES

Klotz, L. (2021). Subtract: The Untapped Science of Less. First edition. Flatiron Books

Ingraham, C. (2021, April 16). Humans solve problems by adding complexity, even when it’s against our best interests. The Washington Post. https://www.washingtonpost.com/business/2021/04/16/bias-problem-solving-nature/

Stanford’s Masters of Creativity (2025, July 8) The Untapped Science of Less with Leidy Klotz - Masters or Creativity - Stanford d.school [Video]. YouTube. https://www.youtube.com/watch?v=ThRMgxgye2Y

The code is based on the minesweeper example from the NetLogo models library.

HOW TO CITE

If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.

For the model itself:

Please cite the NetLogo software as:

COPYRIGHT AND LICENSE

Copyright 2005 Uri Wilensky.

CC BY-NC-SA 3.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

globals [
  clock             ;; how many seconds the game has lasted so far
  game-started?     ;; initially false, becomes true when player first presses GO
  game-over?        ;; initially false, becomes true if the player loses
  mine-count
]

breed [ grass-squares grass-square ]    ;; these are the green squares the player hasn't tested yet
breed [ mines mine ]             ;; the mines (initially invisible)
breed [ markers marker ]          ;; show where the player thinks mines are

to setup
  clear-all
  set clock 0
  set mine-count 0
  set game-started? false
  set game-over? false
  set-default-shape grass-squares "square"
  set-default-shape mines "bomb"
  set-default-shape markers "square"
  ask patches [
    sprout-grass-squares 1 [ set color green ]
    set pcolor gray
  ]
  ;; make the number of mines determined by the mine-count slider
  ask n-of mine-count patches [
    sprout-mines 1 [
      set color black
      hide-turtle
    ]
  ]
  ask patch 0 9 [ sprout-markers 1 [ set color blue ]]
  ask patch 1 9 [ sprout-markers 1 [ set color blue ]]
  ask patch 0 8 [ sprout-markers 1 [ set color blue ]]
  ask patch 1 8 [ sprout-markers 1 [ set color blue ]]
  ask patch 4 9 [ sprout-markers 1 [ set color blue ]]
  ask patch 4 8 [ sprout-markers 1 [ set color blue ]]
  ask patch 4 7 [ sprout-markers 1 [ set color blue ]]
  ask patch 4 6 [ sprout-markers 1 [ set color blue ]]
  ask patch 4 5 [ sprout-markers 1 [ set color blue ]]
  ask patch 4 4 [ sprout-markers 1 [ set color blue ]]
  ask patch 4 3 [ sprout-markers 1 [ set color blue ]]
  ask patch 4 2 [ sprout-markers 1 [ set color blue ]]
  ask patch 4 1 [ sprout-markers 1 [ set color blue ]]
  ask patch 4 0 [ sprout-markers 1 [ set color blue ]]
  ask patch 5 9 [ sprout-markers 1 [ set color blue ]]
  ask patch 5 8 [ sprout-markers 1 [ set color blue ]]
  ask patch 5 7 [ sprout-markers 1 [ set color blue ]]
  ask patch 5 6 [ sprout-markers 1 [ set color blue ]]
  ask patch 5 5 [ sprout-markers 1 [ set color blue ]]
  ask patch 5 4 [ sprout-markers 1 [ set color blue ]]
  ask patch 5 3 [ sprout-markers 1 [ set color blue ]]
  ask patch 5 2 [ sprout-markers 1 [ set color blue ]]
  ask patch 5 1 [ sprout-markers 1 [ set color blue ]]
  ask patch 5 0 [ sprout-markers 1 [ set color blue ]]
  ask patch 9 4 [ sprout-markers 1 [ set color blue ]]
  ask patch 8 4 [ sprout-markers 1 [ set color blue ]]
  ask patch 7 4 [ sprout-markers 1 [ set color blue ]]
  ask patch 6 4 [ sprout-markers 1 [ set color blue ]]
  ask patch 5 4 [ sprout-markers 1 [ set color blue ]]
  ask patch 4 4 [ sprout-markers 1 [ set color blue ]]
  ask patch 3 4 [ sprout-markers 1 [ set color blue ]]
  ask patch 2 4 [ sprout-markers 1 [ set color blue ]]
  ask patch 1 4 [ sprout-markers 1 [ set color blue ]]
  ask patch 0 4 [ sprout-markers 1 [ set color blue ]]
  ask patch 9 5 [ sprout-markers 1 [ set color blue ]]
  ask patch 8 5 [ sprout-markers 1 [ set color blue ]]
  ask patch 7 5 [ sprout-markers 1 [ set color blue ]]
  ask patch 6 5 [ sprout-markers 1 [ set color blue ]]
  ask patch 5 5 [ sprout-markers 1 [ set color blue ]]
  ask patch 4 5 [ sprout-markers 1 [ set color blue ]]
  ask patch 3 5 [ sprout-markers 1 [ set color blue ]]
  ask patch 2 5 [ sprout-markers 1 [ set color blue ]]
  ask patch 1 5 [ sprout-markers 1 [ set color blue ]]
  ask patch 0 5 [ sprout-markers 1 [ set color blue ]]
  ask patch 3 3 [ sprout-markers 1 [ set color blue ]]
  ask patch 3 6 [ sprout-markers 1 [ set color blue ]]
  ask patch 6 3 [ sprout-markers 1 [ set color blue ]]
  ask patch 6 6 [ sprout-markers 1 [ set color blue ]]


  reset-ticks
end 

to go

  if mouse-down? [
   ask patch (round mouse-xcor) (round mouse-ycor) [
      ifelse any? mines-here
        [ set game-over? true ]   ;; aiggghhhh!
        [ clear ]                 ;; whew!
    ]
  ]
  tick
end 

to clear

      ifelse any? markers-here
        [ ask markers-here [ die ] ]
        [ sprout-markers 1 [ set color blue ] ]
end 


; Copyright 2005 Uri Wilensky.
; See Info tab for full copyright and license.

There is only one version of this model, created about 13 hours ago by Ian Chapman.

Attached files

File Type Description Last updated
Symmetry Puzzle.png preview Preview for 'Symmetry Puzzle' about 13 hours ago, by Ian Chapman Download

This model does not have any ancestors.

This model does not have any descendants.