murphyschaos / multilife Goto Github PK
View Code? Open in Web Editor NEWMulti-species variant of Conway's Game of Life
Home Page: http://wiki.cs.pdx.edu/oss2009/index/projects/multilife.html
License: Other
Multi-species variant of Conway's Game of Life
Home Page: http://wiki.cs.pdx.edu/oss2009/index/projects/multilife.html
License: Other
MultiLife Joel Murphy & Ba Nguyen Copyright (C) 2009 Joel Murphy & Ba Nguyen All rights reserved Multilife is licensed under the GNU General Public License, version 2. The text of this license can be found in gpl-2.0.txt. Distribution of this this software requires this paragraph to remain intact, and the gpl2.txt file to be included in the same directory folder as this README file. Introduction ============ MultiLife is a "zero-player" simulation based on Conway's Game of Life (Life). In MultiLife, the user uses a play field to create an initial condition (generation 0) and an algorithm iteratively generates all future generations. This multi-species variant allows for different types of life. A type of life is defined as a particular set of rules governing generational growth patterns. Background ========== Life's algorithm is rather simple. A rectangular array of "cells" are either on (populated) or off (vacant). A turn-based algorithm examines each previous "generation" and computes the current generation based on that information. Unpopulated cells become populated when exactly three adjacent cells were populated. Populated cells become unpopulated when the count of adjacent cells is less than two or greater than three. The algorithm of Life, which we will call the "base algorithm," is as follows: define field // array of cells define cell // current cell define cell.populated // true if "on" define cell.adjacent // ..... Count of the 'a' cells that are // .aaa. populated surrounding 'C'. Cells that // .aCa. do not exist (are on the border of the // .aaa. field) are considered unpopulated. // ..... do foreach cell in field if cell.populated = true if cell.adjacent < 2 or cell.adjacent > 3 cell.populated = false fi else if cell.adjacent = 3 cell.populated = true fi fi rof od // endless loop MultiLife ========= This project differs from Life by adding different algorithms to determine if a cell is populated, allowing for multiply types of "being." Each being type would have its own rules for generation and survival. For example, one type could check a cross pattern for survival while another could check an X pattern: ..a.. a...a ..a.. .a.a. aaCaa ..C.. ..a.. .a.a. ..a.. a...a Being types will be organized by lists according to their type, the head of each list being a double pointer, also referencing the next type of being. This has the effect of introducing a priority system to the list of life types, causing the tail of the type list to have highest priority ("nice guys finish last"). A fairly significant change to the base algorithm will be necessary to accomodate multible being types. To handle this, the algorithm will traverse a given being type, marking the cells it affects and is affected by. These marks are tallied, compared to the cell population, and the next generation is created from this data.
Add code to update influences whenever observeCheckGroup is modified. A function within Life.cpp should be added to recalculate all influences.
Example code can be found in the populateCell and unpopulateCell functions.
Draw to a pixmap (QImage?) then copy that pixmap onto the paintableFrame object.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.