C SC 100 Lecture Notes
Spring 2008
Pete Sanderson

[ previous | schedule | next ]

major resource: Tomorrow's Technology and You (Complete), Eighth Edition, Beekman and Quinn, Pearson Prentice Hall, 2008

Scratch and overview of Chapter 15, Artificial Intelligence

Scratch

What is Scratch?

To quote from scratch.mit.edu:

"Scratch is a new programming language that makes it easy to create your own interactive stories, animations, games, music, and art -- and share your creations on the web. Scratch is designed to help young people (ages 8 and up) develop 21st century learning skills. As they create Scratch projects, young people learn important mathematical and computational ideas, while also gaining a deeper understanding of the process of design."

The subtitle of Scratch is "imagine * program * share". We will focus on the first two. You are free to share your results with the Scratch online community, but we will not spend much time on this part. You can easily figure it out on your own if you wish to participate.

Scratch was developed by the Media Lab at the Massachusetts Institute of Technology (MIT).

How can I get Scratch?

Scratch is installed in the Towers 107B computer lab. You can also download it directly from scratch.mit.edu (30MB download). After the download, look for file scratch.exe and send a shortcut to your desktop for easy launching.

Where are some Scratch resources?

Can I show my Scratch program to friends and family?

You can run your Scratch program on any computer that has Scratch installed. Another way is to join the Scratch community and post your program to their web site. Then you or anyone else can run it from there. Finally, the Scratch FAQ page (available from the Support screen) describes a technique to run your program from your own web page such as the one you created in this course. I have not tried it.

One thing you definitely cannot do is save it in any of the standard video formats for playing through a media player or posting on YouTube. Scratch does not have this capability.

What does a Scratch program consist of?

A Scratch program consists of a number of different components that all work together. Here are the major kinds of components.

Sprite - The most important component, because it is active.

Stage - The backdrop for sprites

Script - A script is a set of commands followed by a sprite or stage.

Costume - A costume is the visual image of a sprite

Blocks - The stuff that scripts are made of!

Scratch is a full-blown programming language

Scratch includes all three of the major programming language constructs:

Enough of this theoretical stuff! How to I write and run a Scratch program?

To write a program, just
  1. Click the New button at the top, to clear out any current program
  2. Obtain and select a sprite
  3. Select the Script tab in the center (should be selected by default)
  4. Select the Block category; start with Control
  5. Drag and drop blocks from the block palette into the Script area!
  6. Repeat for additional scripts and sprites
  7. An easy way to remove a block is to isolate it and drag it back into the block palette
  8. Experiment!
Save it periodically!
  1. Click the Save or Save As button
  2. Click the Computer folder at the left
  3. Click the Z: at the bottom of the list
  4. You are now in your Otterbein home folder
To run a program, just click the Green Flag. To stop it, click the Red Stop Sign.

Scratch and Intelligence

Scratch can do some pretty sophisticated things, including things that we normally associate with human intelligence. Does this mean Scratch is intelligent

Overview of Artificial Intelligence




[ Pete Sanderson | Math Sciences server | Math Sciences home page | Otterbein ]

Last updated:
Pete Sanderson (PSanderson@otterbein.edu)