Team Project: Cell Society
The chess-board is the world; the pieces are the phenomena of the universe; the rules of the game are what we call the laws of Nature. — T. H. Huxley
Submitting Your Work
Use GIT to push your team's implementation to the
main branch of the provided, shared,
cellsociety_teamNN repository hosted in the course's Gitlab group.
As your submission for this project, use GIT to
push the following
doc folder: all design documentation and any supporting images
src/main/java folder: all project code
src/main/resources folder: any images or program resource files
data folder: all example simulation files
- top-level (no separate folder): project README, and otherwise no other files created by you
This project will be submitted in stages:
- Plan: plan your design for the project
- Basic: build the core features of the project to verify your design plan
- Change: extend the project by adding new features to improve your design
It is strongly encouraged that you to start simply in order to verify your understanding of the project's core features. Then refactor your code to help it serve as a foundation for the more diverse functionality expected.
In teams, write a Java program using straight OpenJFX that allows users to simulate a variety of Cellular Automata (CA) models on a regular grid of cells, each in one of a finite number of states, which are updated discretely based on a fixed rule applied to each that determines the cell's new state based on its current state and the states of the cells around it, its neighborhood. A simulation takes place on a 2D grid (a given number of rows and columns) of cells (with an initial state such as on and off). A simulation's rules (such as whether a cell changes state, is created, or moves to another position in the grid) are applied on each cell "simultaneously" (i.e., based on its current state and that of its neighbors) and then cell states are updated in a second pass. The grid's edges represent the world's bounds (i.e., cells on the grid's edges should have smaller, partial, neighborhoods than those in the middle, with full neighborhoods (i.e., 8 neighbors)).
A simulation's rule will be written in Java code but the kind of simulation, its starting configuration, as well as any initial parameter settings will be read from an eXtensible Markup Language, XML, formatted file (the exact tags of this configuration file should be decided by your team).
The full list of requirements is given here.
This project highlights the following interesting and foundational Computer Science concepts. You are not expected to write a general or complete version of any of these concepts, but learning about them may help provide a context to begin thinking about some design issues or connect your work in this course to the broader computing community.
- Real-world connection: Programming has become essential to scientific research, allowing scientists to analyze data, perform simulations, and create visualizations that would be otherwise infeasible or impractical to do by hand. Scientists use programming to simulate complex systems such as the behavior of molecules, the spread of diseases, or the dynamics of the climate in order to test hypotheses, make predictions, and gain a deeper understanding of the underlying processes.
- Cellular Automata are simulations based on a model that consists of a regular grid of cells, each in one of a finite number of states that are each updated based on a set of fixed rules described in terms of the cell's current state and the states of its immediate neighbors. Though this model is simply described, it can be used to simulate a wide variety of complex phenomena, such as ant foraging to modeling fur patterns to natural patterns to economic theory to city growth to image processing to generative music to terrain generation in video games to a possible new way to design CPUs! In fact, after 20 years of study, Stephen Wolfram declared CA were a universal mechanism for moving scientific study forward in his 1280 page book A New Kind of Science that contains hundreds of example models and others argue it could explain the universe scientifically and philosophically.
- Computational Modeling is the process of defining an algorithmic model of a physical system that is difficult or impossible to observe or control, much less experiment with. Such models can help better understand a complex system by allowing people to perform many experiments and explore the effect of even subtle changes. This helps especially for systems that involve events that are not precisely predictable even though the relative frequencies of event results may be known, e.g., a flipped coin's particular result cannot be known certainly.
However, a model's accuracy can lead to ethical questions).
- The Model, View, and Controller (MVC) architecture has proven so successful that it is the de facto standard for designing desktop, web, and mobile applications — with many popular frameworks actually requiring it. This is done to separate internal representations of information from the ways information is presented to and accepted from the user, decoupling these components and allowing for effective code reuse and more opportunities to develop and test separately and in parallel (often by people with very different skill sets). As programs become more complex, a Controller (middleware) is introduced between the Model (backend) and the View (frontend) to act as a mediator to process their interactions and provide specific application logic (we will not worry about the Controller until the next project).
- Configuration, or config, files are a standard way to customize how you interact with an application or how an application interacts with the rest of your system. There are thousands of config files on your computer, hidden by starting with a period or in system folders like
/etc. It is also thanks to config files that any time you launch an application, it has "memories" of how you like to use it (or how GIT remembers your name and which repository to send your code to). There are many standard formats but Java prefers .properties and XML files. XML is an open, industry standard, flexible format, supported by most companies (including rivals Google, Facebook, Microsoft, and Apple) as well as many web protocols and Linux programs. It is supported in all modern programming languages and, while it may be viewed as "overly-verbose", it is generally easy to read and generate algorithmically.
Individual Responsibilities when Working as a Team
This project requires steady, consistent, work — only by putting in consistent time each week will you see measurable progress and not have to pull "heroic" all-nighters.
Although this is a team project, everyone has individual responsibilities to the team that can be summed up as follows:
- actively participating in all team meetings
- regularly contributing clean code to the shared repository in reasonably sized chunks
- solving and coding at least one significant design problem
- helping teammates at least once by going above and beyond
Unfortunately conflicts are likely to occur, so please let the Teaching Team know as soon as possible — even if it has happened just once or twice since it is better to deal with the situation early rather than having a disaster at the end when little can be done to get back on track.
Experiment online with the Game of Life simulator or NetLogo Fire Simulation.