Download EXGOL: EXtended Game of Life

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
EXGOL
(EXtended Game Of Life)
LANGUAGE AND TOOLS GURU
PROJECT MANAGER
SYSTEM ARCHITECT
S Y S T E M I N T E G R AT O R
T E S T E R A N D VA L I D AT O R
S
A
A
E
A
UHAN CANARAN
NDREAS NILSSON
KSHAT SIKARWAR
RIC SCHMIDT
ARADHI TILVA
What is Game of Life
 John Conway’s Game of Life:



Cellular Automaton on a 2D grid
The state transitions of each cell on the grid is computed using
four transition rules.
It is possible to construct logic gates such as AND, OR and
NOT using Game of Life constructions  Turing machine can
be implemented using Game of Life
What is EXGOL
 Extended Game of Life:





is a scripting language to simulate cellular automatons
gives the user option to have their own transition rule set
Game of Life can easily be implemented using EXGOL
supports several different cell classes and states concurrently
is designed to support n-dimensional grids
Program Structure
 Three code sections:

INIT SECTION

TRANS SECTION

SIMULATION SECTION
Game of Life in EXGOL
class := {cell}
state := {alive}
gridsize := {10,10}
gridtype := bounded
%%
trans BREED := empty -> alive
trans DIE := alive -> empty
transrule BIRTH {
type:= BREED
condition := peer[1] = 3
}
transrule LONELY {
type := DIE
condition := peer[1] < 2
}
transrule OVERPOPULATION{
type := DIE
condition := peer[1] > 3
}
%%
populate(cell, alive, poisson(0.1))
sim CONWAY := {BIRTH, LONELY,
OVERPOPULATION}
start(100, CONWAY)
Translator Structure
Source Program
Lexical Analyzer
Syntax Analyzer
Simulation Object
Semantic Analyzer
Backend
Simulation/Output
Simulation Object
 Ties front end and back end of EXGOL compiler
 Plays role of symbol table and intermediate code
 In-memory representation of the program logic
 Different compiler phases fill information here
 Also used for error checking and semantic analysis
 This object then passed to the backend
 Looked up for computing every successive
generation
Backend
 Written in Java
 The graphical engine is written in Swing
 Runs a graphical simulation of the automata
 Can output the state of the grid at every generation
Development Infrastructure
Development Conclusion
 The compiler building tools (JFlex/BYacc) worked
very well with Java.
 Dynamic group with different personalities and
specialties.
 Difficult to coordinate five person team in terms of
schedules
Testing
 Test cases to test productions
 Test Suite – Used JUnit for testing.
Conclusion
 EXGOL is a language for cellular Automaton. Our effort in
extending the of Game of Life brings up applications which
can be more complex and also with better visual
capabilities.
 Applications can range from study of two or more
competing microorganisms for ‘N’ number of generations
or for fun to compute competing species of two different
cultures!
 So try EXGOL!