CS206: Evolutionary Robotics
|
|
- Chester Cross
- 5 years ago
- Views:
Transcription
1 CS206: Evolutionary Robotics Programming Assignment 10 of 10 Description: In this final assignment, you will connect the Python application you developed in assignments 1 through 3 with the robot simulator you have created in assignments 4 through 9. When you are done, the two applications will work together as follows: The Python hill climber will start up the robot simulator and send it a collection of random synaptic weights. The robot simulator will read in these weights, and use them to set the synaptic weights of the artificial neural network you created in the last assignment. The robot simulator will run for 1000 time steps, and then record the final position of the robot s main body. It will save this value to a file and then exit. The Python hill climber will read in this value and treat it as the fitness of the synaptic weights it just sent. It will create a copy of these weights, and mutate them slightly. It will then start up the robot simulator again, send it this new set of weights, and so on. Let us get started. 1. Create an empty directory called Assignment Copy your Assignment3.py file from assignment 3 into this directory and rename it Assignment10.py. 3. Recall that the Python code implements a hill climber, a simple evolutionary algorithm that optimizes a neural network to exhibit some desired behavior. Comment out each line of the main function so that when you run the code it starts and then immediately terminates: #numgenes = 10; #numgenerations = 1000; #fits = Evolve(numGenes, ); 4. Recall that in the function Evolve, a matrix of synaptic weights was evolved. We now need to evolve a 4 8 matrix of synaptic weights: one synaptic to connect each of the four sensors to each of the eight motors. So replace the numgenes=10 line with numsensors = 4; nummotors = 8; #numgenerations = 1000; 1
2 5. Now uncomment the Evolve function, and change the parameters sent to it: fits = Evolve(numSensors, nummotors, ) 6. Comment out all of the lines in the Evolve function so that your code still runs yet does not do anything (yet). 7. Now uncomment and modify the first four lines in Evolve accordingly: these lines create a vector for saving the best fitness as evolution proceeds; they create a random matrix of synaptic weights; and they evaluate the fitness of those weights: fits = Matrix_Create(1,numGenerations); parent = Matrix_Create(numSensors,numMotors); parent = Matrix_Randomize(parent)*2-1; parentfit = Fitness3_Get(parent); 8. The new function Fitness3 Get starts up the robot simulator and sends the matrix of weights to it; it waits for the robot simulator to terminate (after the simulator has saved out the fitness of those weights); reads in the fitness value; and deletes the files that allow the two programs to communicate with each other. def Fitness3_Get(synapses): weightsfilename = weights.dat ; fitfilename = fit.dat ; Send_Synapse_Weights_ToFile(synapses,weightsFileName); Simulate_Robot(); Wait_For_Fitness_File(fitFileName); fitness = Fitness_Collect_From_File(fitFileName); Delete_File(weightsFileName); Delete_File(fitFileName); return( fitness ); 9. Comment out all of the lines below Send Synapse Weights ToFile, and then implement only this function. This function should save all 32 weights to file weights.dat in the same directory as the python and robot simulator executables. Given that the rest of the Python code is commented out, when you run your code it should save this file and then quit. 2
3 10. Let us turn now to your robot simulator code. Make a copy of Assignment 9, and name the copy Assignment 10. Make sure that the simulator executable is compiled into your new Assignment10 directory. 11. We need to ensure that the robot simulator, when initiated, runs for 1000 time steps and then terminates. To do so, we need to define a new variable int timestep, set it to zero in initphysics, and then increment it during each pass through clientmoveanddisplay. (Make sure also that the application always starts unpaused now.) 12. Once 1000 timesteps have elapsed, the application should terminate: void RagdollDemo::clientMoveAndDisplay() { timestep++; if ( timestep==1000 ) exit(0); } 13. Run the executable several times. You should see the robot move for 1000 time steps and then see the simulation terminate. 14. You should have code in initphysics that sets the elements of matrix weights to random values. Modify this code so that instead the elements are set to the values stored in weights.dat. 15. Now we need to capture the final position of the robot s main body. So modify the code in clientmoveanddisplay as follows (you will need to make use of Bullet s getcenter OfMassPosition function): void RagdollDemo::clientMoveAndDisplay() { if ( timestep==1000 ) { Save_Position(body[0]); exit(0); } } Within the function, capture the (x,y,z) position of the main body, and print the z-component of this position to the screen. This component reports how much the robot moves toward the viewer (negative values) and how much it moves into the screen (positive values). 16. You may need to pause execution after you print the value, because the application will terminate immediately after printing the value. (The following will pause execution until the user presses Enter.) 3
4 printf char ch = getchar(); 17. Within Save Position, write this value to the file fits.dat immediately after printing it. Verify that the number in the file and the number printed to the screen are the same. 18. Now run the executable several times. Note that it is reading in the same set of weights each time, so the robot s behavior (and its final position) should always be the same. You may see that the behavior is different from one execution to the next. This is because it is sometimes difficult to get the physics engine to behave deterministically, even though in theory it should do so at all times. 19. If you do see that the final positions differ from one run to the next, the culprit often lies in the detection and resolution of contacts. This sometimes results in the touch sensors only being updated once every few time steps, and sometimes this updating is not deterministic. You can fix this by replacing m_dynamicsworld->stepsimulation(ms / f); in clientmoveanddisplay with the following: while ( (touches[2]==0) && (touches[4]==0) && (touches[6]==0) && (touches[8]==0) ) m_dynamicsworld->stepsimulation(ms / f); (This assumes that the third, fifth, seventh and ninth body parts are the four lower legs respectively.) This new code continuously updates the motion of the robot until at least one of the touch sensors fires. 20. If you add this code and you are still seeing different final positions from one run to the next ensure that (1) you are reading in the same 32 synaptic weights in initphysics each time; (2) you are running the simulation for exactly 1000 time steps each time; and (3) all eight motors receive the same desired velocity each time enableangularmotor is called. If you are still observing non-deterministic behavior, contact the instructor. 21. Remove the line that prints the main body s final position and the line that pauses the simulator so that the simulator now runs and then terminates without any user intervention. 22. Now return to your Python code. Immediately after Fitness3 Get sends the weight matrix to a file, it must start the robot simulator. You can use the os package which allows system commands to be executed from within Python code: 4
5 import os; def Fitness3_Get(): [send weight matrix to file weights.dat] # If you are using a Windows machine os.system( App_RagdollDemo_vs2010.exe ); # If you are using a Mac or Linux machine #os.system(./appragdolldemo ); When you run your Python code now, you should see the robot simulator start automatically and then terminate after 1000 time steps. There should be both a weights.dat and fit.dat file sitting in the directory. 23. We must now instruct the Python application to wait until the fit.dat file appears. First, make sure to delete fit.dat in the directory by hand and then add the code: import time; import sys; def Fitness3 os.system() while (exists( fit.dat ) == False): time.sleep(0.2); sys.exit(0); Now, when you run your Python application, you should see it stay open while the robot simulator runs. When the simulator terminates, so too should the Python application. 24. Remove the sys.exit(0) line, and follow it with code that reads in the single value stored in fit.dat. This value should be stored in the variable fitness, which is returned when Fitness3 Get terminates. 25. But before this function terminates it must delete the two files weights.dat and fit. You can accomplish this using the Python command os.remove(filename). 26. Now when you run your Python code you should should observe the following: (1) the Python application stays open while the simulator runs; (2) both applications terminate together; and (3) weights.dat and fit.dat are no longer in the directory. 27. You can now uncomment the remaining lines of Evolve, so that the hill climber runs. Remember to use the new Fitness3 Get function when evaluating the fitness of the child set of synaptic weights: 5
6 Figure 1: Visual display of a high-fitness robot and a running print out from the hill climber that produced it. parentfit = Fitness3_Get(parent); for g in range(0,numgenerations): childfit = Fitness3_Get(child); print g, parentfit, childfit; if ( childfit > parentfit ): 28. You should observe a series of robots now. Over a few minutes, you should observe robots evolving the ability to locomote increasingly further into the screen. Capture one such robot in a screenshot, alongside a print out of your hill climber running. The first value in each row should report the current generation; the second value reports the furthest any robot has yet travelled into the screen (parentfit); and the third value should report the distance travelled by the previous robot (childfit). Upload this single screenshot to the Wiki. 6
CS206: Evolutionary Robotics
CS206: Evolutionary Robotics Programming Assignment 8 of 10 Description: In this week s assignment you will add sensors to your robot. You will add one binary touch sensor in each of the four lower legs:
More informationModern Robots: Evolutionary Robotics
Modern Robots: Evolutionary Robotics Programming Assignment 1 of 10 Overview In the field of evolutionary robotics an evolutionary algorithm is used to automatically optimize robots so that they perform
More informationRobotics 2c. The Programming Interface
Robotics 2c What we re going to do in this session. Introduce you to the Lego Mindstorm Programming Interface. The Programming Interface The Lego Mindstorm EV3 kit uses a proprietary interface with its
More informationCoverage-Guided Fuzzing
Coverage-Guided Fuzzing Dynamic Coverage Static Structure Security Testing Andreas Zeller, Saarland University Smart Algorithms Our Goal We want to cause the program to fail We have seen random (unstructured)
More informationChapter 5 Components for Evolution of Modular Artificial Neural Networks
Chapter 5 Components for Evolution of Modular Artificial Neural Networks 5.1 Introduction In this chapter, the methods and components used for modular evolution of Artificial Neural Networks (ANNs) are
More informationCamJam EduKit Robotics Worksheet Four Driving & Turning camjam.me/edukit
- Driving and Turning Project Description Driving and Turning You will learn how to make your robot move in the direction you want it to. Equipment Required For this worksheet, you will require: Your robot
More informationEECE.2160: ECE Application Programming Spring 2018 Programming Assignment #6: Using Arrays to Count Letters in Text Due Wednesday, 4/4/18, 11:59:59 PM
Spring 2018 Programming Assignment #6: Using Arrays to Count Letters in Text Due Wednesday, 4/4/18, 11:59:59 PM 1. Introduction In this program, you will practice working with arrays. Your program will
More information1 Lab + Hwk 5: Particle Swarm Optimization
1 Lab + Hwk 5: Particle Swarm Optimization This laboratory requires the following equipment: C programming tools (gcc, make). Webots simulation software. Webots User Guide Webots Reference Manual. The
More informationVariables and Functions. ROBOTC Software
Variables and Functions ROBOTC Software Variables A variable is a space in your robots memory where data can be stored, including whole numbers, decimal numbers, and words Variable names follow the same
More informationIntroduction to Programming in C Department of Computer Science and Engineering. Lecture No. #17. Loops: Break Statement
Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #17 Loops: Break Statement (Refer Slide Time: 00:07) In this session we will see one more feature that is present
More informationLab 1 Introduction to UNIX and C
Name: Lab 1 Introduction to UNIX and C This first lab is meant to be an introduction to computer environments we will be using this term. You must have a Pitt username to complete this lab. The doc is
More informationGeneral Syntax. Operators. Variables. Arithmetic. Comparison. Assignment. Boolean. Types. Syntax int i; float j = 1.35; int k = (int) j;
General Syntax Statements are the basic building block of any C program. They can assign a value to a variable, or make a comparison, or make a function call. They must be terminated by a semicolon. Every
More information1 Lab + Hwk 5: Particle Swarm Optimization
1 Lab + Hwk 5: Particle Swarm Optimization This laboratory requires the following equipment: C programming tools (gcc, make), already installed in GR B001 Webots simulation software Webots User Guide Webots
More informationThere are algorithms, however, that need to execute statements in some other kind of ordering depending on certain conditions.
Introduction In the programs that we have dealt with so far, all statements inside the main function were executed in sequence as they appeared, one after the other. This type of sequencing is adequate
More informationCS16 Exam #1 7/17/ Minutes 100 Points total
CS16 Exam #1 7/17/2012 75 Minutes 100 Points total Name: 1. (10 pts) Write the definition of a C function that takes two integers `a` and `b` as input parameters. The function returns an integer holding
More informationApplication State Machine
Application State Machine Project In this tutorial, create a real, working program to help you learn how to develop programs for your own applications in the future. This tutorial guides you through writing
More informationUniform Motion Lab. The position equation for an object moving with a constant velocity is:
Uniform Motion Lab INTRODUCTION: In this experiment we will investigate motion without acceleration. Motion without acceleration is uniform (constant velocity) motion, which means it describes the motion
More informationThreads CS1372. Lecture 13. CS1372 Threads Fall / 10
Threads CS1372 Lecture 13 CS1372 Threads Fall 2008 1 / 10 Threads 1 In order to implement concurrent algorithms, such as the parallel bubble sort discussed previously, we need some way to say that we want
More informationObject oriented programming. Instructor: Masoud Asghari Web page: Ch: 3
Object oriented programming Instructor: Masoud Asghari Web page: http://www.masses.ir/lectures/oops2017sut Ch: 3 1 In this slide We follow: https://docs.oracle.com/javase/tutorial/index.html Trail: Learning
More informationCMSC 201 Spring 2019 Lab 06 Lists
CMSC 201 Spring 2019 Lab 06 Lists Assignment: Lab 06 Lists Due Date: Thursday, March 7th by 11:59:59 PM Value: 10 points This week s lab will put into practice the concepts you learned about lists: indexing,
More informationChapter 5. Repetition. Contents. Introduction. Three Types of Program Control. Two Types of Repetition. Three Syntax Structures for Looping in C++
Repetition Contents 1 Repetition 1.1 Introduction 1.2 Three Types of Program Control Chapter 5 Introduction 1.3 Two Types of Repetition 1.4 Three Structures for Looping in C++ 1.5 The while Control Structure
More informationSemester 2, 2018: Lab 1
Semester 2, 2018: Lab 1 S2 2018 Lab 1 This lab has two parts. Part A is intended to help you familiarise yourself with the computing environment found on the CSIT lab computers which you will be using
More informationCS 231 Data Structures and Algorithms, Fall 2016
CS 231 Data Structures and Algorithms, Fall 2016 Dr. Bruce A. Maxwell Department of Computer Science Colby College Course Description Focuses on the common structures used to store data and the standard
More informationIntroduction to Programming in C Department of Computer Science and Engineering. Lecture No. #28. Functions: Examples 2
Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #28 Functions: Examples 2 (Refer Slide Time: 00:14) With the concepts we have seen so far, let us design a sample
More information1. Introduction. 2. Motivation and Problem Definition. Volume 8 Issue 2, February Susmita Mohapatra
Pattern Recall Analysis of the Hopfield Neural Network with a Genetic Algorithm Susmita Mohapatra Department of Computer Science, Utkal University, India Abstract: This paper is focused on the implementation
More informationLab 4: Tracery Recursion in C with Linked Lists
Lab 4: Tracery Recursion in C with Linked Lists For this lab we will be building on our previous lab at the end of the previous lab you should have had: #include #include char * make_string_from
More informationWindows architecture. user. mode. Env. subsystems. Executive. Device drivers Kernel. kernel. mode HAL. Hardware. Process B. Process C.
Structure Unix architecture users Functions of the System tools (shell, editors, compilers, ) standard library System call Standard library (printf, fork, ) OS kernel: processes, memory management, file
More informationUnit E Step-by-Step: Programming with Python
Unit E Step-by-Step: Programming with Python Computer Concepts 2016 ENHANCED EDITION 1 Unit Contents Section A: Hello World! Python Style Section B: The Wacky Word Game Section C: Build Your Own Calculator
More informationAN EXPLORATION-ESTIMATION ALGORITHM FOR SYNTHESIS AND ANALYSIS OF ENGINEERING SYSTEMS USING MINIMAL PHYSICAL TESTING
Proceedings of DETC04 2004 ASME Design Engineering Technical Conferences September 28, 2004, Salt Lake City, Utah DETC2004-57574 AN EXPLORATION-ESTIMATION ALGORITHM FOR SYNTHESIS AND ANALYSIS OF ENGINEERING
More informationCS 470 Operating Systems Spring 2013 Shell Project
CS 470 Operating Systems Spring 2013 Shell Project 40 points Out: January 11, 2013 Due: January 25, 2012 (Friday) The purpose of this project is provide experience with process manipulation and signal
More informationAgent Design Example Problems State Spaces. Searching: Intro. CPSC 322 Search 1. Textbook Searching: Intro CPSC 322 Search 1, Slide 1
Searching: Intro CPSC 322 Search 1 Textbook 3.0 3.3 Searching: Intro CPSC 322 Search 1, Slide 1 Lecture Overview 1 Agent Design 2 Example Problems 3 State Spaces Searching: Intro CPSC 322 Search 1, Slide
More informationCS50 Supersection (for those less comfortable)
CS50 Supersection (for those less comfortable) Friday, September 8, 2017 3 4pm, Science Center C Maria Zlatkova, Doug Lloyd Today s Topics Setting up CS50 IDE Variables and Data Types Conditions Boolean
More informationEigen Tutorial. CS2240 Interactive Computer Graphics
CS2240 Interactive Computer Graphics CS2240 Interactive Computer Graphics Introduction Eigen is an open-source linear algebra library implemented in C++. It s fast and well-suited for a wide range of tasks,
More informationUNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Summer 2016 Programming Assignment 1 Introduction The purpose of this
UNIVERSITY OF NEBRASKA AT OMAHA Computer Science 4500/8506 Operating Systems Summer 2016 Programming Assignment 1 Introduction The purpose of this programming assignment is to give you some experience
More informationCOMP 2718: The OS, Shell, Terminal, and Text
COMP 2718: The OS, Shell, Terminal, and Text By: Dr. Andrew Vardy Adapted from the notes of Dr. Rod Byrne Outline What is an Operating System? The Shell and Terminal How are Characters Encoded? Standard
More informationEECE.2160: ECE Application Programming Spring 2018 Programming Assignment #1: A Simple C Program Due Monday, 1/29/18, 11:59:59 PM
Spring 2018 Programming Assignment #1: A Simple C Program Due Monday, 1/29/18, 11:59:59 PM 1. Introduction This program simply tests your ability to write, compile, execute, and submit programs using the
More informationData Association for SLAM
CALIFORNIA INSTITUTE OF TECHNOLOGY ME/CS 132a, Winter 2011 Lab #2 Due: Mar 10th, 2011 Part I Data Association for SLAM 1 Introduction For this part, you will experiment with a simulation of an EKF SLAM
More informationBasic program The following is a basic program in C++; Basic C++ Source Code Compiler Object Code Linker (with libraries) Executable
Basic C++ Overview C++ is a version of the older C programming language. This is a language that is used for a wide variety of applications and which has a mature base of compilers and libraries. C++ is
More informationAndrew Nassau MAE 11. Turning Code for the Cornell Ranger Robot May 22nd, MAE 4920 Final Report 2 credits Spring 2010
Andrew Nassau ann8@cornell.edu MAE 11 Turning Code for the Cornell Ranger Robot May 22nd, 2010 MAE 4920 Final Report 2 credits Spring 2010 Biorobotics and Locomotion Lab 306 Kimball Hall Cornell University
More information4.8 Summary. Practice Exercises
Practice Exercises 191 structures of the parent process. A new task is also created when the clone() system call is made. However, rather than copying all data structures, the new task points to the data
More informationScripting With Jython
Scripting With Jython In this chapter, we will look at scripting with Jython. For our purposes, we will define scripting as the writing of small programs to help out with daily tasks. These tasks are things
More informationOregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011
Oregon State University School of Electrical Engineering and Computer Science CS 261 Recitation 1 Spring 2011 Outline Using Secure Shell Clients GCC Some Examples Intro to C * * Windows File transfer client:
More informationTic-Tac-Toe. By the time you are done with this activity, you and your team should be able to:
Tic-Tac-Toe Team Name: Manager: Recorder: Presenter: Analyst: This is a Process Oriented Guided Inquiry Learning (POGIL) activity. You and your team will examine a working program. A series of questions
More informationCompiling C++ Programs Flow Control in C++ CS 16: Solving Problems with Computers I Lecture #3
Compiling C++ Programs Flow Control in C++ CS 16: Solving Problems with Computers I Lecture #3 Ziad Matni Dept. of Computer Science, UCSB Compiling Programs in C++ Input and Output Streams Simple Flow
More information9/10/2016. Time for Some Detailed Examples. ECE 120: Introduction to Computing. Let s See How This Loop Works. One Statement/Step at a Time
University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Examples of C Programs with Loops Time for Some Detailed Examples Let s do some
More informationGrove - Thumb Joystick
Grove - Thumb Joystick Release date: 9/20/2015 Version: 1.0 Wiki: http://www.seeedstudio.com/wiki/grove_-_thumb_joystick Bazaar: http://www.seeedstudio.com/depot/grove-thumb-joystick-p-935.html 1 Document
More informationCoordinate System Techniques
Coordinate System Techniques In this lesson, we ll show some advanced implications of what can be done with coordinate systems. For the most part, this lesson applies to machining centers. But there are
More informationthen the mouse must be on location 6 (because for it to be 5 squares away in the other direction, it would have to be off the end of the world.
State Estimation Now, let s assume a particular environment for the cat and mouse, and that the cat doesn t know exactly where the mouse is. The cat and mouse live in a world that is a1by10 grid. On each
More informationECE 5750 Advanced Computer Architecture Programming Assignment #1
ECE 5750 Advanced Computer Architecture Programming Assignment #1 Objective The objective of this assignment is to gain hands-on experience in writing parallel programs for shared-memory machines. You
More informationCS4023 Week06 Lab Exercise
CS4023 Week06 Lab Exercise Lab Objective: In this week s lab we will look at writing a program that reads a large matrix of numbers and then reports all numbers that are equal to a reference value (or
More informationIntroduction to Programming in C Department of Computer Science and Engineering. Lecture No. #43. Multidimensional Arrays
Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #43 Multidimensional Arrays In this video will look at multi-dimensional arrays. (Refer Slide Time: 00:03) In
More informationComputer Science 322 Operating Systems Mount Holyoke College Spring Topic Notes: C and Unix Overview
Computer Science 322 Operating Systems Mount Holyoke College Spring 2010 Topic Notes: C and Unix Overview This course is about operating systems, but since most of our upcoming programming is in C on a
More informationUNIX Processes. by Armin R. Mikler. 1: Introduction
UNIX Processes by Armin R. Mikler Overview The UNIX Process What is a Process Representing a process States of a process Creating and managing processes fork() wait() getpid() exit() etc. Files in UNIX
More informationACORN.COM CS 1110 SPRING 2012: ASSIGNMENT A1
ACORN.COM CS 1110 SPRING 2012: ASSIGNMENT A1 Due to CMS by Tuesday, February 14. Social networking has caused a return of the dot-com madness. You want in on the easy money, so you have decided to make
More informationAssignment3 CS206 Intro to Data Structures Fall Part 1 (50 pts) due: October 13, :59pm Part 2 (150 pts) due: October 20, :59pm
Part 1 (50 pts) due: October 13, 2013 11:59pm Part 2 (150 pts) due: October 20, 2013 11:59pm Important Notes This assignment is to be done on your own. If you need help, see the instructor or TA. Please
More informationEscaping Local Optima: Genetic Algorithm
Artificial Intelligence Escaping Local Optima: Genetic Algorithm Dae-Won Kim School of Computer Science & Engineering Chung-Ang University We re trying to escape local optima To achieve this, we have learned
More informationTeam Name: Domo Arigato Robot Name: Chipotle 1. Team Members: Jason DiSalvo Brian Eckerly Keun Young Jang Neal Mehan Arun Rajmohan
Team Name: Domo Arigato Robot Name: Chipotle 1 Team Members: Jason DiSalvo Brian Eckerly Keun Young Jang Neal Mehan Arun Rajmohan Accomplished So Far Familiarized ourselves with startup procedures for
More informationCS 302: INTRODUCTION TO PROGRAMMING. Lectures 7&8
CS 302: INTRODUCTION TO PROGRAMMING Lectures 7&8 Hopefully the Programming Assignment #1 released by tomorrow REVIEW The switch statement is an alternative way of writing what? How do you end a case in
More informationCS12020 (Computer Graphics, Vision and Games) Worksheet 1
CS12020 (Computer Graphics, Vision and Games) Worksheet 1 Jim Finnis (jcf1@aber.ac.uk) 1 Getting to know your shield First, book out your shield. This might take a little time, so be patient. Make sure
More informationLecture 2, September 4
Lecture 2, September 4 Intro to C/C++ Instructor: Prashant Shenoy, TA: Shashi Singh 1 Introduction C++ is an object-oriented language and is one of the most frequently used languages for development due
More informationQuestion - 1 Ransomizer
California HSPC 18 18 minutes Question - 1 Ransomizer As seen in movies, ransom holders do not send out the note with instructions and details with their own handwriting, fearing that they will be identified.
More informationOverview. - General Data Types - Categories of Words. - Define Before Use. - The Three S s. - End of Statement - My First Program
Overview - General Data Types - Categories of Words - The Three S s - Define Before Use - End of Statement - My First Program a description of data, defining a set of valid values and operations List of
More informationLab 1 Introduction to UNIX and C
Name: Lab 1 Introduction to UNIX and C This first lab is meant to be an introduction to computer environments we will be using this term. You must have a Pitt username to complete this lab. NOTE: Text
More informationExceptions. CS162: Introduction to Computer Science II. Exceptions. Exceptions. Exceptions. Exceptions. Exceptions
CS162: Introduction to Computer Science II A typical way to handle error conditions is through the return value. For example, suppose we create a loadfile() function that returns true if it loaded the
More informationCS Lecture 19: Loop invariants
CS 1110 Lecture 19: Loop invariants Announcements Prelim 2 conflicts Today (April 2) is two weeks before the prelim, and the deadline for submitting prelim conflicts. Instructor travel This week and the
More informationMidterm Review. Short Answer. Short Answer. Practice material from the Winter 2014 midterm. Will cover some (but not all) of the questions.
Midterm Review Practice material from the Winter 2014 midterm. Will cover some (but not all) of the questions. Midterm content: Everything up to / including modules. CS 136 Spring 2018 Tutorial 7 1 List
More informationCS 1110, LAB 1: EXPRESSIONS AND ASSIGNMENTS First Name: Last Name: NetID:
CS 1110, LAB 1: EXPRESSIONS AND ASSIGNMENTS http://www.cs.cornell.edu/courses/cs1110/2018sp/labs/lab01/lab01.pdf First Name: Last Name: NetID: Learning goals: (1) get hands-on experience using Python in
More informationProject 2: Shell with History1
Project 2: Shell with History1 See course webpage for due date. Submit deliverables to CourSys: https://courses.cs.sfu.ca/ Late penalty is 10% per calendar day (each 0 to 24 hour period past due). Maximum
More informationLab 03: Edge Detection Tutorial
Lab 03: Edge Detection Tutorial Step 1: Start LabVIEW(LV) Robotics 2009, and then create a new robotics project. The project explorer window will then pop up. Save this project as Lab3EdgeDetection. Once
More informationCS 326: Operating Systems. Process Execution. Lecture 5
CS 326: Operating Systems Process Execution Lecture 5 Today s Schedule Process Creation Threads Limited Direct Execution Basic Scheduling 2/5/18 CS 326: Operating Systems 2 Today s Schedule Process Creation
More informationCS 564 PS1. September 10, 2017
CS 564 PS1 September 10, 2017 Instructions / Notes: Using the IPython version of this problem set is strongly recommended, however you can use only this PDF to do the assignment, or replicate the functionality
More information1 Lab 5: Particle Swarm Optimization
1 Lab 5: Particle Swarm Optimization This laboratory requires the following: (The development tools are installed in GR B0 01 already): C development tools (gcc, make, etc.) Webots simulation software
More informationCS 395 Fall 2000 Behavior-Based Robotics Pracitce Quiz 1
CS 395 Fall 2000 Behavior-Based Robotics Pracitce Quiz 1 This is longer than a real quiz would be. Question 1 (30 points) You have a robot equipped with a heat-sensing camera that can track people. You
More informationCS 31: Intro to Systems Pointers and Memory. Kevin Webb Swarthmore College October 2, 2018
CS 31: Intro to Systems Pointers and Memory Kevin Webb Swarthmore College October 2, 2018 Overview How to reference the location of a variable in memory Where variables are placed in memory How to make
More informationUnit 3 Decision making, Looping and Arrays
Unit 3 Decision making, Looping and Arrays Decision Making During programming, we have a number of situations where we may have to change the order of execution of statements based on certain conditions.
More informationCS 177 Week 5 Recitation Slides. Loops
CS 177 Week 5 Recitation Slides Loops 1 Announcements Project 1 due tonight at 9PM because of evac. Project 2 is posted and is due on Oct. 8th 9pm Exam 1 Wednesday Sept 30 6:30 7:20 PM Please see class
More informationMachine Evolution. Machine Evolution. Let s look at. Machine Evolution. Machine Evolution. Machine Evolution. Machine Evolution
Let s look at As you will see later in this course, neural networks can learn, that is, adapt to given constraints. For example, NNs can approximate a given function. In biology, such learning corresponds
More informationCreating New Neuron Models for SpiNNaker
Introduction Creating New Neuron Models for SpiNNaker This manual will guide you in the creation of new neuron models to be run on SpiNNaker. This includes the C code that will be compiled to run on the
More informationIn Fig. 3.5 and Fig. 3.7, we include some completely blank lines in the pseudocode for readability. programs into their various phases.
Formulating Algorithms with Top-Down, Stepwise Refinement Case Study 2: Sentinel-Controlled Repetition In Fig. 3.5 and Fig. 3.7, we include some completely blank lines in the pseudocode for readability.
More information8. Characters and Arrays
COMP1917 15s2 8. Characters and Arrays 1 COMP1917: Computing 1 8. Characters and Arrays Reading: Moffat, Section 7.1-7.5 ASCII The ASCII table gives a correspondence between characters and numbers behind
More informationjust a ((somewhat) safer) dialect.
Intro_to_C Page 1 Intro to C Tuesday, September 07, 2004 5:30 PM C was developed specifically for writing operating systems Low level of abstraction. "Just above machine language." Direct access to the
More informationArtificial Intelligence Lecture 6
Artificial Intelligence Lecture 6 Lecture plan AI in general (ch. 1) Search based AI (ch. 4) search, games, planning, optimization (ch. 8) applied AI techniques in robots, software agents,... Knowledge
More informationLME Software Block Quick Reference 1. Common Palette
LME Software Block Quick Reference Common Palette Move Block Use this block to set your robot to go forwards or backwards in a straight line or to turn by following a curve. Define how far your robot will
More informationProcess control. Game plan: Fork. Scribe notes for 11/11/14 by Diane Yang, Kara Shen, and Chris Lim. fork exec pipes
Scribe notes for 11/11/14 by Diane Yang, Kara Shen, and Chris Lim Process control Game plan: fork exec pipes All code can be found in the l19 directory Fork fork1.c Recall that fork returns 0 to child
More informationCMSC 201 Spring 2017 Lab 05 Lists
CMSC 201 Spring 2017 Lab 05 Lists Assignment: Lab 05 Lists Due Date: During discussion, February 27th through March 2nd Value: 10 points (8 points during lab, 2 points for Pre Lab quiz) This week s lab
More informationCMSC 201 Spring 2018 Lab 01 Hello World
CMSC 201 Spring 2018 Lab 01 Hello World Assignment: Lab 01 Hello World Due Date: Sunday, February 4th by 8:59:59 PM Value: 10 points At UMBC, the GL system is designed to grant students the privileges
More informationProblem Set 1: Unix Commands 1
Problem Set 1: Unix Commands 1 WARNING: IF YOU DO NOT FIND THIS PROBLEM SET TRIVIAL, I WOULD NOT RECOMMEND YOU TAKE THIS OFFERING OF 300 AS YOU DO NOT POSSESS THE REQUISITE BACKGROUND TO PASS THE COURSE.
More informationCS102: Standard I/O. %<flag(s)><width><precision><size>conversion-code
CS102: Standard I/O Our next topic is standard input and standard output in C. The adjective "standard" when applied to "input" or "output" could be interpreted to mean "default". Typically, standard output
More informationProject C: Genetic Algorithms
Project C: Genetic Algorithms Due Wednesday April 13 th 2005 at 8pm. A genetic algorithm (GA) is an evolutionary programming technique used to solve complex minimization/maximization problems. The technique
More informationReview of the C Programming Language for Principles of Operating Systems
Review of the C Programming Language for Principles of Operating Systems Prof. James L. Frankel Harvard University Version of 7:26 PM 4-Sep-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights
More informationPHYS 210: Introduction to Computational Physics Octave/MATLAB Exercises 1
PHYS 210: Introduction to Computational Physics Octave/MATLAB Exercises 1 1. Problems from Gilat, Ch. 1.10 Open a terminal window, change to directory /octave, and using your text editor, create the file
More informationCS2351 Data Structures. Lecture 7: A Brief Review of Pointers in C
CS2351 Data Structures Lecture 7: A Brief Review of Pointers in C 1 About this lecture Pointer is a useful object that allows us to access different places in our memory We will review the basic use of
More informationCS 11 python track: lecture 3. n Today: Useful coding idioms
CS 11 python track: lecture 3 Today: Useful coding idioms Useful coding idioms "Idiom" Standard ways of accomplishing a common task Using standard idioms won't make your code more correct, but more concise
More informationCS 105, Spring 2015 Ring Buffer
CS 105, Spring 2015 Ring Buffer March 10, 2015 1 Introduction A ring buffer, also called a circular buffer, is a common method of sharing information between a producer and a consumer. In class, we have
More informationOperating Systems Lab
Operating Systems Lab Islamic University Gaza Engineering Faculty Department of Computer Engineering Fall 2012 ECOM 4010: Operating Systems Lab Eng: Ahmed M. Ayash Lab # 3 Fork() in C and C++ programming
More informationReview of the C Programming Language
Review of the C Programming Language Prof. James L. Frankel Harvard University Version of 11:55 AM 22-Apr-2018 Copyright 2018, 2016, 2015 James L. Frankel. All rights reserved. Reference Manual for the
More informationIntroduction to Programming in C Department of Computer Science and Engineering. Lecture No. #29 Arrays in C
Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #29 Arrays in C (Refer Slide Time: 00:08) This session will learn about arrays in C. Now, what is the word array
More informationLaunch Your Virtual World Fast
Launch Your Virtual World Fast Learn how to build your own virtual world with free open source software Copyright 2009 by Michael McAnally, Document Version 1.0 June 30, 2009 Figure 1. Screen shot of a
More informationThe C Programming Language Guide for the Robot Course work Module
The C Programming Language Guide for the Robot Course work Module Eric Peasley 2018 v6.4 1 2 Table of Contents Variables...5 Assignments...6 Entering Numbers...6 Operators...7 Arithmetic Operators...7
More informationChapter 2. Section 2.5 while Loop. CS 50 Hathairat Rattanasook
Chapter 2 Section 2.5 while Loop CS 50 Hathairat Rattanasook Loop Iteration means executing a code segment more than once. A loop is an iterative construct. It executes a statement 0..n times while a condition
More information