LCC 6310 Computation as an Expressive Medium - PowerPoint PPT Presentation

1 / 37
About This Presentation
Title:

LCC 6310 Computation as an Expressive Medium

Description:

Expressive AI: Artificial Intelligence-based art and entertainment ... Black and White, 2000. Peter Molyneux (Lionhead) Work. Terminal Time interactive video ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 38
Provided by: michael74
Category:

less

Transcript and Presenter's Notes

Title: LCC 6310 Computation as an Expressive Medium


1
LCC 6310Computation as an Expressive Medium
  • Lecture 1

2
Overview
  • Go over the syllabus
  • Brief introduction to me and my work
  • Art, programming and Java

3
Syllabus
4
Background
  • Ph.D. in Computer Science
  • Expressive AI Artificial Intelligence-based art
    and entertainment
  • Worked in industrial research labs (Intel,
    Tektronix) doing HCI research
  • New at Georgia Tech arrived in January

5
AI Art
Black and White, 2000
The Senster, 1970
Edward Ihnatowicz
Peter Molyneux (Lionhead)
6
Work
Façade interactive drama
Terminal Time interactive video
Office Plant 1 robotic sculpture
7
Façade
  • Dramatic world inhabited by computer controlled
    characters (believable agents)
  • The user (player) plays a protagonist within the
    story, first-person point of view
  • The player experiences a story with a dramatic arc

Collaborator
Andrew Stern, independent artist and researcher
8
Terminal Time
Goal trees (ideology)
Historical events
Audience feedback
Collaborators
Steffi Domike, Design Department, Chatham College
Paul Vanouse, Art Department, SUNY Buffalo
9
Office Plant 1
  • Creates a background presence
  • Sorts incoming email into social and emotional
    categories
  • Behavior is a function of the email received

Collaborator
Marc Bohlen, Media Studies, SUNY Buffalo
10
Combine AI research and art
Expressive AI
Artistic practice
AI research
AI methods and technology suggest new audience
experiences
Wrestling with meaningful human experiences
suggests new AI research directions
11
Some directions
  • Im someone to chat with about
  • Interactive story (particularly procedural
    approaches)
  • Robotic sculpture
  • Video games as a cultural practice (design and
    technology)
  • Meta-art (generative systems)

12
Introduce yourselves
13
Programming languages
  • Abstract, human understandable language for
    telling computer what to do
  • The abstract language must be translated into the
    low level language understood by the machine
  • This translation is accomplished by an
    interpreter or compiler
  • We will be learning the compiled language Java

14
A simple Java program
class PrintLoop public static void
main(String args) for (int i 0 i lt 10
i) System.out.println("i " i)

Just prints the numbers 0 to 9 on the screen
15
Human readable is relative
class PrintLoop public static void
main(String args) for (int i 0 i lt 10
i) System.out.println("i " i)

Java compiler translates this into
16
Java VM assembly code
public static void main(java.lang.String)
Code 0 iconst_0 1 istore_1 2
goto 30 5 getstatic 8 new 11
dup 12 ldc 14 invokespecial 23 17
iload_1 18 invokevirtual 27 21
invokevirtual 31
24 invokevirtual 34 27 iinc 1, 1
30 iload_1 31 bipush 10 33 if_icmplt
5 36 return test.PrintLoop() Code 0
aload_0 1 invokespecial 43 4
return
17
Object Oriented vs. Procedural Languages
  • Procedural (e.g. C)
  • We create some data representing an image (array
    of pixels to draw on the screen)
  • We write a procedure than can be passed the image
    and will draw it
  • Object Oriented (e.g. Java)
  • We create a class that contains an image AND a
    routine draw it
  • The data and the behavior (ability to draw) are
    in one "container"

18
A couple of Javas relatives
  • Smalltalk 80
  • Alan Kay and the Dynabook (PARC)
  • C
  • Managing big C programs Bjarne Stroustrup

19
Smalltalk 80
  • Alan Kay and the Dynabook (PARC)
  • Developed idea of a general purpose computer to
    be used by normal people!
  • Highly interactive interface
  • Included concept of windows!
  • Smalltalk 80 end users could create their own
    tools

20
Smalltalk 80
  • Includes objects
  • Objects contain data and procedures
  • Procedures in objects are called methods
  • All computing is done by sending a message to an
    object asking it to perform one of its method
  • Objects are defined by classes

21
C
  • Managing big C programs Bjarne Stroustrup
  • Started as "C with Classes" idea borrowed from
    Simula 67 Smalltalk
  • Goals
  • Organize programs as classes with inheritance
  • No performance penalty compared to C
  • Thus somewhat dangerous!!!
  • C is converted into C

22
Java
  • Designers started with C
  • Smaller
  • Simpler
  • Safer
  • Programming embedded systems
  • Toasters, microwave ovens, TV set top boxes
  • Reliability very important--avoid costly recalls
  • Web programming
  • Incorporated into web browsers at critical moment

23
The virtual machine
  • Since Java was designed to run on embedded
    systems, it was designed around a virtual machine
  • Write once, run everywhere

PC
Mac
Cell Phone
Java VM
Java VM
Java VM
Windows
OS X
Phone OS
Processor
x86
G3/4/5
Java Machine
Java OS
Java VM
24
Steps for running a Java program
Execute program
OS-specific Object Code
25
Structure of Java programs
  • Create one or more Java source files
  • Compile each source file into a class file
  • An application consists of these class files (not
    a single file like a .exe)
  • To run the program, send one of the class files
    to Java
  • This entry file must have method called main
  • public static void main(String argv)

26
Sample application
File HelloWorld.java
  • public class HelloWorld
  • public void greet()
  • System.out.println("Hello World!")
  • public static void main(String argv)
  • HelloWorld hw new HelloWorld()
  • hw.greet()

27
Java file and class names
  • Source code files must have the ".java"
    extension.
  • The file name should match the class name. The
    class name should start with a capital letter.
    This naming convention is enforced by most
    reasonable compilers.
  • A file containing
  • class HelloWorld
  • must be named HelloWorld.java
  • Compiled bytecode has the ".class" extension

28
Compiling HelloWorld
HelloWorld.class
javac
javac HelloWorld.java
0xCAFEBABE ...
javac is the Java Compiler
29
Executing HelloWorld
java HelloWorld
java is the Java Virtual Machine
Cgtjava HelloWorld Hello World! Cgt
30
Object Oriented Programming
  • OOP is all about programming using something
    called an object.
  • Objects are created from classes. An object is
    called an instance of a class.
  • Objects do useful stuff by calling methods on
    them.
  • Lets look at classes and objects in more detail.

31
Previously...
  • public class HelloWorld
  • public void greet()
  • System.out.println("Hello World!")
  • public static void main(String argv)
  • HelloWorld hw new HelloWorld()
  • hw.greet()

32
A Class
A class will be used to define how objects made
from this class will operate
  • class Greeter
  • String greeting
  • public Greeter(String newGreeting)
  • greeting newGreeting
  • public void greet(String name)
  • System.out.println(greeting ", " name)

33
Field
A class typically will have one or more
fields which are the data items which the object
holds
  • class Greeter
  • String greeting
  • public Greeter(String newGreeting)
  • greeting newGreeting
  • public void greet(String name)
  • System.out.println(greeting ", " name)

34
A Constructor
Classes can have Constructors which contain code
only run when an object is created. Useful for
initialization
  • class Greeter
  • String greeting
  • public Greeter(String newGreeting)
  • greeting newGreeting
  • public void greet(String name)
  • System.out.println(greeting ", " name)

35
A Method
Once created an object can be asked to run a
"method" which will do something
normally involving data stored by the
object (plus sometimes data passed in.)
  • class Greeter
  • String greeting
  • public Greeter(String newGreeting)
  • greeting newGreeting
  • public void greet(String name)
  • System.out.println(greeting ", " name)

36
Another Class
This class is just being used to hold a main
method. Here we make two Greeter objects and use
them
  • class Driver
  • public static void main(String args)
  • Greeter g1 new Greeter("Hello")
  • Greeter g2
  • g2 new Greeter("Good morning")
  • g1.greet("Bob")
  • g2.greet("Mary")
  • g1.greet("Sam")
  • g2.greet("Joan")

Cgtjava Driver Hello, Bob Good morning,
Mary Hello, Sam Good morning, Joan Cgt
37
OOP
  • OOP consists of designing a bunch of classes most
    of which are used as templates to make objects
  • The objects are used to hold data
  • They are initialized with constructors and
    perform useful functions by being asked to run
    their methods
Write a Comment
User Comments (0)
About PowerShow.com