User:Squareroot12621/CSM/Lessons

From LifeWiki
Jump to navigation Jump to search

Main page: User:Squareroot12621
CSM subpage: User:Squareroot12621/CSM

This page contains drafts for lessons in Conway's Story Mode.

Lesson 1: What Is CGoL?

Text

  • Conway's Game of Life is a "zero-player game," devised by mathematician John Conway in 1969.
  • CGoL, as we'll call it, operated on an infinite square grid. Each square in this grid is called a cell.
  • Each cell can have two states: alive and dead. We'll mark alive cells in light colors, and dead cells in dark colors.
  • In CGoL, you set up some configuration of alive and dead cells (called a pattern), at the start.
  • After that, each cell changes according to its own state, as well as the states of its neighbors.
  • A cell has 8 neighbors, arranged in a ring. Here, the orange cells are neighbors of the white cell:
x = 3, y = 3, rule = csmcolors 3C$CAC$3C! #C [[ THUMBSIZE 2 THEME 6 GRID GRIDMAJOR 0 SUPPRESS THUMBLAUNCH ]] #C [[ WIDTH 480 HEIGHT 570 THUMBSIZE 4 ZOOM 64 GRID GRIDMAJOR 0 COLOR GRID 64 64 64 ]]
(click above to open LifeViewer)
  • You'll learn more about the rules that the cells follow to change state in the next lesson, Lesson 2.
  • For now, though, you'll just be given a question to answer. Don't worry, it's not that hard.

Question

Question: Which sample configuration has more alive cells?

$2b5bo$3bo3bobo$3bo3bo$3bo3bo2bo$2bo5b2o$8bobo! #C [[ THUMBSIZE 2 THEME 6 GRID GRIDMAJOR 0 SUPPRESS THUMBLAUNCH ]] #C [[ WIDTH 900 HEIGHT 700 THUMBSIZE 4 ZOOM 64 GRID OFF THEME Mono X 1 Y 0.5 LABELZOOMRANGE 1 999 LABEL 2.5 -1.2 16 "A" POLYLINE -0.5 -0.5 5.5 -0.5 5.5 7.5 -0.5 7.5 -0.5 -0.5 32 LABEL 8.5 -1.2 16 "B" POLYLINE 5.5 -0.5 11.5 -0.5 11.5 7.5 5.5 7.5 5.5 -0.5 32 ]]
(click above to open LifeViewer)

A: Oops! This only has 4 alive cells, which is smaller than the 10 alive cells that B has. (gives 1 star)
B: Great job! B does have more cells than A, with 10 alive cells compared to 4. (gives 3 stars)

Lesson 2: What Do Cells Do?

Text

  • Last lesson, you learned that CGoL is made of cells that, collectively, make up a square grid.
  • However, when you place the cells down, they don't just sit around doing nothing all day.
  • Instead, the entire grid goes through generations, or iterations, which happen to every cell at once.
  • During a generation, each cell changes state according a few simple rules:
  • 1. If an alive cell is surrounded by two or three other alive cells, it stays alive.
  • 2. If a dead cell is surrounded by exactly three alive cells, it becomes alive.
  • 3. All other cells become dead. (So tragic.)
  • Fortunately, in this program, you won't have to simulate any patterns yourself—the computer will.
  • This lesson has an exercise, and in it, you'll just get to know the CGoL Simulator.
  • To finish the exercise, all you'll have to do is run a certain pattern to a certain point.

Exercise

Objective: This is the CGoL Simulator. All you have to do here is run this sample pattern for 100 generations. You can see the generation number at the top.
Library: None.
Pattern:

bo2bo$2o$o3bo$2o2bo$bob2o$2bo! #C [[ THUMBSIZE 2 THEME 6 GRID GRIDMAJOR 0 SUPPRESS THUMBLAUNCH ]] #C [[ WIDTH 480 HEIGHT 640 THUMBSIZE 4 ZOOM 64 GRID GRIDMAJOR 0 COLOR GRID 64 64 64 THEME Mono ]]
(click above to open LifeViewer)

Hint: You can run the pattern by pressing the ⏵ button at the top of the screen.
Win Condition: The pattern is run for 100 generations.
1 Star: None.
2 Stars: None.
3 Stars: The pattern is run for 100 generations.
Win Text: Great job! You'll learn more about what the pattern created in the next lesson.

Lesson 3: Basic Objects

Text

  • When you ran that last pattern, the end result was that two different objects appeared:
2o3bo$2o3bo$5bo! #C [[ THUMBSIZE 2 THEME 6 GRID GRIDMAJOR 0 SUPPRESS THUMBLAUNCH ]] #C [[ WIDTH 480 HEIGHT 320 THUMBSIZE 4 ZOOM 64 GRID GRIDMAJOR 0 COLOR GRID 64 64 64 THEME Mono X 0.5 ]]
(click above to open LifeViewer)
  • In this lesson, we'll look at both of these objects, and we'll even make another one in the Exercise.
  • First, let's look at the 2×2 square on the left. This object is called a block.
[viewer]
  • As you saw in the pattern (hopefully), the block doesn't really look like it's changing.
  • Similar objects are called still lifes, or still lives if your device has autocorrect.
  • Now, the object on the right is a bit different. This object has been named the blinker.
[viewer]
  • However, it is actually not a still life, because it has two different states that it switches between.
  • These different phases are what put things like blinkers in a different category, called oscillators.
  • Oscillators also have a period, which is the number of phases it cycles through. A blinker has a period of 2.
  • And, yes, still lifes are technically just period-1 oscillators, but it's easier to think of them as being…well, still lifes.
  • In this lesson's exercise, you'll make another still life—the beehive.