GLife
v0.4.2

GLife-Web

This project is a web implementation of Conway's Game of Life (with a little twist of the Genetic Algorithm utilisation).

Repository: https://github.com/lbacik/glife-web

The genetic algorithm is implemented by a library called genes.

How it works

Board

The board has two modes: the ad hoc play or presenting test results. When playing in ad hoc mode, you have the freedom to set all game parameters:

  • width - the board width in cell number
  • height - the board height
  • cell size - the size of the one cell in pixels
  • survive - this setting refers to the Game of Life rules and determines the number of neighbours a cell needs to stay alive.
  • reproduction - specify the number of neighbours needed to turn an empty cell into a live cell.

The survive and reproduction settings are set to Conway Game of Life rules by default.

Controls

  • this button allows you to calculate the next generation of the colony visible on the board - it is a single step
  • The play button allows you to calculate the next generation automatically at intervals specified in the interval input box.

Initial colony

There are also settings allowing you to set the initial colony.

  • x - the x coordinate of the colony start cell
  • y - the y coordinate of the colony start cell
  • width - the width of the colony
  • initial generation - the initial generation of the colony provided as the string of 0 and 1 characters

Because the way the initial colony is set can be a little bit tricky,
which probably will explain the whole idea much better than words!

Here is an example that will better explain the idea of setting the initial colony rather than just describing it with words.

  • show on grid - this checkbox shows where the initial colony will be placed on the board
  • Apply - applies the initial colony settings - now you can start to play!

Colony url

The initial colony can be also set by providing the url with the initial colony settings - such an url for an actually set colony is visible below all other settings. You can copy it and send it to your friends to show them your colony. Also, notice the Set initial button above the board - by it, you can generate the initial setting from the current board state.

Tests

Tests are described by JSON objects at JsonHub service - currently used test definition is named test-v1.

Examples

diagram

Add test process is a non-public, manual process. Hence, users cannot calculate the tests themselves. The GLife project is intended only to display the test results that are already calculated by the instance owner.