OBJECT-ORIENTED THINKING CHAPTER 26 1. Topics  The Object-Oriented Metaphor  Object-Oriented Flocks of Birds –Boids by Craig W. Reynolds  Modularity.

Slides:



Advertisements
Similar presentations
Creative Computing. Comments on Assignments Everyone did very well Report writing needs more work Jumping scale Update first then draw.
Advertisements

New Mexico Computer Science for All
Flocking and more.  NPC groups can move in cohesive groups not just independently ◦ Meadow of sheep grazing? ◦ Hunting flock of birds? ◦ Ants? Bees?
High Quality Code Why it matters. By Ryan Ruzich.
Evolving Flocking Simulation and Robotics Dan Sayers iotic.com.
Flocking Behaviors Presented by Jyh-Ming Lien. Flocking System What is flocking system? – A system that simulates behaviors of accumulative objects (e.g.
Better Group Behaviors in Complex Environments using Global Roadmaps O. Burchan Bayazit, Jyh-Ming Lien and Nancy M. Amato Presented by Mohammad Irfan Rafiq.
Flocks, Herds, and Schools: A Distributed Behavioral Model By: Craig Reynolds Presented by: Stephanie Grosvenor.
Flying Free Comments on Craig W. Reynolds’ Flocks, Herds, and Schools: A Distributed Behavioral Model Cailin K. Andruss Virginia Commonwealth University.
1 CO Games Development 2 Week 22 Flocking Gareth Bellaby.
Behavioral Animation Procedural Animation Type?. Behavioral Animation Introduced by C. Reynolds (1987) Animating many things at one time –A group of the.
Classes & Objects Computer Science I Last updated 9/30/10.
INTRODUCING OUR LANGUAGE: C# CHAPTER Topics  The Features of C# –C# is an Interpreted Language –C# is Managed Code –C# is Strongly Typed –C# is.
INTRODUCING OUR LANGUAGE: C# CHAPTER Topics  The Features of C# –C# is a Compiled Language –C# is Managed Code –C# is Strongly Typed –C# is Function.
Jochen Triesch, UC San Diego, 1 Emergence A system with simple but strongly interacting parts can often exhibit very intricate.
1 CSE1301 Computer Programming Lecture 25: Software Engineering.
Multi Agent Simulation and its optimization over parallel architecture using CUDA™ Abdur Rahman and Bilal Khan NEDUET(Department Of Computer and Information.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
What is an object? Your dog, your desk, your television set, your bicycle. Real-world objects share two characteristics: They all have state and behavior;
CS 326 A: Motion Planning Motion of Crowds and Flocks.
Better Group Behaviors in Complex Environments using Global Roadmaps O. Burchan Bayazit, Jyh-Ming Lien and Nancy M. Amato Andreas Edlund.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Agent Based Modeling (ABM)
1cs426-winter-2008 Notes  Please read: C. Reynolds “Flocks, Herds, and Schools…” SIGGRAPH ‘87
CSE1301 Computer Programming: Lecture 21 Software Engineering.
Collective Animal Behavior Ariana Strandburg-Peshkin.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Program development & programming languages Chapter 13.
1 Programming James King 12 August Aims Give overview of concepts addressed in Web based programming module Teach you enough Java to write simple.
Chapter 3 – Agile Software Development 1Chapter 3 Agile software development.
Yingcai Xiao Artificial Intelligence in Game Development Yingcai Xiao.
Biology: flocking, herding & schooling Day 5 COLQ 201 Multiagent modeling Harry Howard Tulane University.
CSE 303 – Software Design and Architecture
Problem Solving and Algorithm Design. 2 Problem Solving Problem solving The act of finding a solution to a perplexing, distressing, vexing, or unsettled.
Flow Fields Hao Li and Howard Hamilton. Motivation for Flow Fields Multiple AI algorithms in a computer game can produce conflicting results. The AI must.
L – Modelling and Simulating Social Systems with MATLAB Lesson 5 – Introduction to agent-based simulations A. Johansson & W. Yu ©
PSY105 Neural Networks 1/5 1. “Patterns emerge”. π.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Marie desJardins University of Maryland, Baltimore County.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Event Driven Programming, The.
CSE 219 Computer Science III Program Design Principles.
SE: CHAPTER 7 Writing The Program
1 Systems Analysis and Design in a Changing World, Thursday, January 18, 2007.
Exploring Complex Systems through Games and Computer Models Santa Fe Institute – Project GUTS
GRASP: Designing Objects with Responsibilities
Chapter 2 Software processes. Topics covered Software process models Process activities Coping with change.
CLASS 10 SCENE GRAPHS BASIC ANIMATION CS770/870. A scene Graph A data structure to hold components of a scene Usually a Tree of a Directed Acyclic Graph.
Controlling the Behavior of Swarm Systems Zachary Kurtz CMSC 601, 5/4/
Neural Networks and Machine Learning Applications CSC 563 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
Java Fundamentals Usman Ependi UBD
Program Style Chapter 22 IB103 Week 12 (part 2). Modularity: the ability to reuse code Encapsulation: hide data access directly but may use methods (the.
Particle Swarm Optimization † Spencer Vogel † This presentation contains cheesy graphics and animations and they will be awesome.
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
REFERENCES: FLOCKING.
1 Programming 2 Aims Give overview of concepts addressed in Web based programming module Teach you enough Java to write simple web and network applications.
A few of the people involved and what they’ve done.
Or how to work smarter when building solutions.  2:30 – 3:30 Mondays – focus on problem solving (with some terminology thrown in upon occasion)  All.
Introduction to OOP CPS235: Introduction.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Introduction to Classes, Objects, Methods and Attributes Lecture # 5.
Chapter 2 Principles of Programming and Software Engineering.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To design and implement programs with more than one function ❏ To be able to.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Students: Yossi Turgeman Avi Deri Self-Stabilizing and Efficient Robust Uncertainty Management Instructor: Prof Michel Segal.
Visit for more Learning Resources
Choreographies: the idea
TIM 58 Chapter 8: Class and Method Design
Chapter 4 Functions Objectives
Chapter 2 – Software Processes
Sugarscape: An Application of Agent Based Modeling Andy Menke TJHSST Computer Systems Lab Abstract: Computer scientists have long tried to simulate.
Software Development Chapter 1.
Presentation transcript:

OBJECT-ORIENTED THINKING CHAPTER 26 1

Topics  The Object-Oriented Metaphor  Object-Oriented Flocks of Birds –Boids by Craig W. Reynolds  Modularity 2

The Object-Oriented Metaphor  Consider Object-Oriented Programming as it relates to a flock of birds –For hundreds of years, the motions of bird flocks (and schools of fish) fascinated researchers How do hundreds of individuals move in such coordinated behavior? Which animal "leads" the flock? How is the leader chosen? –To simulate a flock on a computer in a monolithic way, it was thought that a massive function would be required Track every bird's position Make global decisions about the behavior of the flock Figure out how those global decisions would affect each bird –But in a real flock, each bird looks at her own environment, goals, etc. and makes decisions Each bird acts as an individual based on her understanding of the world This is the core concept of Object-Oriented Programming (OOP) 3

Object-Oriented Flocks of Birds  BOIDS provides another approach to flocks –"Flocks, Herds, and Schools: A Distributed Behavioral Model" (1987) by Craig W. Reynolds –A simple, object-oriented approach to flocking behavior that Reynolds called "Boids" –Boids uses three simple rules: Separation Alignment Cohesion 4

Object-Oriented Flocks of Birds  Boids three rules 5 –Separation Avoid crowding nearby flockmates –Alignment Match heading with nearby flockmates –Cohesion Try to center self relative to nearby flockmates Images are from Reynold's website

Object-Oriented Flocks of Birds  These three rules create surprisingly good flocking behavior –  In this chapter of the book, you create a simple 2D version of Boids that runs in Unity 6

Modularity  Another aspect of OOP is Modularity  Through modularity, each piece of code is expected to follow specific parameters –But the internal implementation of that code is up to the individual developer  This enables teams to effectively collaborate on code –Each programmer receives a spec for what her part of the code is supposed to do –That code is encapsulated into one or more classes which are clearly documented 7

Modularity  Collaboration benefits of modular code: –The public fields and methods of each class are pre-specified –Other programmers can write code that will interact with each class without knowing the internals implementation of that class –The internals of the class can be replaced without affecting any other code  However, top-down modularity is often difficult to define ahead of time in game prototypes –Because the spec for a prototype changes rapidly –Instead of top-down, just think bottom-up about making your code easily reusable in later projects –Make each reusable element of your code a module 8

Chapter 26 – Summary 9  In OOP, each instance of a class thinks for itself –Rather than all being controlled by a single function  Through OOP, simple rules can be embedded into each class member  From these simple rules can emerge complex, interesting behaviors  Modular code can help programming teams collaborate  Next Chapter: The Agile Mentality –Learn about how to approach small-team management –Learn to use burndown charts and scrum, which have had tremendous success on small, creative group projects