{"version":"1.0","type":"rich","title":"Python script for creating a Langton's Ant cellular automata","description":"This example visualizes Langton’s Ant cellular automata on a 128-by-128 finite grid, showing the emergent trail of black and white cells as one or more ants move according to a configurable turning rule. The simulation runs up to 11,000 steps, then renders the final board state and ant positions using Matplotlib’s `imshow` with a gray colormap and a red overlay via `numpy.ma` masks. The code defines `Grid` and `Ant` classes in Python, uses NumPy arrays for the board, and saves the output as a PNG image.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-b8b1544792b4f94ffc592390e5797af6?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}