(GOL) Langtons's ants

  • archived_account
    5th Aug 2019 Member 0 Permalink

    Langton's ant is a 2D cellular automaton. Classic rules: when the "ant" is on white (unfilled) pixel, it paints it to black and rotates 90° left. When its on black (filled) pixel, it paints it white and rotates 90° right.

     

    I made three versions: LR (classic), LRL (3-state) and LRRL (4-state, symmetrical)

    You can change their speed (generations per frame) by changing its dcolour. Default to 20.

    Unfortunately, i didnt found any better way: the ant's particles stored in the [5,5] pixel so the ants are "remote"...

     

    Download links:

    LR version (click)

    LRL version (click)

    LRRL version (click)

  • archived_account
    6th Aug 2019 Member 0 Permalink

    @LBPHacker (View Post)

     But i used the same way... The ant's X stored in life, Y in tmp2, direction in tmp and the particle itslef in [5,5] pixel...

  • LBPHacker
    6th Aug 2019 Developer 0 Permalink

    That is quite obviously not the same approach; the one I linked doesn't store anything at (5; 5).

  • regk
    9th Sep 2022 Member 0 Permalink

    whats the difference between the 3 versions?

     

    Edit:oh my god im an idiot there for the different types

    Edited once by regk. Last: 9th Sep 2022