Docsity

Simulating Decisions: A Computer Science Approach using Cellular Automata, Slides of Artificial Intelligence

Toggle sidebar
bg1
1
CSCI 100
Think Like Computers
Lecture 12
Fall 2008
So far …
•We talked about –
How computers represent things
How computers represent decisions
How computers make rational decisions
How computers learn
What about …
•problems we don’t know how to solve ?
•We don’t have a good theory
•Problem too complicated
•Too costly to experiment with
•Computers can help!
Computer Simulation!
•Create models of things that you want to
represent
•Simulate their actions/interactions
•Run many times with random starting conditions
•Collect data
•Analyze data
The “Game of Life”
•Conway’s game of life
•Actually based on the (very intriguing!)
mathematical concept of Cellular
Automaton (CA)
1-Dimensional CA
•Cells form a line
•Each cell would live or die based on rules involving itself
and neighbours
Docsity.com
pf3
pf4

Partial preview of the text

Download Simulating Decisions: A Computer Science Approach using Cellular Automata and more Slides Artificial Intelligence in PDF only on Docsity!

CSCI 100

Think Like Computers

Lecture 12

Fall 2008

So far …

  • We talked about – Š How computers represent things Š How computers represent decisions Š How computers make rational decisions Š How computers learn

What about …

  • problems we don’t know how to solve?
  • We don’t have a good theory
  • Problem too complicated
  • Too costly to experiment with
  • Computers can help!

Computer Simulation!

  • Create models of things that you want to represent
  • Simulate their actions/interactions
  • Run many times with random starting conditions
  • Collect data
  • Analyze data

The “Game of Life”

  • Conway’s game of life
  • Actually based on the (very intriguing!) mathematical concept of Cellular Automaton (CA)

1-Dimensional CA

  • Cells form a line
  • Each cell would live or die based on rules involving itself and neighbours

1-Dimensional CA

  • May use this to explain things like crystal growth, etc

2-dimensional CA

  • Conway’s game of life
  • Each cell has 8 neighbours Š 2 neighbors – same Š 3 neighbors – alive Š else - dead

Pulsar (three-phase oscillator)

Lightweight spaceship (LWSS)

Glider (spaceship)

Toad (two-phase oscillator)

Blinker (two-phase oscillator)

Boat (still life)

Block (still life)

More on the Game of Life

  • There are a lot of natural CA-like phenomena …
  • Life forms? Multicellular organisms?
  • Colonies
  • Flocks and Herds
  • Ecosystems
  • Economies and society

Let’s Start

  • With something simple!
  • Consider the homework problem of shopping for mortgage
  • How to simulate this?

Data Analysis

  • Remember some of the Unix tools?
  • grep, cut, sort, wc, etc.

Remaining (Key) Questions

  • How do we generate the random orders? Š Random number generators
  • How do we get our answer based on our strategy? Š Choose a representation for your strategy Š Program it
  • How do we run the simulation n times? Š Script