Title: Computer Systems Lab TJHSST Current Projects 20042005 Second Period
1Computer Systems LabTJHSSTCurrent Projects
2004-2005Second Period
2Current Projects, 2nd Period
- Casey Barrett The Design and Implementation of
Decicion Trees for Career Guidance - Andy Desoto Modeling of Evacuation Centers using
NetLogo - Keith Diggs Optimizing Genetic Algorithms for
Use in Cyphers
2
3Current Projects, 2nd Period
- John Fitzsimmons Creating a 3D Game With
Textures and Lighting - Christopher Goss Paintball Frenzy Graphical
Turn-Based Game With a Minimax AI Agent - Stephen J. Hilber Modeling Evolving Social
Behavior - Rachel Miller Use of Machine Learning to Develop
a Better Artificial Intelligence for Playing
Tic-Tac-Toe
3
4Current Projects, 2nd Period
- Kyle Moffett The Analysis and Maintenance of a
Robust, Highly- Available Computer Systems
Laboratory - Jason Pan Developing an AI Player for "Guess
Who?" - Madeleine E. R. Pitsch Study of Creating
Compuattional Models of Traffic - Timothy Wismer Development of a
Deadlock-Detecting Resource Locking Algorithm for
a Kernel Debugging User-space API Library (KDUAL) - Dan Wright Developing Algorithms for
Computational Comparative Diachronic Historical
Linguistics
4
5Decision Trees for Career GuidanceThis research
project will be an investigation into the design
and implementation of various decision trees for
career guidance. A decision tree takes into
account some sort of situation outlined by a
group of parameters and outputs a Boolean
decision to the situation. This project will take
into account many aspects associated with
decision trees including database building,
searching and sorting, and algorithms for
accessing data.My project utilizes numerous
decision trees in an effort to serve as a tool
for career guidance for young adults. A user will
fill out a form of specified fields that will
then be analyzed by the group of decision trees
until a field of study/occupation is given to the
user as the outcome. This group of decision trees
will be built through database building
techniques.
5
6The Design and Implementation of Decicion Trees
for Career GuidanceCasey Barrett
- Abstract
- This research pro ject will be an investigation
into the design and implementation of various
decision trees for career guidance. A decision
tree takes into account some sort of situation
outlined by a group of parameters and outputs a
Boolean decision to the situation. This pro ject
will take into account many aspects associated
with decision trees including database building,
searching and sorting, and algorithms for
accessing data. My project utilizes numerous
decision trees in an effort to serve as a tool
for career guidance for young adults. A user will
fill out a form of specified fields that will
then be analyzed by the group of decision trees
until a field of study/occupation is given to the
user as the outcome.
7The Design and Implementation of Decicion Trees
for Career GuidanceCasey Barrett
- This group of decision trees will be built
through database building techniques. I have
utilized extensive research from various websites
that offer expertise in a number of areas. I used
tutorial websites that had examples and
explanations of decision trees generated by the
C4.5 program. I have also tried to read various
research papers that deal with decision trees.
Although I have yet to find one that remotely
relates to career guidance, I feel that my
understanding of decision trees has increased as
a result of these research papers. - Introduction
- This pro ject will utilize numerous decision
trees to assist young people by helping them
focus on their interests and what career paths
may coincide with those interests.
8The Design and Implementation of Decicion Trees
for Career GuidanceCasey Barrett
- Background/Implementation
- A decision tree is a graphical representation of
the decision analysis process. This type of tool
consists of some sort of input, whether it is a
situation or an ob ject. This input is then sent
through a set of parameters, or rules, and
eventually the tree gives a Boolean output. There
are many different types of parameters that can
be used. Or in other words, many different types
of parameter cases can be used. These cases can
include numerical data, simple yes/no answers, or
word answers, such as hair color (black, brown,
or blonde). Each parameter will have a specified
set of cases that correspond to the parameter.
9The Design and Implementation of Decicion Trees
for Career GuidanceCasey Barrett
- To help me better understand decision trees and
how to build them, I have utilized Professor Ross
Quinlans revolutionary decision tree generator
programs, the C4.5. What these programs do is
take into account large sets of data (from
properly written database files) and looks for
correlations within the sets. It then uses these
correlations to build a decision tree that
follows the 'rules' outlined by the correlations.
In an auxiliary program, the C4.5rules program,
the 'rules' for the tree generated can be
displayed. This program gave me a better
understanding of how decision trees are built. I
wrote my own database files that could be read by
the C4.5 program. I learned the proper syntax for
these database files, which I would later utilize
for career guidance.
10The Design and Implementation of Decicion Trees
for Career GuidanceCasey Barrett
- For each database, two separate kinds of files
are needed, the .names file, which outlines each
parameter and the appropriate cases as well as
the end cases, and also the .data file, which
consists of singular entries. Each entry in the
database properly fills up each parameter
outlined in the .names file. I also had to
research techniques for career guidance. The most
rudimentary of these techniques was to have a
user fill out a list of field data and then
compare the user's answers to those of a highly
comprehensive database. Some of these
questionnaire-type devices included many
different occupational fields, such as art/music,
engineering, writing/journalism, and social
services. For my pro ject, I decided to start out
with two very distinct fields that would be a
good way to acclimate myself for making a career
guidance program.
11The Design and Implementation of Decicion Trees
for Career GuidanceCasey Barrett
- These two fields would be the liberal arts field
and the sciences field. For career guidance, I
separated the decision trees that I would need
into three different and distinct trees. The
first one is a tree designed to help a user
decide whether they should focus on either of the
broad intellectual categories of the sciences or
the liberal arts. This decision will be decided
based a series of fields the user fills out in a
separate C program. Some of these fields
include the user's grades in their current
English and Math class, if the user is in a
science club, the number of computers that the
user owns, and the number of plays the user has
participated in during the last year. These
starting questions are somewhat broad because
this is the first preset tree that the user will
be compared to.
12The Design and Implementation of Decicion Trees
for Career GuidanceCasey Barrett
- The next step was to develop a user input program
that prompts the user questions related to career
guidance. The program then takes the answers and
writes them to a .data file. I wrote this program
in C. Likewise, I needed to use the fstream.h
library in order to gain access to the classes
ifstream and ofstream. I then created the
questions test file that became the ifstream that
the program will read. This program contained
four functions, better outlined in the Iteration
Report Third Quarter. Currently, the only
acceptable inputs for this program are strings,
however, during the fourth quarter, I will expand
the inputs to include classes char, int, and
double. The user input is first compared to a
database of other people's answers and the
decision that each of the other people decided
upon.
13The Design and Implementation of Decicion Trees
for Career GuidanceCasey Barrett
- Since I have not had enough users, the databases
are fictitious data that I have engineered in
order to fit my ideal decision tree for this
progression. - The data from this database helps comprise a
decision tree that the user's answers will be run
through. Since there are three different decision
trees, three separate ideal databases will be
made, one for the broad first test, and then one
each for the science fields and the liberal arts
field. After a first decision is made, it will be
relayed back to the user. If the user wishes to
continue, he or she will be given another set of
parameters that will be more in depth in either
the liberal arts or science fields.
14The Design and Implementation of Decicion Trees
for Career GuidanceCasey Barrett
- These trees, which are still in progress, will
help the user compare their answers against
another database corresponding to their broad
interests (liberal arts or sciences). - When compared to these more specialized
databases, a more focused decision was sent back
to the user. This is because the user's responses
will be matched up with the decision tree that
the databases helped generate and the decisions
that the databases output. Right now, I am
working on the algorithm that compares the user
input answers to the decision tree. This
algorithm will produce some sort of numerical
correlation between the sets of answers. The
higher the correlation number is with respect to
that specific path of the decision tree, then the
more likely the program will output an answer
similar to that of the higher correlation.
15The Design and Implementation of Decicion Trees
for Career GuidanceCasey Barrett
- In the end, a type of occupation or a field of
study will be output to the user based on the
correlations. Also, I have trained extensively in
the ways of the Reverse Game. Without possessing
a shred of natural Reverse Game ability, I have
worked my way up from the ranks of novice to a
somewhat respectable player capable of defeating
each and every of the 20 progressively
challenging levels.
16The Design and Implementation of Decicion Trees
for Career GuidanceCasey Barrett
- Conclusions References
- Decision Trees A subtopic of machine learning.
http//www.aaai.org/AITopics/html/trees.html
Quinlan, Ross. (n.d.) Ross Quinlan Personal Page.
http//www.rulequest.com/Personal/ C4.5 Tutorial.
http//www2.cs.uregina.ca/hamilton/courses/831/no
tes/ml/dtrees/c4.5/tutorial.html Career Key Job
Interests. http//www.careerkey.org/cgi-bin/ck.pl?
actionchoices Hettich, Scott. (n.d.) UCI Machine
Learning Repository http//www.ics.uci.edu/mlearn
/MLRepository.html Nilsson, Nils. (May 10, 2004).
Introduction to Machine Learning
http//robotics.stanford.edu/people/nilsson/mlbook
.html
17Modeling of Evacuation Centers Using
NetLogoModeling is a powerful tool that allows
a programmer or social engineer to observe
cause-and-effect relationships in occurences that
a) happen too slowly or quickly to see, b)
involve danger or safety concerns, c) occur on a
scale too large or too small for study, d) is not
a common occurrence. Using NetLogo, a
multi-agent programmable modeling environment,
the socio- and psychological factorsaffecting
decision-making in these situations can be
effectively simulated.
17
18Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- Abstract
- The actions of citizens during terror and
evacuation events are oftentimes hard to predict.
Using NetLogo, a 'crossplatform multi-agent
programmable modeling environment' from The
Center for Connected Learning and Computer-Based
Modeling (CCL), the socio- and psychological
factors affecting decisionmaking in these
situations can be effectively simulated. Through
appropriate research in categories of modeling
and sociology, human behavior can be studied to
help urban developers and social engineers
protect the nation's interest its citizens.
Citizens that follow certain algorithms, or
behave in certain ways, have a much greater
chance of survival.
19Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- I . Introduction to NetLogo
- NetLogo is a cross platform multi-agent
programmable modeling environment created by
Northwestern University's Center for Connected
Learning and Computer-Based Modeling (hereafter
CCL). It was designed specifically for simulation
of social and natural phenomenon. Originally
StarLogoT, this language and graphical user
interface hybrid offers a multitude of
possibilities for researchers and students,
allowing users to examine interactions and
behaviors on both micro and macro scales.
20Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- NetLogo is designed with accessibility in mind
the program allows for quick Java applet
exportation and interactivity with CCL's HubNet
interface, which lets the user run participatory
simulations in which a class or group of testers
takes part in enacting the behavior of a system
as each user controls a part of the system by
using an individual device (such as a TI-83
calculator or a networked computer). NetLogo
comes packaged with an expansive models library
and an assortment of code samples for easy
access. A. NetLogo Graphic User Interface
NetLogo's main advantage is that it allows a
quick and relatively simple way for the
programmer to implement a convenient graphical
user interface (hereafter GUI).
21Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- A NetLogo GUI can contain the following
components buttons, sliders, switches, choices,
monitors, plots, texts, and outputs. 1) Buttons
Buttons activate on the user's command. There are
two types of buttons, standard buttons and
forever buttons. Standard buttons activate the
contained code on click, but forever buttons
execute the contained commands repeatedly until
the button is clicked a second time, mimicking a
whileloop.
22Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- 2) Sliders Sliders allow the user to manually
select the value of a certain variable. Sliders
control the minimum and maximum values, as well
as the increment of increase/decrease, while the
user chooses the value. 3) Switches Switches
allow for a user to directly affect a boolean
value. 4) Choices Through the use of choices,
the user can select certain values, Strings, and
more that the programmer allows. 5) Monitors
Monitors allow the user to examine the value of a
variable as the simulation runs. 6) Texts and
Outputs Texts and Outputs display certain
messages the programmer encodes. These can be
displayed at any time during the simulation.
23Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- B. HubNet and Other Extensions NetLogo's
versatility allows programs to be accessed and
used in environments outside the computer
laboratory setting. HubNet, one instance, allows
a multitude of users to interact with a single
model through the use of Texas Instruments TI-83
calculators or networked computers. This is ideal
for classroom settings because it allows each
tester involved to affect the model in some way.
Also, NetLogo offers easy exportation to Java
Applet format, and with several keystrokes, an
applet embedded in an HTML page can be created.
24Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- I I . Introduction to Modeling
- Modeling is a powerful tool that allows a
programmer or social engineer to observe
cause-and-effect relationships in occurences that
a) happen too slowly or quickly to see, b)
involve danger or safety concerns, c) occur on a
scale too large or too small for study or d) is
not a common occurrence. Armed with this
knowledge, a scientist can use the material
learned to help a community, understand a cause,
or solve a problem. A perfect use for the
modeling technology of today is a subject that
meets all of these above criteria.
25Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- The modeling of population centers during
evacuation situations is perfect for such a
study, because evacuation frequently occurs too
quickly, is quite dangerous, happens rarely, and
happens on such a wide scale that observing
patterns is nearly impossible. In order to
accurately code such an event, certain features
must be researched. - A. The Environment In general, areas to be
evacuated generally contain a large number of
citizens in a small area the population density
in such regions tends to be quite high. In the
metropolises and cities of today, high-rise
apartments, parking garages, subway stations all
provide unique, but crowded, environments.
26Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- These situations provide the greatest trouble to
researchers and social engineers. B. The Citizens
In times of terror or enormous stress, citizens
often behave irrationally different than they
would normally. Thus, citizens' behavior in the
simulation must reflect this behavior. The
intelligences programmed into version 1.2 follow.
) Speedy, Normal, Slow The Speedy, Normal, and
Slow citizens differ in the number of times they
move per timestep. Speedy, Normal, and Slow
citizens more 3, 2, and 1 squares, respectively.
27Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- When they collide with a wall (or another
citizen, if Collision? is turned on), they turn
in a random direction and continue their
movement. 2) Righty Righty citizens react to
collisions by turning ninety degrees. They move
two squares per timestep. 3) Retreater
Retreaters react to collisions by turning 180
degrees, taking a step forward, and choosing a
direction in their 90 degree front arc.
28Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- I I I . Running the Simulation
- Utilizing the Simulation consists of three steps
initializing the Basic Environment Setup, or BES
running the model analyzing the model with the
Graphical (Statistical) Interface, or GSI. A.
Basic Environment Setup (BES) The user controls
the following sliders, choices, and etc. to set
the parameters for the environment. 1)
'walldistancey' Slider sets the distance between
the horizontal walls. When a citizen's movement
would take it into a wall, it runs its collision
program detailed above. The two horizontal walls
each contain a passable gap separating the danger
from the safety area.
29Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- 2) 'walldistancex' Slider sets the distance
between the vertical walls. When a citizen's
movement would take it into a wall, it runs its
collision program detailed above. 3)
'evacuationtime' Slider sets how many timesteps
the model runs for. 4) 'collide?' Switch selects
whether or not citizens collide with one another,
activating collision code upon impact. 5)
'areasize' Selector selects how many citizens
begin in your model.
30Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- The selector has five options a) Metropolis (225
citizens) b) City (150 citizens) c) Village d)
Town (90 citizens) e) Thorpe (15 citizens) f)
Abode (3 citizens). There are (citizens / 3)
citizens of each color (red, white, blue) in the
model. 6) 'explosiontime' Slider selects at what
time the explosion occurs. The explosion is the
radius selected below.
31Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- 7) 'explosionrad' Slider chooses the radius of
the explosion. Explosions kill citizens contained
within them and creates an impenetrable wall. 8)
'Draw Walls' Button while depressed, lets the
user draw black walls 1 pixel in diameter. I V. T
H E P RO J E C T This project was set up to
determine the most effective ways to get large
numbers of citizens to safety in times of danger.
In order to determine how to do this, certain
things must be determined. First, the parameters
that add to the dangerousness of the environment
should be measured. Secondly, once the situations
of greatest danger are found, the most effective
intelligences to escape this danger must be
poinpointed as well.
32Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- Using the environment instantiated in the setup
(see subsection "The Environment"), different
situations are tested. The tests were run in
environments of four different dimensions large
x large, short x large, large x short, and short
x short. V. T H E T E S T As described above (see
"Project" section), the first part of the test is
to determine the dangerous situation. The results
of this test follow.
33Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- These tests were ran with build version 1.2,
located on the web www.tjhsst.edu/
kdesoto/techlab. Large x large 15m x 5m Short x
large 5m x 15m Large x short 15m x 5m Short x
short 5m x 5m A set of 225 "control" citizens
was given a period of 120 minutes to escape each
danger situation. This was performed ten times,
and escaped citizens were graphed. This can be
found in the appendix. The l x l area, on
average, trapped almost 111 citizens per 120
minutes. This is almost 50 percent. The s x l
area, on average, trapped almost 22 citizens per
120 minutes. This is almost 10 percent.
34Modeling Evacuation of Population Centers Using
NetLogoKurt Andrew DeSoto
- The l x s area, on average, trapped almost 27
citizens per 120 minutes. This is almost 12
percent. The s x s area, on average, trapped 0
citizens per 120 minutes, 0 percent. VI. - Conclusion The conclusion goes here.
- V I I . Acknowledgement
- The authors would like to thank... Mr. Randy
Latimer, Computer Systems Laboratory Mr. Uri
Wilenski, CCL REFERENCES - A 1 H. Kopka and P. W. Daly, A Guide to LTEX,
3rd ed. Addison-Wesley, 1999.
35Optimizing Genetic Algorithms for Cypher
DecodingOver the past several years, genetic
algorithms have come into wide use because of
their ability to find good solutions to computing
problems very quickly. They imitate nature by
crossing over strings of information represented
as chromosomes, with preference given to the more
fit solutions produced. They hold great promise
in the field of cryptology, where they may be
used to quickly find good partial solutions, thus
eliminating much of the intense manual labor that
goes into identifying initial coding schemes.
35
36Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- Abstract
- Over the past several years, genetic algorithms
have come into wide use because of their ability
to find good solutions to computing problems very
quickly. They imitate nature by crossing over
strings of information represented as
chromosomes, with preference given to the more
fit solutions produced. They hold great promise
in the field of cryptology, where they may be
used to quickly find good partial solutions, thus
eliminating much of the intense manual labor that
goes into identifying initial coding schemes.
37Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- Introduction
- This document is the written history of the
author's work on genetic algorithms over the
course of the past year. The hope is to reach a
better understanding of genetic algorithms
through the results of intensive work on the sub
ject in several different applications. - The Problem
- Genetic algorithms have become very useful tools
in the field of computer science, however, they
are rather open-ended and can be applied in
wildly different ways.1 The problem here is to
optimize a genetic algorithm for a cryptological
problem.
38Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- Statement of Objective
- The ultimate objective is to use a genetic
algorithm to efficiently solve different problems
such as the Beale cypher and the evolution of pi.
Regardless of whether that objective is reached
or not, the pro ject should foster a better
understanding of how to apply genetic algorithms
to cryptology problems. The purpose of this
report is to document the development and
effectiveness of the project.
39Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- Scope
- The pro ject deals mainly with the Beale Cyphers
as a tool with which to determine which
properties of a genetic algorithm may be modified
so that the algorithm may operate more smoothly.
The pro ject also includes an initial foray into
evolving the value of pi. - Background
- Historical Summary
- The Beale Cypher is one of the most famous
unsolved puzzles in cryptography. Basically, 100
years ago, Beale buried treasure in a lake in
Bedford County, near Roanoke.
40Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- Three letters were written, encoded and given to
a friend. Beale subsequently travelled west and
never returned. Later, one of the 3 letters was
deciphered. Beale had used a simple encoding
algorithm. His letters consisted of a large list
of numbers. These numbers corresponded to the
first 480 words in the American Declaration of
Independence. For example, if the document starts
"The quick brown fox..." then 3 would represent
the letter 'b' and so forth. - (1 Duray)
41Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- So, one of the letters was succesfully
deciphered, but to this day the other two remain
unbreakable. While there is a fair amount of
evidence that the Beale treasure is a hoax, there
is no reason to believe that the cyphers
themselves are. It is also probable that the
other cyphers either use the same document, just
different encoding methods, or use similar
documents and the same encoding.2 - Preceding Work
- I am not sure how much work has been done trying
to decode the two as-yet undeciphered letters.
42Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- Throughout the 1970s, one Dr. Carl Hammer used
computers to analyze those two letters and found
cyclic patterns in the numbers that suggested an
actual coding mechanism as opposed to randomly
chosen numbers.3 There is some evidence that the
cypher is nothing more than a hoax. Kenneth
Dobyns concludes after a lengthy statistical
analysis that "there is no content to the
cyphers" and that the numbers in the two
undeciphered texts were chosen "substantially at
random, limited only by the restriction that no
numerical value would be repeated immediately
adjacent or semi-adjacent to a similar value."
43Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- Theory
- It is one of the great ironies of computer
science that a machine built to outperform a
living organism works best at times when it
imitates the living organism itself. Charles
Darwin's 1859 book On the Origin of Species laid
the foundation not only for anthropology but for
a great number of largely economic theories such
as "Social Darwinism." The idea that the members
most fit to survive would be the most likely to
reproduce resounded in the scientific community.
It should come as no surprise, then, that
computers might be able to produce end results as
well as nature itself if they would follow this
model.
44Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- A genetic algorithm is a method of computing that
attempts to replicate nature's mechanism for
evolution by organizing computer data into
formats that are akin to DNA chromosomes. The
idea is to have multiple manifestations of these
computer data so that they might "cross over" the
way that real-life chromosomes do. The "crossing
over" does not happen randomly the programmer
has to code the program to do this, but he can
choose to do it in a manner that takes two
promising sets of data and combines them into
what would hopefully be an even better set of
data. We need these "promising sets of data"
because the data are supposed to be the solution
to some sort of problem.
45Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- Genetic algorithms are most effective in quickly
finding good solutions to problems in which there
may be several acceptable solutions. - The problem of decoding the Beale Cypher, then,
would seem to be an excellent candidate for a
genetic algorithm as described above. The search
space is essentially infinite, yet it would be
possible to program the computer to recognize
good solutions as those with a high incidence of
actual English words coming out of the
translation. While there is one "correct"
solution, but if I can get my program to come up
with a solution that a human viewer could
identify as reasonably close to this correct
solution, then it will have been a success. - 2 Matthews 3 Krystek
46Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- Design Criteria
- Primary Criteria
- The pro ject will be able to take the code of
the second letter in the Beale Cypher and
independently come up with a string in which an
observing human can recognize the English message
of the cypher. The pro ject will use a genetic
algorithm to do so, crossing over possible
solutions to produce hopefully better ones. - Secondary Criteria
- The pro ject may independently produce the
exact answer to the second letter in the Beale
Cypher, character for character. The genetic
algorithm may be both time-efficient and
space-efficient, allowing for easy application to
other similar cyphers (even other letters)
47Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- The pro ject may produce a viable solution to the
first and third letters of the Beale Cypher from
which a human would be able to do meaningful and
independent work. - A genetic algorithm similar to the one used to
satisfy the Primary Criteria may be adapted to
other areas in cryptology and (this is a long
shot) into other research areas such as
artificial life. - Procedure
- The project largely dictated its own future
since there was no initial goal at the outset of
the year, the pro ject was largely defined as
whatever might be successful.
48Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- At the time the author applied for the Computer
Systems Research Lab, his idea was to create an
intelligent computer agent to play the Japanese
game Go. By September, the idea of exploring
genetic algorithms had become fairly entrenched
in the author's mind, but a search for
applications was still necessary. After spending
two months tinkering with a program that evolved
the value of , it was decided to pursue the
Beale Cypher in depth. The program decode01.c was
written to the point where it would begin
crossing multiple chromosomes over each other and
producing results that clearly followed
progressive patterns (thanks to substantive
debugging). Once the functionality for crossing
over was written into the program, work on the
heuristic could begin.
49Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- It is based on the relative frequencies of each
alphabetical character in the English language4
and the most commonly occurring words in the
language.5 The heuristic analyzes the
translations produced by a chromosome and
calculates how far the relative character
frequencies of the translations deviate from that
of general English, with priority values being
assigned to the translations that deviate the
least in terms of character frequency and also
have the most identifiable English words.
50Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- The word-search function was the most difficult
part of the program to write, not because the
goal was uncertain, but because it introduced an
entirely new problem to the pro ject that of
organizing an extensive list of data into the
program's infrastructure in such a manner that it
could then be successfully used to analyze
translations of the program. I finally settled on
a linked-list structure after a long period of
flailing with a very error-prone
multi-dimensional array.
51Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- Results
- Results at this point are very basic I have just
recently completed the word-search function and
have yet to use it heavily in tandem with the
genetic algorithm. Appendix 2 shows some sample
results. The first part demonstrates the
character-frequency analysis function it shows
five false translations of the Beale cypher and
gives their variances. (Defined in the program as
the sum of the percentage points by which the
frequency of each letter relative to the complete
translation varied from the ideal percentage
defined in Singh. A lower number is better.) The
second part shows the word-search function, only
recently completed.
52Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- The results shown include the debugging code I
planted in the program. It shows the program
going through the sample translation two
characters at a time. Every exclamation point
means that the program has identified the most
recently displayed two-character combination as
possibly beginning a word. Actual words showing
up after exclamation points indicate that that
word has been identified in the text and that the
program has added a point to the translation's
heuristic score. - References
- Dobyns, Kenneth. "Beale Codes Were they a
Hoax?" Genealogy, History, and Miscel laneous
Material. 1984. 25 Jan. 2005 www.myoutbox.net/bea
lhome.htm - 4 Singh, accessed at Southampton
53Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- Duray, Naranker. "Genetic Algorithms." Imperial
Col lege of London Department of Computing.
1996. 25 Jan. 2005 www.doc.ic.ac.uk/nd/surprise
96/journal/vol4/tcw2/report.html Gantovnik,
V.B., Z. Gurdal, and L.T. Watson. "Genetic
Algorithm with Memory for Optimal Design of
Laminated Sandwich Composite Site Panels."
Technical Report, 2002. Computer Science _at_
Virginia Tech. 21 May 2002. Virginia Polytechnic
Institute and State University. 8 Feb. 2005
54Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- eprints.cs.vt.edu8000/archive/00000555/01/gaCS02
a.ps Huss, Eric. "The C Library Reference
Guide." Webmonkeys A Special Interest Group at
the University of Il linois. 1997. 14 Apr. 2005
www.acm.uiuc.edu/webmonkeys/book/c guide/
Krystek, Lee. "The Beale Cryptograms." The Museum
of Unnatural History. 2000. 13 Jan. 2005
www.unmuseum.org/beal.htm Matthews, James. "The
Beale Cypher." Generation5. 2003. 13 Jan. 2005
55Optimizing Genetic Algorithms for Use in
CyphersKeith Diggs
- www.generation5.org/content/2003/beale.asp
Singh, Simon. The Code Book The Secret History
of Codes and Code-breaking. Unknown Fourth
Estate, 1999. University of Southampton, ed.
Teachers' Notes to Accompany the Lesson Packs.
National Cipher Challenge. Southampton, UK
University of Southampton, 2003. National Cipher
Chal lenge. 1 Oct. 2003. University of
Southampton. 25 Jan. 2005 www.cipher.maths.soton.
ac.uk "The 500 Most Commonly Used Words in
English." World English Test, Learn, and Study
the English Language Online. 22 Aug. 2001. 25
Jan. 2005. www.world-english.org/english500.htm
56Creating a 3D Game With a Study of OpenGL
Textures and Lighting TechniquesTo create a
first person 3D game using OpenGL. The program
consists of using models, textures, lighting, and
polygons to create a 3D world in OpenGL. Various
equations are used to calculate camera angles,
movement, and physics. For example, to move the
camera, eye movements are controlled by
glLookAt, which takes an eye position with 3
points (x,y,z) and 2 vectors. One vectors is the
up direction and the other is the forward
direction.
56
57Creating a 3D Game With Textures and Lighting
John Fitzsimmons
- Abstract
- The objective is to create a simple, 3D first
person shooter using OpenGL and C. To acheive
this goal, I will need to implement textures,
lighting, 3Dshapes, polygons, and basic C
structures. II. Introduction The problem of
creating a 3D first person shooter from scratch
is a large task. To accomplish this task, I am
breaking down the problem into simple blocks,
such as getting a camera to work so that I can
view the world from a person's perspective and
move around.
58Creating a 3D Game With Textures and Lighting
John Fitzsimmons
- The reason I chose this pro ject is because
computer games interest me immensly and creating
one of my own would give me some experience and
pleasure, even if it is very primitive. My pro
ject will probably be finished very near the end
of the year as there will always be another
upgrade to add. The maximum scope of this program
would be to have multiple users playing on the
same computer or over a network and models of the
users and different ob jects. Multiple weapons
would be available to pick up and different
levels to play. However, the multiple user aspect
nor the models will be accomplishable by the end
of the year.
59Creating a 3D Game With Textures and Lighting
John Fitzsimmons
- III. Theory and Discusion and Workplan
- I will go over the two main features that I have
completed so far the camera and collisions. The
camera is the user's point of view. Using
keyboard input to change velocity, the user moves
around. The largest task was create a realistic
system to use mouse input to rotate the camera
up, down, and side to side. To do this,
horizontal and vertical movement is calculated in
pixels for each iteration and used to modify two
angles. One for up and down and the other for
side to side.
60Creating a 3D Game With Textures and Lighting
John Fitzsimmons
- Using both of these angles, I calculate a unit
vector in the opposite direction the user is
looking to input into an openGL function. The
distance the user looks up is the sine of the
angle up. The maximum distance forward is the
cosine of this angle. The forward distance is
further broken up into x and z components. The x
component is the max distance multiplied by the
sine of the angle to the side and the y component
is the max distance multiplied by the cosine of
that angle.
61Creating a 3D Game With Textures and Lighting
John Fitzsimmons
- As a result, my code looks like such with a unit
vector of length 2 temp2cos(angleDown)
centerXeyeX-tempsin(angleLeft)//puts center
point 2 units centerZeyeZ-tempcos(angleLeft)//i
n front of the eye centerYeyeY-2sin(angleDown)
An up vector is also generated very similar to
this to make the camera right side up. The other
large chunk of code is collisions. My collisions
are very simple. When a pro jectile hits an ob
ject, it stops and moves back a little (so it
doesn't get stuck in the ob ject). The
acceleration due to gravity then pulls the ob
ject down. If it hits the ground or the top of an
ob ject it just stops and stays.
62Creating a 3D Game With Textures and Lighting
John Fitzsimmons
- After a certain amount of time, the pro jectile
will be deleted. That way, there won't be
hundreds of pro jectiles bogging down on
processing power. To detect collisions, I check
to see if the pro jectiles is inside the bounds
of the ob ject plus the radius of the pro
jectile. This currently only works for
rectangular prisms or flat rectangles. Circles
and spheres are also workable with this
algorithm. To do more complicated ob jects,
multiple smaller, undrawn ob jects will have to
be used to approximate the larger shape and
acheive accurate collisions.
63Creating a 3D Game With Textures and Lighting
John Fitzsimmons
- Another large piece of the program will be
textures. I will have to load in a texture for
each different type of surface I am going to use.
To do this I must read a bitmap image into
memory. I do this by first reading in the bitmap
header which contains information about the file,
and then I read in 4 values for every pixel. Each
value is the size of a byte, so I read these
values into an array of unsigned chars. This
array is then plugged into a texture function
(glTexImage2D) which stores the image in video
memory. I then delete the array from memory.
64Creating a 3D Game With Textures and Lighting
John Fitzsimmons
- For some reason, the read in textures are not
staying in video memory, even though I have
debuged and found I interpreted the bitmap
correctly. Textures will only be accomplished if
time permits because I have decided to push back
fixing the problem until later. The other main
aspect of collisions are the actual ob jects. I
have created a "class" ob ject and I have a
pointer list of these ob jects. When a
destroyable ob ject gets hit enough, it will be
destroyed and I will take it out of the list so
it isn't drawn and doesn't use processing power.
Currently, I am working on a system to read in ob
jects and put them in the list.
65Creating a 3D Game With Textures and Lighting
John Fitzsimmons
- When I finish, I will be able to load in an
environment from a text file, allowing for
multiple levels. After accomplishing muliple text
input levels, I will work on a HUD (heads up
display) which will show life, time, and score. I
will also add different weapons that cause
different damages that the player can pick up in
the level. Lighting will be added last, such as a
muzzle flash effect and lighting throughout the
level. My basic system of operations is to code,
test, and debug. I do this for every single
aspect of the pro ject. When I added the camera
code, I had to fix alot of errors.
66Creating a 3D Game With Textures and Lighting
John Fitzsimmons
- For example, I found out on the opengl.org site
that the "center" values determine a point a unit
away from the camera in the direction it is
looking rather than a unit vector. The "up"
values actually do determine a unit vector in the
"up" direction. Only I am working on this pro
ject. I need no money and therefore have no
budget. The only equipment I am using is a
computer, implementing OpenGl and C. I may also
use a graphical modeler later on. I have mainly
used the OpenGL website to get all of my
information for my pro ject.
67Creating a 3D Game With Textures and Lighting
John Fitzsimmons
- However, as I am now getting into some more
complicated aspects (not just camera and drawing
basic ob jects), I will need more and more
sources. I have begun to research texturing,
which I have researched outside the opengl.org
site. I will have to research elsewhere for most
of the remaining tasks as well. Tasks to be
completed include adding textures, lighting,
additional ob jects, and a more complicated
environment.
68Creating a 3D Game With Textures and Lighting
John Fitzsimmons
- Sources OpenGL - The Industry Standard for High
Performance Graphics. http//www.opengl.org/.
January 27, 2005. Spacesimulator.net - OpenGL
Texture mapping. http//www.spacesimulator.net/tut
3 texturemapping.htm January 26, 2005. OpenGL
Texture Mapping An Introduction.
http//www.gmonline.demon.co.uk/cscene/CS8/CS802.h
tml. January 23, 2005.
69Paintball Frenzy!Minimax Agent AIThe purpose
of this project is to create an innovative and
enjoyable graphical game and program a minimax AI
agent that performs optimally.
69
70Paintball Frenzy Graphical Turn-Based Game With
a Minimax AI AgentChristopher Goss
- 0.1 Abstract
- Paintball Frenzy is a unique turn-based game of
my creation. The game is played on a four by four
grid layout that is initially a neutral grey
color. Two to four players that are either human
or computer controlled posess one colored
paintball that originates at one of the board's
four corners. The players take turns moving about
the grid one horizontal or vertical space at a
time.
71Paintball Frenzy Graphical Turn-Based Game With
a Minimax AI AgentChristopher Goss
- Players also have the option to jump over one
player's paintball in an adjacent space. There is
a time limit that each player must choose their
move before. Whenever a paintball moves into a
space on the grid, that space becomes the color
of that paintball. Whichever player has the most
colored spaces at the end of the turn limit wins
the game. My final pro ject was the creation of
this game Paintball Frenzy. First, I had to
invent the game and all of it's particularities
and balance issues.
72Paintball Frenzy Graphical Turn-Based Game With
a Minimax AI AgentChristopher Goss
- Of course, I had to program this game's
framework, first with a standard terminal display
and keyboard input, and later with graphical
gameboard display and mouse controls.
Additionally, I had to program several artificial
intelligence agents for my game including an
agent that moves randomly and an agent that
performs optimally. To design the agent that
moves optimally, I researched the minimax
algorithm and used it to search through all the
possible game-choice options and choose the best
one. Combining all of these aspects together
yielded a fully enjoyable and informative senior
research project.
73Paintball Frenzy Graphical Turn-Based Game With
a Minimax AI AgentChristopher Goss
- 0.2 Introduction and Background
- I am pleased to introduce Paintball Frenzy in all
its glory. Originally, I had a massively
ambitious pro ject proposal to design a computer
programming language designed specifically for
the creating of video games. I was quick to
dispatch this proposal towards the end of my
junior year. Also in my junior year I took the
Artificial Intelligence class and I learned of my
deep interest in the Artificial Intelligence
field and the difficult minimax algorithm in
particular (I was never able to master it in the
class).
74Paintball Frenzy Graphical Turn-Based Game With
a Minimax AI AgentChristopher Goss
- Therefore, I was quick to consider the minimax
algorithm for my final pro ject. But I wanted to
do more than just Artificial Intelligence, I also
wanted to design my own game. So I did, and
Paintball Frenzy was born. Background on game
design. - Background on graphics.
- Background on game AI.
- 0.3Theory
- My research was a three-pronged proccess. First,
I chose to formulate an innovative turn-based
game.
75Paintball Frenzy Graphical Turn-Based Game With
a Minimax AI AgentChristopher Goss
- Game Design Theory. 1 Graphics Theory
- Intitially, I delved into my artificial research
with impressive haste. I acquired a green
artificial intelligence book from Mr. Torbert and
I've been researching the minimax algorithm ever
since. The turn-based, deterministic style of my
program makes the minimax algorithm ideal.
However, the multiplayer asect of the game will
greatly slow down the algorithm and it'll most
likely force it to use a cut-off test before the
entire tree has been searched. This means,
unfortunately, that at the faster time limits, my
AI agent won't operate optimally.
76Paintball Frenzy Graphical Turn-Based Game With
a Minimax AI AgentChristopher Goss
- More AI Theory. 0.4
- Design Criteria
- The progress of my pro ject is three-pronged. In
the first quarter, I researched game design and
programmed a working version of Paintball Frenzy
withoutgraphics or an AI Agent. I used C to
program. My Main function first initializes
global variables like the board matrix. It then
calls functions to display the title and generate
the menus. After that, Main runs a do-while loop
until the number of turns has expired. In this
loop, Main calls functions to display the board
and prompt the current player's move. Then Main
repeats the loop with the next player,
incrementing the turn counter as required.
77Paintball Frenzy Graphical Turn-Based Game With
a Minimax AI AgentChristopher Goss
- After the loop, Main calls a function to evaluate
and display the results of the game. In the
second quarter, I used OpenGL graphics to make my
program more aesthetically pleasing. I needed to
make several design modifications to allow for a
graphical interface. My main function is only
responsible for initilizing variables and
initiating the OpenGL display cycle. My display
function (RunGame) regulates the game loop with a
series of if else statements that assess the
current game progress via mouse clicking history.
78Paintball Frenzy Graphical Turn-Based Game With
a Minimax AI AgentChristopher Goss
- In my main game loop, I designed to have a second
set of if statements to track the state of each
particular turn. First, I start a timer, then I
get mouse input until the timer has expired. At
the end of the time, I excecute the players' move
and signal the change in player or turn. I store
the mouse clicking history by saving phases of
the game as integers in a global variable. I also
designed DispBoard to display the gameboard in
the left part of window. The upper right side
displays the current turn and player.
79Paintball Frenzy Graphical Turn-Based Game With
a Minimax AI AgentChristopher Goss
- Below that is directional pad that records mouse
input. I created three auxilary functions to
handle mouse clicking, the mouse menu, and text
output. I also designed the menu screen layout
that would allow for alterable data and buttons.
The second semester is consumed with my attempts
to add an AI agent to my program. This includes
the research of Game AI and more specifically the
minimax algorithm. Techniques such as alpha-beta
pruning where also researched. In the end, an
optimized AI Agent was produced. I've redesigned
my RunGame function to call the AgentMove
function at the start of its time limit to allow
for the most time.
80Paintball Frenzy Graphical Turn-Based Game With
a Minimax AI AgentChristopher Goss
- I designed the first version of a recursive
minimax function that I call maximax. My
AgentMove function now simply sets some variables
and calls maximax to get the new board position.
First, maximax tests the turn limit and time
limit constraits. If the time is up or the
simulated game is over, the program calls the
terminal function entitled EvalFunc. Next, I
increment the simulated player or turn to delve
further into the maximax tree. Then, I determine
if the four directional moves are possible, and
recurse in each of the legal directions. Then, I
decide which one is the best move, and return the
changed board. I also programmed the EvalFunc.
81Paintball Frenzy Graphical Turn-Based Game With
a Minimax AI AgentChristopher Goss
- 0.5 References
- (this is merely a reference list right now, not a
bibliography) http//www.latex-pro ject.org/
http//www.vancouver.wsu.edu/fac/peabody/game-book
/Coverpage.html http//www.msoe.edu/eecs/cese/reso
urces/stl/string.htm http//www.tjhsst.edu/
rlatimer/ http//www.opengl.org
http//www.tjhsst.edu/ rlatimer/assignments2004/in
dependenceday.txt The AI book http//ai-depot.com/
LogicGames/MiniMax.html
82Modeling Evolutionary BehaviorThe purpose of
this project is to attempt to model evolutionary
behavior in agents in an environment by
introducing traits and characteristics that
change with the different generations of
agents.I hope to create an environment where
certain agents will prosper and reproduce while
others will have traits that negatively affect
their performance. In the end, a single basic
agent will evolve into numerous subspecies of the
original agent and demonstrate evolutionary
behavior.
82
83Modeling Evolving Social BehaviorStephen J.
Hilber
- 1 Abstract
- With the creation of Epstein and Axtell's
Sugarscape environment, increasing emphasis has
been placed on the creation of "root" agents -
agents that can each independently act and
interact to establish patterns identifiable in
our everyday world. Models created for traffic
patterns and flocking patterns confirm that these
conditions are caused by each participating agent
trying to achieve the best possible outcome for
itself.
84Modeling Evolving Social BehaviorStephen J.
Hilber
- The purpose of this project is to attempt to
model evolutionary behavior in agents in an
envionment by introducing traits and
characteristics that change with the different
generations of agents. Using the modeling package
MASON programmed in Java, I will be able to
create an environment where agents will pass down
their genetic traits through different
generations. By adding certain behavioral traits
and a common resource to the agents, I hope to
create an environment where certain agents will
prosper and reproduce while others will have
traits that negatively affect their performance.
85Modeling Evolving Social BehaviorStephen J.
Hilber
- In the end, a single basic agent will evolve into
numerous subspecies of the original agent and
demonstrate evolutionary behavior. This pro ject
will show that agents which possess the
capability to change will change to better fit
their environment. - 2.1 Body Matter Introduction
- Computer modeling, simply defined, is the process
of programming the conditions of an environment
into a computer and adjusting parameters of the
model to see how they affect the results of the
model. Today, though, many computer models are
merely used to verify behavior that we already
suspect is accurate. Many models created today
focus on topics such as disease, population
growth, and traffic, where the results of the
models were already well known.
86Modeling Evolving Social BehaviorStephen J.
Hilber
- The models are used primarily to see how adding,
subtracting, or otherwise changing any parameters
in the environment affect the outcome of the
groups in the environment or the environment as a
whole. This opens the doors for many scientists
and researchers to simple, cost-efficient
experimentation. For example, analyzing traffic
patterns requires a large committment to
observation and analysis over months and even
years. Such research is not undertaken lightly.
With computer modeling, this information can be
programmed into a model and used to estimate how
the real-world system will react to changes in
its stimuli.
87Modeling Evolving Social BehaviorStephen J.
Hilber
- Also, computer modeling allows us to perform
"experiments" in areas of science where
experimentation is not normally possible. This is
especially true in astronomy, where the sheer
vastness of space and our relative insignificance
to the universe means that experimentation is
simply not possible. You can't reset the universe
and watch over five billion years of history.
However, computer models of planetary orbits and
systems allows us to try and find explanations
for phenonoma we have observed.
88Modeling Evolving Social BehaviorStephen J.
Hilber
- In short, the majority of computer modeling is
used to verify existing theories. Social
behavioral patterns, although well-researched in
general, have thus far been used to demonstrate
how one individual interacts with his social
environment as a whole. This pro ject, based off
of such personality research pro jects as the Dr.
John A. Johnson's IPIP-NEO and using evolutionary
behaviors first established in Epstein and
Axtell's famous Sugarscape models, attempts to
use computer modeling as a form of research in
and of itself into the evolutionary aspects of
social behavior.
89Modeling Evolving Social BehaviorStephen J.
Hilber
- In particular, my pro ject attempts to analyze
the behavioral patterns of introverted agents and
extroverted agents over a long period of time.
With any luck, insights will be made into this
exciting, riveting, and brilliant field of the
human psyche. - 2.2 Background
- Conway's Game of Life was the first prominent
agent-based model. Each cell was an "agent" that
contained either a 0 or a 1 (alive or dead)
depending on how many neighbors it had, and acted
independently of the environment. Conway's Game
of Life didn't lead to any profound insights, but
it did pave the way for future agent-based
modeling.
90Modeling Evolving Social BehaviorStephen J.
Hilber
- The advantage of agent-based modeling, as many
found out, is that it did not assume prior
conditions. It was a method of building worlds
"form the bottom up", where independent agents
were able to create complex worlds without any
overseers. One popular psychological game,
Prisoner's Dilemma, spawned a series of games
where agents tried to maximize their outcome,
often at the expense of other agents. Eventually,
these agent-based models were incorporated in
studies of flocking. The models created to show
flocking behavior in birds did not incorporate
flock leaders, as many presumed. Instead, the
birds all acted for their own best interests, and
directions and resting points were chosen as
compromises of sorts.
91Modeling Evolving Social BehaviorStephen J.
Hilber
- Using the theory that independent agents can
create organized structures such as flocks,
Epstein and Axtell created the Sugarscape world
in an effort to discover if social behaviors and
human characteristics could emerge through
independent actions. The Sugarscape model had
agents able to breed, fight, trade, and die, and
the core of the model was the resource sugar.
Each agent had a metabolism rate which burned off
its sugar if it ran out of sugar, the agent
died. Instead of isolated behavior, however, the
agents soon used their resources to work
together.