Hexagon

Hexagon is a command line tool to simulate the game of life. With this cellular automaton, complex rules can be defined and the process over time displayed.

Version: 1.8.26

For command documentation, start the program for the first time. hexagon.macro is created with a complete list of commands.

This program is owned by Heiko Stark. It can be used free of charge for non-commercial use. For the common citations in publications, please use the following entry “Hexagon software (Heiko Stark, Jena, Germany, URL: https://starkrats.de)”.

An installer for Windows and Linux can be found here: Software

▸ Download

hexagon 64bit AVX (Windows & Wine/Darwine)
hexagon 64bit (Windows & Wine/Darwine)
hexagon 32bit (Windows, ReactOS & Wine/Darwine)

hexagon 64bit AVX (MacOS X & Darling)
hexagon 64bit (MacOS X & Darling)
hexagon 32bit (MacOS X & Darling)

hexagon 64bit AVX (Linux)
hexagon 64bit (Linux)
hexagon 32bit (Linux)
hexagon aarch64 (Linux)
hexagon arm (Linux)

hexagon 64bit AVX (FreeBSD)
hexagon 64bit (FreeBSD)
hexagon 32bit (FreeBSD)

hexagon 64bit AVX (Solaris)
hexagon 64bit (Solaris)
hexagon 32bit (Solaris)

Note: Intel 32bit runs also on 64bit or 64bit AVX systems, but only with 4 GB memory!
Note: Intel 64bit runs also on 64bit AVX systems, but without Advanced Vector Extensions!

▸ Example

// https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life

// The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970.
// It is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input.
// One interacts with the Game of Life by creating an initial configuration and observing how it evolves.
// It is Turing complete and can simulate a universal constructor or any other Turing machine.

// 1. Any live cell with fewer than two live neighbours dies, as if by underpopulation.
// 2. Any live cell with two or three live neighbours lives on to the next generation.
// 3. Any live cell with more than three live neighbours dies, as if by overpopulation.
// 4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

color.map.special 1 10

world.new 100 200
world.fill.random 1 0.1

rules.insert neighbors < 2 set 0 // 1.
rules.insert neighbors = 2 set 1 // 2. & 4.
rules.insert neighbors > 2 set 0 // 3.

image.rgb
image.new 400 400
world.setborder 1

for 200
    world.render.colormap <25,50> <75,150>
    id #= -3 for.count
    name := “test_i” id “.png”
    image.save name
    rules.step
end

execute convert “-delay 50 -loop 0 test_i*.png animated_2.gif”

io.file.delete test_i*.png

If you want to send me a bug report or have some suggestions about what future versions of ‘hexagon’ should support, you can contact me either by email (bugs[@]starkrats[dot]de).