BFOIT - Introduction to Computer Programming
Background
jLogo Programming
- Commanding a Turtle
- Pseudocode
- Adding New Commands
- Iteration & Animation
- Hierarchical Structure
- Procedure Inputs
- Operators & Expressions
- Defining Operators
- Words & Sentences
- User Interface Events
- What If? (Predicates)
- Recursion
- Local Variables
- Global Variables
- Word/Sentence Iteration
- Mastermind Project
- Turtles As Actors
- Arrays
- File Input/Output
Java
- A Java Program
- What's a Class?
- Extending Existing Classes
- Types
- Turtle Graphics
- Control Flow
- User Interface Events
Appendices
- Jargon
- What Is TG?
- TG Directives
- jLogo Primitives
- TG Editor
- Java Tables
- Example Programs
- Installation Notes
Updates
- December 13, 2008
- January 6, 2012
- March 15, 2013
- January 20, 2014
- February 13, 2014
- July 29, 2014
- January 18, 2016
- January 29, 2016
Lastly
The Game of Life
The Game of Life |
Draw some patterns (communities of life) by clicking the left mouse button on squares to bring them to life. Then click on the [Step] button to watch what happens as the rules are applied in one cycle of Life. To repeat the cycle over and over forever, click on the [Go] button.
The Game of Life (invented by mathematician John Conway) is an example of Cellular Automaton.
A cellular automaton is a collection of "colored" cells on a grid of specified shape that evolves through a number of discrete time steps according to a set of rules based on the states of neighboring cells. The rules are then applied iteratively for as many time steps as desired. (from http://mathworld.wolfram.com/CellularAutomaton.html).
The "Game of Life" plays out on a grid. The squares of the grid are called cells. A cell that is alive is colored in. The rules for Life are simple. They are:
- In order for a cell to remain alive, it must have two or three neighbors.
- If a live cell has less than two neighbors, it dies (loneliness).
- If a live cell has more than three neighbors, it dies (over-crowdedness).
- If an empty cell has exactly two neighbors, it comes to life.
A cell's neighbors are the eight cells which surround it (to its north, northeast, east, etc...).