A downloadable game for Windows

This project is a collection of cellular automata created using hTech (at the time called 'HalTec') The project contains Conway's Game of Life, a version of Langton's ant and an implementation of Wireworld.



Game Of Life

Game of Life is a cellular automaton devised by mathematician John Horton Conway in 1970. You interact with the game of life by creating an initial scene and observing how it evolves as each evolution is determined by the initial state of the world.

The rules of the Game of Life are simple.

  • Any live cell with fewer than two live neighbours dies, as if by under-population.
  • Any live cell with two or three live neighbours lives on to the next generation.
  • Any live cell with more than three live neighbours dies, as if by overpopulation.
  • Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

These rules allow for the creation of patterns or behaviours. The most common types of emergent patterns are the still lifes, oscillators and spaceships.

Oscillators

Oscillators

Spaceships

Spaceships



Langton's Ant

Langton's Ant is a cellular automaton with 2 simple rules but present complex emergent behaviour. The rules are as follows 

  • At an active square, turn 90 degrees clockwise, flip the state of the square, move forward one square.
  • At an inactive square, turn 90 degrees counter-clockwise, flip the state of the square, move forward one square.

Langton's Ant

Langton's Ant

Wireworld

Wireworld is a cellular automaton in which the evolution are constricted within the 'wires' which cannot be created or destroyed by the automaton but the state of the cells may change in such a way as to resemble the behaviour of electrical circuits.

Wireworld demo showing two clocks and one way gates.

Wireworld demo showing two clocks and one way gates

Predator/Prey

Predator/Prey is a cellular automaton in which the world comprises of 3 types of cell: Predator(Red), Prey(Green), or Empty(Black). Both predator and prey have a set amount of health which changes over time.

The rules for the simulation differ for each cell and are as follows:

  • Prey
    • Tries to move in a random direction
    • Health increases
    • When health reaches a reproduction threshold: 
      • They will reproduce, creating a new Prey cell nearby
      • Health resets to 1
  • Predator
    • Tries to move in a random direction. 
    • Health decreases. 
    • When health reaches 0, they die and turn into an empty cell.
    • However, if an adjacent square is a prey, they will eat it, turning it into a predator cell as if they were reproducing and their health will increase by the amount of health the eaten prey had.

This cellular automaton is based upon Hopson's implementation of the same ruleset in the video below:

This cellular automaton is in a seperate file as it was created first and before 'HalTec' and comes from a seperate repo.

Controls

Game of Life

  • Space : Pause/Unpause
  • Left Click : Makes a cell active
  • Right Click : Makes a cell inactive

Langton's Ant

  • Space : Pause/Unpause
  • Left Click : Toggles a cell
  • Middle Click : Moves the ant to the hovered cell

Wireworld

  • Space : Pause/Unpause
  • Left Click : Makes a cell a conductor
  • Right Click : Makes a cell an electron head
  • Middle Click : Clears a cell

Predator/Prey

  • Left Click : Create Prey
  • Right Click : Create Predator
  • Middle Click : Clear Cell
  • C : Clear screen
  • Space : Toggle Paused.
  • Escape : Quit

Download

Download
Cellular Automata.zip 2 MB
Download
PredatorPrey.zip 451 kB

Install instructions

Download and extract the .ZIP file. Double click the .exe to run.

Leave a comment

Log in with itch.io to leave a comment.