Skip to content

sonwezali/langtons-ant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This README file was written with the help of AI.

Langton's Ant (Raylib)

This project is an implementation of Langton's Ant using the Raylib graphics library. Langton's Ant is a two-dimensional universal Turing machine with a very simple set of rules but complex emergent behavior. The ant moves on a grid of black and white cells, turning and flipping the color of the cell according to simple rules. However, instead of exactly one ant, there are one or more (upper bound can be configured in the code) ants in this project.

langtons-ant-w-randomization.mp4

Features

  • Visual simulation of Langton's Ant

Requirements

  • Raylib (C graphics library)
  • C compiler (e.g., gcc)

Building

  1. Make sure Raylib is installed on your system.
  2. Compile the project using gcc:
    gcc ant.c -o ant -lraylib -lm
    (You may need to adjust the linker flags depending on your system.)

Running

After building, run the simulation with:

./ant

Files

  • ant.c: Main source code for the simulation

License

This project is open source, released under the MIT License. See the LICENSE file for details.

References

About

implementation of 1 ant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages