Jump to content

Template:Langton's ant

From wikiNonStop
(Redirected from Formicarium)
Template documentation

Template:Template gadget

Use this template to create an interactive instance of Langton's ant.

See the installation instructions to get it working in your wiki.

Usage

Call this template with no parameters to create a small instance with a single ant in the center, like so:

Markup Renders as
{{Langton's ant}}

Use the parameters to change the initial conditions. Click on the canvas to introduce additional ants.

Installation

Template:Template gadget installation instructions

Template data

Use this template to create an interactive instance of Langton's ant.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Autoplayautoplay

Start the game automatically

Example
yes
Booleanoptional
Widthwidth

Width of the instance, in pixels

Default
300
Example
600
Numberoptional
Heightheight

Height of the instance, in pixels

Default
150
Example
400
Numberoptional
Zoomzoom

Initial zoom of the instance

Example
3
Numberoptional
Gridgrid

Initial state of the grid

Example
on
Booleanoptional
Antsants

Initial ants of the instance, specified by a semicolon-separated list of coordinates

Default
0,0
Example
0,0; -1,0
Stringoptional
Cellscells

Initial cells of the instance, specified by a semicolon-separated list of coordinates

Example
0,1; 0,2; -1,1; -1,2
Stringoptional
Fallbackfallback

Fallback file or text, for users with JavaScript disabled or when printing

Default
[[File:LangtonsAntAnimated.gif]]
Unknownoptional

See also