T o H elp I ndividuals N eeding K nowledge T hink L isten C ount 12/03/2009 Dr. Hodges’ Lesson Plan.
E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.
-
Upload
dwight-price -
Category
Documents
-
view
215 -
download
0
Transcript of E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.
![Page 1: E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.](https://reader035.fdocuments.us/reader035/viewer/2022062518/5697bf831a28abf838c86421/html5/thumbnails/1.jpg)
EExpressingxpressing
ZZombiesombies
asasPProgrammablerogrammable
IIndividualsndividuals Abhinav Sharma
Wayne ShuMiles Ulrich
![Page 2: E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.](https://reader035.fdocuments.us/reader035/viewer/2022062518/5697bf831a28abf838c86421/html5/thumbnails/2.jpg)
What is EZ as PI?What is EZ as PI?An imperative, interpreted
language for zombie apocalypse simulation
Educational and fun language for novice programmers
Emphasis on simplicity and flexibility
![Page 3: E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.](https://reader035.fdocuments.us/reader035/viewer/2022062518/5697bf831a28abf838c86421/html5/thumbnails/3.jpg)
MotivationMotivationZombies are cool!!
Simulate the spread of an epidemic
Let’s see how Humans can save themselves….Will they??
![Page 4: E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.](https://reader035.fdocuments.us/reader035/viewer/2022062518/5697bf831a28abf838c86421/html5/thumbnails/4.jpg)
Sample OutputSample OutputSource Code:
![Page 5: E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.](https://reader035.fdocuments.us/reader035/viewer/2022062518/5697bf831a28abf838c86421/html5/thumbnails/5.jpg)
Elements of LanguageElements of LanguageBasic Types
#number
@location
^direction
?boolean
!string
Dynamic Attributes (Methods)
##dynamicnum
^^dynamicdirection
…
Human/Zombie
#speed
#power
@start
^strategy
!name
![Page 6: E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.](https://reader035.fdocuments.us/reader035/viewer/2022062518/5697bf831a28abf838c86421/html5/thumbnails/6.jpg)
Basic Program StructureBasic Program StructureDefinitions
- Set constants- Define dynamic attributes
Creation of Elements-Create a world-Populate world with humans & zombies
Simulation Phase- dynamic variations- per clock cycle
Post processing
![Page 7: E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.](https://reader035.fdocuments.us/reader035/viewer/2022062518/5697bf831a28abf838c86421/html5/thumbnails/7.jpg)
Sample ProgramSample Program^^cautious
if imHumanreturn awayFrom nearestZombie
return toward nearestHumanend
##slowOverTimeif time < 100
return 100-timereturn 1
end
create world 20:10
create 20 zombies withspeed slowOverTimestrategy random
end
create 4 humans withstrategy cautious
end
run 100display graphical
end
print “There are {humanCount} humans still alive”
![Page 8: E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.](https://reader035.fdocuments.us/reader035/viewer/2022062518/5697bf831a28abf838c86421/html5/thumbnails/8.jpg)
Translator ArchitectureTranslator ArchitectureLexer Parser
Syntax
tree
Walker
Interpreter
EZ as PI
Library
Other supporting functions
Output
JVM
.ez Source
File
![Page 9: E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.](https://reader035.fdocuments.us/reader035/viewer/2022062518/5697bf831a28abf838c86421/html5/thumbnails/9.jpg)
Tools and EnvironmentTools and EnvironmentDevelopment Tools:
Eclipse 3.5Java 1.6 SDK , SwingANTLR 3.2
Management Tools:Google Code – Version controlMS office
Operating System:WindowsLinux
![Page 10: E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.](https://reader035.fdocuments.us/reader035/viewer/2022062518/5697bf831a28abf838c86421/html5/thumbnails/10.jpg)
TestingTesting
Black Box
White Box
Unit testing
System testing
![Page 11: E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.](https://reader035.fdocuments.us/reader035/viewer/2022062518/5697bf831a28abf838c86421/html5/thumbnails/11.jpg)
Lessons LearntLessons LearntHow to manage time and
resources (limited, less members)Incremental approach towards
problem as a wholeModular is betterChoose the right tools!
![Page 12: E xpressing Z ombies as P rogrammable I ndividuals Abhinav Sharma Wayne Shu Miles Ulrich.](https://reader035.fdocuments.us/reader035/viewer/2022062518/5697bf831a28abf838c86421/html5/thumbnails/12.jpg)
Thank YouThank You