https://github.com/torvaney/langtons-ant
An implementation of Langton's ant in elm
https://github.com/torvaney/langtons-ant
elm-lang
Last synced: over 1 year ago
JSON representation
An implementation of Langton's ant in elm
- Host: GitHub
- URL: https://github.com/torvaney/langtons-ant
- Owner: Torvaney
- Created: 2017-03-09T02:00:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-09T02:07:00.000Z (over 9 years ago)
- Last Synced: 2025-01-11T11:37:58.340Z (over 1 year ago)
- Topics: elm-lang
- Language: Elm
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Langton's Ant
An implementation of Langton's ant in elm.
The algorithm is described below:
> Squares on a plane are colored variously either black or white. We arbitrarily identify one square as the "ant". The ant can travel in any of the four cardinal directions at each step it takes. The "ant" moves according to the rules below:
>
> * At a white square, turn 90° right, flip the color of the square, move forward one unit
> * At a black square, turn 90° left, flip the color of the square, move forward one unit
(From [Wikipedia](https://en.wikipedia.org/wiki/Langton's_ant))
Created as part of the [Elm London Hack Night (08/03/2017)](https://www.meetup.com/Elm-London-Meetup/events/238138374/)