Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 We’re underway …

Slides:



Advertisements
Similar presentations
Instructional Technology vs. Educational Technology
Advertisements

Nested If Statements While Loops
 Communication:  Provide context, e.g., s …  TA Office hour for next Tuesday: CANCELLED  My name is: ??  Show  Scores on-line, Quiz-1 results.
Microprocessors VLIW Very Long Instruction Word Computing April 18th, 2002.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 Changing Control.
Working on a Mini-Project Anders P. Ravn/Arne Skou Computer Science Aalborg University February 2011.
Snick  snack A Working Computer Slides based on work by Bob Woodham and others.
Lecture #3 – Agenda Cell phones off & name signs out –I’ll judge signs on Wednesday next week Quick review & Questions Activity Problem solving.
Karel The Robot Nested If Statements While Loops Copyright © 2008 by Helene G. Kershner.
Traffic Light Behavior IF A=1 AND B=0 Car Sensors B A.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
1 Programming & Programming Languages Overview l Machine operations and machine language. l Example of machine language. l Different types of processor.
1 Tryscience and The FIRST LEGO League Visit us today!
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
The New Computing Curriculum Typing skills and keyboard confidence Word processing Simple graphics.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Carolyn Seaman University of Maryland, Baltimore County.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 “Digits” does not refer only to your 10 fingers…
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall NEW   NEW 1.
7 Graph 7.1 Even and Odd Degrees.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 Computing Is Pretty Strange.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Marie desJardins University of Maryland, Baltimore County.
Welcome – You’ve found CSE120 OR Computer Science Principles OR UWIT…  Announcements are usually listed here and displayed before the start of class 
CSC Intro. to Computing Lecture 13: PALGO. Announcements Midterm is in one week  Time to start reviewing  We will do more review in class Tuesday.
Problem Solving Session 1 Introduction. In this session we will be Reviewing the topics that will be covered in this module Discussing expectations Filling.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 Remember Back To The Lightbot.
Instructor: Vincent Conitzer
Compiling and the Java Virtual Machine (JVM). The syntax of Pseudocode is pretty loose –visual validation encourages a permissive approach –emphasized.
Four Fundamental Pieces Instruction Control Structure Function Expression.
Moving Around in Scratch The Basics… -You do want to have Scratch open as you will be creating a program. -Follow the instructions and if you have questions.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 What can a computer be commanded to do?
Intermediate 2 Software Development Process. Software You should already know that any computer system is made up of hardware and software. The term hardware.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 Assignment 6.
Storyboarding1 Steve Cooper Barb Ericson August 2009 Storyboarding.
1. 2 Its all about the science/study to problem solving using computational devices How efficient is the solution? Programming is an artifact which is.
What's The Plan? Algorithmic Thinking Step-by-step directions for whatever someone, or the computer, needs to do © 2004 Lawrence Snyder.
Intro to Programming Web Design ½ Shade Adetoro. Programming Slangs IDE - Integrated Development Environment – the software in which you develop an application.
Program Design. The design process How do you go about writing a program? –It’s like many other things in life Understand the problem to be solved Develop.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 CSE120 Computer Science Principles.
Course Overview  What is AI?  What are the Major Challenges?  What are the Main Techniques?  Where are we failing, and why?  Step back and look at.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 Drawing pictures … It’s not art, it’s fun.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004.
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
Lightbot 2.0 Armor games. Lightbot 2.0 Light-Bot 2.0 is online puzzle game built on the principles of visual programming. Light-Bot 2 contains a set of.
W1-1 University of Washington Computer Programming I Recursion © 2000 UW CSE.
Know what a computer is used for Understand the difference between hardware and software Be able to describe the way that data is stored in a computer.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 Making an example of Pacman.
Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Two paths diverge in the lectures 2 Think of the first as concepts, the second as capabilities This ClassPrinciplesDoing stuff.
Lightbot and Functions CSE 120 Winter 2017
Light Bot Solutions: an analysis
Lesson 8: Boolean Expressions and "if" Statements
Creativity in Algorithms
Lightbot and Functions CSE 120 Winter 2018
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
Announcements Mid-Term Exam!! Quiz 5 Again + Quiz 6 Exercise 5
Light Bot Solutions: an analysis
Light Bot Solutions: an analysis
Testing and Repetition
Mastering Memory Modes
Two Paths Diverge in the Lectures
Unit 3 lesson 2-5 The Need For Algorithms- Creativity in Algorithms – Simple Commands - Functions Day 18.
Nested If Statements While Loops
Announcements How to save your work? Quiz solution 5/5/2019
Hour of Code Code.org/lightbot
Lawrence Snyder University of Washington
Announcements Survey feedback: summary Quiz: HW 7:
Today: to list: Syllabus change: Grade on-line
Presentation transcript:

Lawrence Snyder University of Washington, Seattle © Lawrence Snyder 2004 We’re underway …

 What are you doing in Lightbot?  Commanding a robot through a “blocks world”  Programming is commanding an agent 11/30/2015© Larry Snyder2

11/30/2015© Larry Snyder3 Just Do It!

 When you are commanding (programming), you direct an agent (by instructions) to a goal  The agent is usually a computer, but it can be a person, or other device (animated robot?)  The agent follows the commands a/k/a instructions, flawlessly, and mindlessly, doing only what it is asked  The program implements human intent – you are trying to get the robot to the Blue Tile goal – it’s the point of your instructions 11/30/2015© Larry Snyder4

 Instructions are given in sequence, i.e. in order  They are followed in sequence, i.e. in order  YOU give the instructions … it’s called programming  The AGENT follows them … it’s called executing or running the program  A program counter marks the agent’s place 11/30/2015© Larry Snyder5

 The instructions are programmed ahead of time  They are executed later, w/o programmer’s intervention  Each instruction makes progress towards the goal  The instructions must be right and sufficient to achieve the goal 11/30/2015© Larry Snyder6 Program >>

 Programming REQUIRES you to take the agent’s point of view … it’s a essential idea 11/30/2015© Larry Snyder7 Program >>

 Programming REQUIRES you to take the agent’s point of view … it’s a essential idea 11/30/2015© Larry Snyder8 Program >> From this cell, a turn is required … R or L?

 The number and type of instructions is always limited – you need a solution using only them  Instructions … ▪ The agent can do only certain things … nothing else ▪ The Lightbot’s instructions ▪ There is no JUMP_3 … Lightbot’s even tougher than normal programming b/c in some LB games, some instructions are unavailable … but it’s a game! ▪ Executed the instructions one-at-a-time 11/30/2015© Larry Snyder9

 The limited repertoire is a fact of all computing, but how limited?  A computer’s circuitry (the hardware) has very few instructions … usually about 100, and many are just different versions of the same idea: add_2_bytes, add_2_ints, add_2_decimal_numbers, etc. 11/30/2015© Larry Snyder10 In theory, a computer with only 6 instructions could compute all known computations

 Programming would be amazingly tedious if all programming had to use only the basic instructions – I mean REALLY REALLY tedious  No one would be a programmer no matter how much it paid  Apps as we know them would not exist  BTW programming was like this in the beginning ▪ This is why they are called the “bad old days”  Luckily, there are functions 11/30/2015© Larry Snyder11

 We make new instructions using functions!  F1( ) packages actions: E.G. “process a riser” 11/30/2015© Larry Snyder12

11/30/2015© Larry Snyder13 Just Do It!

 We have a new instruction: Process_A_Riser  Call the function to use the new instruction 11/30/2015© Larry Snyder14

 Functions may seem “obvious” but they are a HUGE idea …  They allow us to solve problems by first creating some useful instructions, and then using them to get the agent to do our work  Sweet! … Let’s see how this works 11/30/2015© Larry Snyder15