Monday November 16, 2015
Your challenge is to write a version of the Langton's Ant cellular automata that uses an arbitrary number of ants and the C language with the X11 library.
Starter code for an HTML/CSS/JavaScript version is provided in the "Langton's Ant 2 starter zip file" below. Your challenge is to write a version that uses C and X11. For reference, here are previous challenge problems having to do with Langton's Ant:

The starter code differs from these previous problems in the following ways. Your solution should also take these differences into account.
- There are now an arbitrary number of ants as opposed to a single ant.
- The simulation runs forever as opposed to for a given number of iterations.
- The grid is 101 rows by 101 columns as opposed to 11 rows by 11 columns.
- Ants are initially placed at random positions in the grid, all facing left.
Show solution
Challenge Resources:
©1994-2022   |   Shodor   |   Privacy Policy   |   NSDL   |   XSEDE   |   Blue Waters   |   ACM SIGHPC   |   feedback  |   facebook   |   twitter   |   rss   |   youtube   |   XSEDE Code of Conduct   |   Not Logged In. Login