Langton's Ant Music

For discussion of other cellular automata.
User avatar
wirehead
Posts: 245
Joined: June 18th, 2022, 2:37 pm
Location: Under a thinking cap
Contact:

Langton's Ant Music

Post by wirehead » June 22nd, 2022, 2:38 pm

Over the years there have been a lot of attempts to make music with cellular automata. A lot of attempts have been tried so far, some using a 2D CA like CGoL, some using 1D CA like Rule 110. To me at least, all of those (and some of my own failed attempts) sound like toddlers banging on pianos. Not music.

On Monday I got the idea to make music using Langton's Ant -- play notes depending on what the ant does. I cobbled together a little editor and put it here: old link: https://dragoncoder047.github.io/ca-exp ... index.html https://dragoncoder047.github.io/langton-music

Suffice to say it still sounds like a toddler banging on a piano -- at least with the very minimal examples (1 or 2 notes, 1 ant) I have played with. I would be interested in seeing what you all think of it and what you create.
Last edited by wirehead on September 6th, 2022, 4:46 pm, edited 1 time in total.
Langton's ant: Can't play the drums, can be taught.

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Langton's Ant Music

Post by pcallahan » June 22nd, 2022, 3:03 pm

wirehead wrote:
June 22nd, 2022, 2:38 pm
Suffice to say it still sounds like a toddler banging on a piano -- at least with the very minimal examples (1 or 2 notes, 1 ant) I have played with. I would be interested in seeing what you all think of it and what you create.
That's better than my attempt to add sound to CGoL, which sounded like a lawnmower engine at its best. Granted, I was not generating notes. I was trying to get the cell changes to create the actual sound waves as vibrations.

You might be able to get something that at least sounds like wind chimes (the world's oldest generative music?).

User avatar
wirehead
Posts: 245
Joined: June 18th, 2022, 2:37 pm
Location: Under a thinking cap
Contact:

Re: Langton's Ant Music

Post by wirehead » June 22nd, 2022, 4:01 pm

pcallahan wrote:
June 22nd, 2022, 3:03 pm
You might be able to get something that at least sounds like wind chimes (the world's oldest generative music?).
Wind chimes... I never though of it that way. My previous attempt with the 1D CA would probably sound like that if I used the right synth. Except I was using a Tron-like electronic synth sound so it sounded even weirder.

What I was thinking of with this experiment was more complicated ants like this one I got off the Wikipedia page:

Code: Select all

bpm: 360
[Cricket RRLLLRLLLRRR
  {1:0 => put(1)  rt fd play(C4)}
  {1:1 => put(2)  rt fd play(D4)}
  {1:2 => put(3)  lt fd play(E4)}
  {1:3 => put(4)  lt fd play(F4)}
  {1:4 => put(5)  lt fd play(G4)}
  {1:5 => put(6)  rt fd play(A4)}
  {1:6 => put(7)  lt fd play(B4)}
  {1:7 => put(8)  lt fd play(C5)}
  {1:8 => put(9)  lt fd play(D5)}
  {1:9 => put(10) rt fd play(E5)}
  {1:10=> put(11) rt fd play(F5)}
  {1:11=> put(0)  rt fd play(G5)}
]
.[RRLLLRLLLRRR:1:1]
It sort of sounds like music, but sort of doesn't. Maybe you can try something -- see what you get.
Langton's ant: Can't play the drums, can be taught.

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Langton's Ant Music

Post by pcallahan » June 24th, 2022, 2:54 pm

I'm not sure how to play your last example. I did listen to the ants demo and it at least has an appealing beat. I'm not a musician so I am not sure what you could do with that.

Digression 1: I was thinking about wind chimes recently and started to go in the opposite direction: people sometimes use Markov processes to generate algorithmic music in which the next note depends on an internal state. (Google turns up this.) Wind chimes, however, have no internal state (or very little besides the momentum of swinging chimes). So my question is whether you could design physical wind chimes with some kind of internal state (purely mechanical, e.g. with weights, pulley, ratchets, cams, etc.) that would both cycle through different states as the wind moves it and would also play different notes based on the state. I have no particular point except that I often like thinking about retro (or maybe steampunk) designs: what if centuries ago, someone had a modern idea about computation or dynamic systems and no way to implement it except using available mechanical methods. People were making very complex mechanical automata in the 19th century.

Digression 2: I started thinking again about how to add sound (not really music) to CGoL and get something better than a lawnmower engine as a result (something I got when I tried over 20 years ago). I still believe my original (physics based) idea could be made to work with some tweaks:
  • Suppose CGoL happened in an elastic medium that could carry sound.
  • When a Life transition occurs, make some kind of local change to start a vibration.
  • Capture sounds from virtual microphones by measuring how the medium vibrates at various positions.
In my original version, I represented the medium as weights fixed in (x,y) position at each cell position but free to move up and down. They have a position and velocity. The velocity is changed by an acceleration determined by the position of their 4 Moore neighbors (left, right, above, below) and acts as a restorative force tending to move towards their average position (this is similar, but not quite the same as saying the masses are connected to neighbors by ideal Hookean springs). Then position is changed by adding velocity. Coefficients can be adjusted to get different resonances.

I think the above part still works. The next idea I had was to make each cell transition a "pluck" of the string at the corresponding position. This adds energy and you need to do something to keep the amplitude from increasing over time (e.g. you can add friction). But the part where I probably made a mistake was in having the frequency of the resulting waves be very close to 1 per Life generation. It would be better I think, though it requires more computation, to have the vibration frequency much higher, say 100x, than the speed of generation. In that case, Life transitions would alter the tones produced but would not drive them directly (which is what sounds like a lawnmower).

Instead of plucking, another idea would be "magic" changes in mass that conserved energy. So e.g. each empty cell is a unit mass with some z position and velocity. When it becomes live, the mass could increase by some multiple (I'm thinking 10x but it would have to be determined by experiment) and the velocity would be changed so that potential+kinetic energy is conserved. When it dies, the reverse happens, causing a sudden increase in velocity, much like plucking a string. (I can imagine a physical analog of suddenly being attached to a dead weight by a hook though I am struggling to imagine how the reverse would happen).

Anyway, the goal of all this would be to have sound in Life that really behaves like sound in physics, possibly including diffraction and reflection around stationary patterns composed of heavier weights. There would also be attenuation with distance, a natural speed of sound, and something similar (but again not quite) the Doppler effect might be observed listening to the wake of a glider depending on whether it is approaching or receding.

User avatar
wirehead
Posts: 245
Joined: June 18th, 2022, 2:37 pm
Location: Under a thinking cap
Contact:

Re: Langton's Ant Music

Post by wirehead » June 24th, 2022, 4:01 pm

pcallahan wrote:
June 24th, 2022, 2:54 pm
I'm not sure how to play your last example. I did listen to the ants demo and it at least has an appealing beat. I'm not a musician so I am not sure what you could do with that.
Sorry, I should have been more clear there. Scroll down to the box marked "Input text", paste it in there, then scroll back up to the top, click "Load", and then click "Start". The ant in the example I posted has 12 different colors (and 12 different notes) and tends to end up in some recurring "themes" that I find more musical than just the bim-bim-bim-bim-bim-bim of the plain Langton's ant that is the default right now.
pcallahan wrote:
June 24th, 2022, 2:54 pm
...Anyway, the goal of all this would be to have sound in Life that really behaves like sound in physics, possibly including diffraction and reflection around stationary patterns composed of heavier weights. There would also be attenuation with distance, a natural speed of sound, and something similar (but again not quite) the Doppler effect might be observed listening to the wake of a glider depending on whether it is approaching or receding.
That's an interesting idea. I think it could be possible using WebAssembly (compiled from C) or WebGL or GPGPU or something like that, all of which are baffling to me and I would never be able to hurdle. Your lawnmower engine is father than I would have gotten. But either way, it's not Langton's ant.
Langton's ant: Can't play the drums, can be taught.

User avatar
pcallahan
Posts: 845
Joined: April 26th, 2013, 1:04 pm

Re: Langton's Ant Music

Post by pcallahan » June 24th, 2022, 7:25 pm

wirehead wrote:
June 24th, 2022, 4:01 pm
Sorry, I should have been more clear there. Scroll down to the box marked "Input text", paste it in there, then scroll back up to the top, click "Load", and then click "Start". The ant in the example I posted has 12 different colors (and 12 different notes) and tends to end up in some recurring "themes" that I find more musical than just the bim-bim-bim-bim-bim-bim of the plain Langton's ant that is the default right now.
I finally got it. It reminds me a little of someone practicing on an organ before a church service (going back to childhood memories). Did you set the timbre to sound like this? I'm not sure how long this would really capture my interest, but it might work as ambient music.

User avatar
wirehead
Posts: 245
Joined: June 18th, 2022, 2:37 pm
Location: Under a thinking cap
Contact:

Re: Langton's Ant Music

Post by wirehead » June 24th, 2022, 9:55 pm

pcallahan wrote:
June 24th, 2022, 7:25 pm
I finally got it. It reminds me a little of someone practicing on an organ before a church service (going back to childhood memories). Did you set the timbre to sound like this? I'm not sure how long this would really capture my interest, but it might work as ambient music.
Currently I only have two different timbres -- see here, lines 4 and 14. If you can think of more different timbres (and ways to make the audio less janky) send them my way!

Also see here for a syntax guide if you want to mess around with it.

EDIT August 30: Fixed link to syntax guide.
Last edited by wirehead on August 30th, 2022, 3:19 pm, edited 1 time in total.
Langton's ant: Can't play the drums, can be taught.

User avatar
breaker's glider gun
Posts: 670
Joined: May 23rd, 2021, 10:26 am
Location: the inside of a stuffed anaconda or maybe [click to not expand]

Re: Langton's Ant Music

Post by breaker's glider gun » August 24th, 2022, 7:03 pm

Code: Select all

bpm: 120
[Cricket RLRLhopRr
  {1:0 => put(1) rt fd play(C2)}
  {1:1 => put(2) lt fd play(G2)}
  {1:2 => put(3) rt fd play(G3)}
  {1:3 => put(4) lt fd fd play(G3)}
  {1:4 => put(1) rt rt fd play(G5)}
]
.[RLRLhopRr:1:1]

Code: Select all

bpm: 360
[Cricket RRStopRhopStopLhopcycle
  {1:0 => put(1) rt fd play(C2)}
  {1:1 => put(2) rt fd play(G2)}
  {1:2 => put(3)}
  {1:3 => put(4) rt fd fd}
  {1:4 => put(5)}
  {1:5 => put(1) lt fd fd play(G3)}
]
.[RRStopRhopStopLhopcycle:1:1]
the second makes a pretty oblique highway that looks like the real diagonal one XD
at this point I have the sound off and am just using it for an ant simulator
EDIT: cool

Code: Select all

bpm: 360
[Cricket RRStopRhopStopLhopcycle
  {1:0 => put(1) rt fd play(C2)}
  {1:1 => put(2) rt fd play(G2)}
  {1:2 => put(3)}
  {1:3 => put(4) rt fd fd}
  {1:4 => put(5)}
  {1:5 => put(2)lt fd fd put(6) fd fd put(6) play(G3)}
  {1:6 => put(0) dir(2) fd rt}
]
.[RRStopRhopStopLhopcycle:1:1]
:?: :?: . . . :!:
Give me a suggestion of something to draw here!

User avatar
wirehead
Posts: 245
Joined: June 18th, 2022, 2:37 pm
Location: Under a thinking cap
Contact:

Re: Langton's Ant Music

Post by wirehead » August 25th, 2022, 4:15 am

breaker's glider gun wrote:
August 24th, 2022, 7:03 pm
a bunch of ants
Wow! Finally someone other than me has been screwing around in this simulator. I don't know of what else of a use this would be for, but the nice thing I've found with it is it allows for ants that "jump" more than one square without using intermediate states as would be required in Golly.

Bugs aside, these ants still don't use all the commands available. Using the spawn command one can create more ants, and the die command to remove them. (The problem with this is that if spawn occurs more than die the ants increase without bound and the simulator bogs down; more die than spawn and eventually all ants will die and everything will stop.)

Now that you've played around with it a little, what suggestions do you have? I'm open to any and all, either here or on GitHub.
Langton's ant: Can't play the drums, can be taught.

User avatar
breaker's glider gun
Posts: 670
Joined: May 23rd, 2021, 10:26 am
Location: the inside of a stuffed anaconda or maybe [click to not expand]

Re: Langton's Ant Music

Post by breaker's glider gun » August 25th, 2022, 4:33 pm

what's going on?

Code: Select all

bpm: 120
[Beetle TermiteQueen
  {1:0 => put(1) fd fd spawn(egga:0:0) rt rt fd fd lt}
  {1:1 => put(2) fd fd spawn(eggb:0:0) rt rt fd fd lt}
  {1:2 => put(3) fd fd spawn(eggc:0:0) rt rt fd fd lt}
  {1:3 => put(4) fd fd spawn(eggd:0:0) rt rt fd fd lt}
  {1:4 => put(5)}
  {1:5 => fd rt put(0)}
]
[Beetle egga
  {1:0 => spawn(eggb:0:0)die}
  {1:1 => spawn(eggb:0:0)die}
  {1:2 => spawn(eggb:0:0)die}
  {1:3 => spawn(eggb:0:0)die}
  {1:4 => spawn(eggb:0:0)die}
  {1:5 => spawn(eggb:0:0)die}
]
[Beetle eggb
  {1:0 => spawn(eggc:0:0)die}
  {1:1 => spawn(eggc:0:0)die}
  {1:2 => spawn(eggc:0:0)die}
  {1:3 => spawn(eggc:0:0)die}
  {1:4 => spawn(eggc:0:0)die}
  {1:5 => spawn(eggc:0:0)die}
]
[Beetle eggc
  {1:0 => spawn(eggd:0:0)die}
  {1:1 => spawn(eggd:0:0)die}
  {1:2 => spawn(eggd:0:0)die}
  {1:3 => spawn(eggd:0:0)die}
  {1:4 => spawn(eggd:0:0)die}
  {1:5 => spawn(eggd:0:0)die}
]
[Beetle eggd
  {1:0 => spawn(turm:0:0)die}
  {1:1 => spawn(turm:0:0)die}
  {1:2 => spawn(turm:0:0)die}
  {1:3 => spawn(turm:0:0)die}
  {1:4 => spawn(turm:0:0)die}
  {1:5 => spawn(turm:0:0)die}
]
[Beetle turm
  {1:0 => put(1) fd lt}
  {1:1 => put(2) fd rt}
  {1:2 => put(3) fd lt}
  {1:3 => put(4) fd rt}
  {1:4 => put(5) fd lt}
  {1:5 => put(0) die}
]
.[TermiteQueen:1:1]
oh I see.

Code: Select all

bpm: 120
[Beetle TermiteQueen
  {1:0 => put(1) fd fd spawn(egga:0:0) rt rt fd fd lt}
  {1:1 => put(2) fd fd spawn(eggb:0:0) rt rt fd fd lt}
  {1:2 => put(3) fd fd spawn(eggc:0:0) rt rt fd fd lt}
  {1:3 => put(4) fd fd spawn(eggd:0:0) rt rt fd fd lt}
  {1:4 => put(5)}
  {1:5 => fd rt put(0)}
]
[Beetle egga
  {0:0 => spawn(eggb:0:0)die}
  {0:1 => spawn(eggb:0:0)die}
  {0:2 => spawn(eggb:0:0)die}
  {0:3 => spawn(eggb:0:0)die}
  {0:4 => spawn(eggb:0:0)die}
  {0:5 => spawn(eggb:0:0)die}
]
[Beetle eggb
  {0:0 => spawn(eggc:0:0)die}
  {0:1 => spawn(eggc:0:0)die}
  {0:2 => spawn(eggc:0:0)die}
  {0:3 => spawn(eggc:0:0)die}
  {0:4 => spawn(eggc:0:0)die}
  {0:5 => spawn(eggc:0:0)die}
]
[Beetle eggc
  {0:0 => spawn(eggd:0:0)die}
  {0:1 => spawn(eggd:0:0)die}
  {0:2 => spawn(eggd:0:0)die}
  {0:3 => spawn(eggd:0:0)die}
  {0:4 => spawn(eggd:0:0)die}
  {0:5 => spawn(eggd:0:0)die}
]
[Beetle eggd
  {0:0 => spawn(turm:0:1)die}
  {0:1 => spawn(turm:0:1)die}
  {0:2 => spawn(turm:0:1)die}
  {0:3 => spawn(turm:0:1)die}
  {0:4 => spawn(turm:0:1)die}
  {0:5 => spawn(turm:0:1)die}
]
[Beetle turm
  {1:0 => put(1) fd lt}
  {1:1 => put(2) fd rt}
  {1:2 => put(3) fd lt}
  {1:3 => put(4) fd dir(0)}
  {1:4 => put(5) fd lt}
  {1:5 => put(0) die}
]
.[TermiteQueen:1:1]
ok, what's wrong NOW?
(also, I would like a thingy. you know where you say, {1:0 => put(1) fd lt}? well I want another number added to that 1:0. I want direction, and if there is only 1:0, it assumes all, but you can make 1:0:0, 1:0:1, ect to play different notes(or make different movements).)
EDIT:

Code: Select all

bpm: 120
[Beetle TermiteQueen
  {5:0 => put(1) fd fd spawn(turm:0:1) rt rt fd fd lt}
  {5:1 => put(2) fd fd spawn(turm:0:1) rt rt fd fd lt}
  {5:2 => put(3) fd fd spawn(turm:0:1) rt rt fd fd lt}
  {5:3 => put(4) fd fd spawn(turm:0:1) rt rt fd fd lt}
  {5:4 => put(5)}
  {5:5 => fd rt put(0)}
]
[Beetle turm
  {1:0 => put(1) fd lt}
  {1:1 => put(2) fd rt}
  {1:2 => put(3) fd lt}
  {1:3 => put(4) fd dir(0)}
  {1:4 => put(5) fd lt}
  {1:5 => put(0) die}
]
.[TermiteQueen:1:5]
I will place more ants here. {[(*+begin ants stockpile+*)]}

Code: Select all

bpm: 360
[Cricket myant
  {1:0 => put(1) rt fd play(C2)}
  {1:1 => put(10) fd play(G2)}
  {1:10 => put(0) lt fd play(A3)}
]
.[myant:1:1]

Code: Select all

bpm: 120
[Beetle myant
  {1:0 => put(1) rt fd play(C2)}
  {1:1 => put(10) fd play(G2)}
  {1:10 => put(100) lt fd rt fd fd lt play(G2)}
  {1:100 => put(0) lt fd rt fd lt play(G2)}
]
.[myant:1:1]

Code: Select all

bpm: 360
[Cricket myant
  {1:0 => put(1) rt fd play(C2)}
  {1:1 => put(10) fd play(G2)}
  {1:10 => put(100) fd play(A3)}
  {1:100 => put(0) state(10)}
  {10:0 => put(1) lt fd play(C2)}
  {10:1 => put(10) fd play(G2)}
  {10:10 => put(100) fd play(A3)}
  {10:100 => put(0) state(1)}
]
.[myant:1:1]
Last edited by breaker's glider gun on August 25th, 2022, 6:01 pm, edited 1 time in total.
:?: :?: . . . :!:
Give me a suggestion of something to draw here!

User avatar
wirehead
Posts: 245
Joined: June 18th, 2022, 2:37 pm
Location: Under a thinking cap
Contact:

Re: Langton's Ant Music

Post by wirehead » August 25th, 2022, 5:32 pm

breaker's glider gun wrote:
August 25th, 2022, 4:33 pm

Code: Select all

bpm: 120
[Beetle TermiteQueen
  {1:0 => put(1) fd fd spawn(egga:0:0) rt rt fd fd lt}
  {1:1 => put(2) fd fd spawn(eggb:0:0) rt rt fd fd lt}
  {1:2 => put(3) fd fd spawn(eggc:0:0) rt rt fd fd lt}
  {1:3 => put(4) fd fd spawn(eggd:0:0) rt rt fd fd lt}
  {1:4 => put(5)}
  {1:5 => fd rt put(0)}
]
[Beetle egga
  {0:0 => spawn(eggb:0:0)die}
  {0:1 => spawn(eggb:0:0)die}
  {0:2 => spawn(eggb:0:0)die}
  {0:3 => spawn(eggb:0:0)die}
  {0:4 => spawn(eggb:0:0)die}
  {0:5 => spawn(eggb:0:0)die}
]
[Beetle eggb
  {0:0 => spawn(eggc:0:0)die}
  {0:1 => spawn(eggc:0:0)die}
  {0:2 => spawn(eggc:0:0)die}
  {0:3 => spawn(eggc:0:0)die}
  {0:4 => spawn(eggc:0:0)die}
  {0:5 => spawn(eggc:0:0)die}
]
[Beetle eggc
  {0:0 => spawn(eggd:0:0)die}
  {0:1 => spawn(eggd:0:0)die}
  {0:2 => spawn(eggd:0:0)die}
  {0:3 => spawn(eggd:0:0)die}
  {0:4 => spawn(eggd:0:0)die}
  {0:5 => spawn(eggd:0:0)die}
]
[Beetle eggd
  {0:0 => spawn(turm:0:1)die}
  {0:1 => spawn(turm:0:1)die}
  {0:2 => spawn(turm:0:1)die}
  {0:3 => spawn(turm:0:1)die}
  {0:4 => spawn(turm:0:1)die}
  {0:5 => spawn(turm:0:1)die}
]
[Beetle turm
  {1:0 => put(1) fd lt}
  {1:1 => put(2) fd rt}
  {1:2 => put(3) fd lt}
  {1:3 => put(4) fd dir(0)}
  {1:4 => put(5) fd lt}
  {1:5 => put(0) die}
]
.[TermiteQueen:1:1]
ok, what's wrong NOW?
What's wrong is two things. There is a bug in my code (not fixed yet, but I might) that the ants are put in a queue, and processes them in order until it gets to the end of the list. The Termite Queen spawn egga, which goes to the end of the list and is processed on the same step. It spawns eggb, which goes to the end of the list and is processed on the same step. You see where this is going. All of the eggx and turm ants end up on top of each other on the same tick.

The other thing that is going on is the turms don't die unless they are on state 5, and they move around. So probability speaking, they have a 1-in-5 chance of dying, except every step the Turmite Queen spawns one new turm (via the eggx intermediate breeds as explained above). So on average, every 5 steps 4 new ants are born.

This really bogs down the simulator - it wasn't designed to handle more than two or three ants at once. Not to mention all the eggx ants appearing and dying. At step 12 there are 754 ants and produces this MASSIVE dump:

Code: Select all

bpm: 120;
stepCount: 12
[Beetle TermiteQueen
  {1:0 =>
    put(1) fd fd spawn(egga:0:0) rt rt fd fd lt
  }
  {1:1 =>
    put(2) fd fd spawn(eggb:0:0) rt rt fd fd lt
  }
  {1:2 =>
    put(3) fd fd spawn(eggc:0:0) rt rt fd fd lt
  }
  {1:3 =>
    put(4) fd fd spawn(eggd:0:0) rt rt fd fd lt
  }
  {1:4 =>
    put(5)
  }
  {1:5 =>
    fd rt put(0)
  }
]
[Beetle egga
  {0:0 =>
    spawn(eggb:0:0)
  }
  {0:1 =>
    spawn(eggb:0:0)
  }
  {0:2 =>
    spawn(eggb:0:0)
  }
  {0:3 =>
    spawn(eggb:0:0)
  }
  {0:4 =>
    spawn(eggb:0:0)
  }
  {0:5 =>
    spawn(eggb:0:0)
  }
]
[Beetle eggb
  {0:0 =>
    spawn(eggc:0:0)
  }
  {0:1 =>
    spawn(eggc:0:0)
  }
  {0:2 =>
    spawn(eggc:0:0)
  }
  {0:3 =>
    spawn(eggc:0:0)
  }
  {0:4 =>
    spawn(eggc:0:0)
  }
  {0:5 =>
    spawn(eggc:0:0)
  }
]
[Beetle eggc
  {0:0 =>
    spawn(eggd:0:0)
  }
  {0:1 =>
    spawn(eggd:0:0)
  }
  {0:2 =>
    spawn(eggd:0:0)
  }
  {0:3 =>
    spawn(eggd:0:0)
  }
  {0:4 =>
    spawn(eggd:0:0)
  }
  {0:5 =>
    spawn(eggd:0:0)
  }
]
[Beetle eggd
  {0:0 =>
    spawn(turm:0:1)
  }
  {0:1 =>
    spawn(turm:0:1)
  }
  {0:2 =>
    spawn(turm:0:1)
  }
  {0:3 =>
    spawn(turm:0:1)
  }
  {0:4 =>
    spawn(turm:0:1)
  }
  {0:5 =>
    spawn(turm:0:1)
  }
]
[Beetle turm
  {1:0 =>
    put(1) fd lt
  }
  {1:1 =>
    put(2) fd rt
  }
  {1:2 =>
    put(3) fd lt
  }
  {1:3 =>
    put(4) fd dir(0)
  }
  {1:4 =>
    put(5) fd lt
  }
  {1:5 =>
    put(0) die
  }
]
3.[turm:2:1]A$8.A$7.[turm:1:1][turm:3:1]C.[turm:1:1]A[turm:2:1][turm:1:1][turm:3:1]A[turm:3:1]$3.[turm:1:1]BCB[turm:1:1]B[eggd:0:0][turm:0:1]C[eggc:0:0][eggd:0:0][eggd:0:0][eggd:0:0][turm:0:1][turm:0:1].[turm:0:1][turm:0:1]D[turm:2:1][turm:3:1][turm:3:1][turm:1:1][turm:3:1]A[turm:1:1]$.BE[turm:3:1][turm:3:1][turm:3:1]A[turm:0:1]3.[turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:2:1][turm:2:1][turm:2:1][turm:2:1][turm:0:1]D[turm:1:1][turm:3:1][turm:1:1][turm:0:1][turm:3:1][turm:3:1][turm:3:1][turm:0:1][turm:3:1][turm:1:1][turm:3:1][turm:0:1][turm:3:1][turm:3:1][turm:1:1][turm:3:1][turm:0:1][turm:3:1][turm:1:1][turm:3:1][turm:3:1][turm:3:1][turm:1:1][turm:0:1][turm:3:1][turm:3:1][turm:3:1][turm:0:1][turm:3:1][turm:1:1][turm:3:1][turm:0:1][turm:3:1]C[turm:0:1][turm:0:1][turm:2:1]$.[turm:1:1][turm:3:1]A[turm:3:1][turm:2:1][turm:2:1][turm:0:1][turm:2:1][turm:0:1][turm:2:1].[eggc:3:0][eggd:3:0][eggd:3:0][eggd:3:0][eggd:3:0][eggd:3:0][eggd:3:0][eggd:3:0][eggd:3:0][turm:2:1][eggd:3:0][turm:3:1][turm:3:1][turm:3:1][turm:3:1][turm:3:1][turm:3:1][turm:3:1][turm:3:1]A[eggb:3:0][eggc:3:0][eggc:3:0][eggd:3:0][eggc:3:0][eggd:3:0][eggd:3:0][eggc:3:0][eggd:3:0][eggd:3:0][turm:3:1][eggd:3:0][turm:3:1][turm:3:1]EC[egga:1:0][eggb:1:0][eggb:1:0][eggc:1:0][eggb:1:0][eggc:1:0][eggc:1:0][eggd:1:0][eggb:1:0][eggc:1:0][eggc:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggb:1:0][eggc:1:0][eggc:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggb:1:0][eggc:1:0][eggc:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggb:1:0][eggc:1:0][eggc:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][turm:1:1][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][turm:3:1][eggd:1:0][turm:1:1][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][turm:1:1][eggd:1:0][eggb:1:0][eggc:1:0][eggc:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggb:1:0][eggc:1:0][eggc:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggb:1:0][eggc:1:0][eggc:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][turm:1:1][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][turm:1:1][eggc:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggd:1:0][eggb:1:0][eggc:1:0][eggc:1:0][eggd:1:0][eggc:1:0][eggd:1:0][eggd:1:0][turm:1:1][eggc:1:0][eggd:1:0][eggd:1:0][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][eggc:1:0][eggd:1:0][eggd:1:0][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][eggc:1:0][eggd:1:0][eggd:1:0][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggc:1:0][eggd:1:0][eggd:1:0][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggc:1:0][eggd:1:0][eggd:1:0][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggc:1:0][eggd:1:0][eggd:1:0][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggc:1:0][eggd:1:0][eggd:1:0][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][eggd:1:0][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1][turm:1:1]A[turm:0:1][turm:3:1][eggd:1:0][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:1:1].[turm:1:1][turm:1:1][turm:3:1][turm:0:1]$.A[turm:3:1][turm:1:1][turm:0:1]C[turm:0:1]A[turm:3:1]A[turm:1:1].[TermiteQueen:3:1]AD[turm:3:1][turm:1:1][turm:3:1][turm:1:1][turm:1:1][turm:0:1][turm:1:1][turm:3:1][turm:1:1]C[turm:0:1][turm:2:1][turm:0:1]$.ABE[turm:2:1]A[eggb:2:0][eggc:2:0][eggc:2:0][eggd:2:0][eggc:2:0][eggd:2:0][eggd:2:0][eggc:2:0][eggd:2:0][eggd:2:0][eggd:2:0][turm:0:1][eggc:2:0][eggd:2:0][eggd:2:0][eggd:2:0][eggd:2:0][eggc:2:0][eggd:2:0][eggd:2:0][eggd:2:0][turm:0:1][eggd:2:0][eggd:2:0][turm:2:1][eggc:2:0][eggd:2:0][eggd:2:0][eggd:2:0][eggd:2:0][eggd:2:0][eggd:2:0][eggc:2:0][eggd:2:0][eggd:2:0][turm:3:1][eggd:2:0][eggd:2:0][eggd:2:0][eggd:2:0][turm:3:1][eggd:2:0][turm:0:1][eggc:2:0][eggd:2:0][eggd:2:0][eggd:2:0][eggd:2:0][eggd:2:0][eggd:2:0][eggd:2:0][eggd:2:0][eggc:2:0][eggd:2:0][eggd:2:0][turm:2:1][eggd:2:0][turm:2:1][turm:2:1][eggd:2:0][turm:2:1][turm:2:1][turm:2:1][eggd:2:0][turm:2:1][turm:2:1][turm:2:1][turm:2:1][eggd:2:0][turm:2:1][turm:2:1][turm:2:1][turm:2:1][turm:2:1][eggd:2:0][turm:2:1][turm:2:1][turm:2:1][turm:2:1][turm:2:1][turm:2:1][eggd:2:0][turm:2:1][turm:2:1][turm:2:1][turm:2:1][turm:2:1][turm:2:1][turm:2:1][eggd:2:0][turm:2:1][turm:2:1][turm:2:1][turm:2:1][turm:2:1][turm:2:1][turm:2:1][turm:2:1]A[egga:2:0][eggb:2:0][turm:0:1][turm:3:1][eggb:2:0][turm:1:1][turm:3:1][eggc:2:0][eggb:2:0][eggc:2:0][eggc:2:0][eggd:2:0][eggb:2:0][eggc:2:0][eggc:2:0][eggd:2:0][eggc:2:0][eggd:2:0][eggd:2:0][eggb:2:0][eggc:2:0][eggc:2:0][eggd:2:0][eggc:2:0][eggd:2:0][eggd:2:0][turm:2:1][eggc:2:0][eggd:2:0][eggd:2:0][turm:2:1][eggd:2:0][turm:2:1][turm:2:1]BA.[turm:0:1]$.A[turm:2:1]A[turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1]E[turm:1:1][turm:2:1][turm:0:1][turm:1:1][turm:1:1][turm:3:1][turm:1:1][turm:0:1][turm:1:1][turm:1:1][turm:3:1][turm:1:1][turm:0:1][turm:1:1][turm:1:1][turm:3:1][turm:1:1][turm:0:1][turm:1:1][turm:1:1][turm:3:1][turm:1:1][turm:0:1][turm:1:1][turm:1:1]C[turm:2:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:2:1][turm:0:1][turm:0:1][turm:0:1][turm:0:1][turm:1:1]A$4.AB[turm:1:1].[turm:2:1]A[turm:1:1]$6.[turm:1:1]$
Do NOT quote this text box when replying.

The dump and re-load functionality doesn't quite work at this point, but I'm working on it.

I might consider adding a hard limit on the number of ants, at 10 or wherabouts, as well as an ants tally along with the step counter.
breaker's glider gun wrote:
August 25th, 2022, 4:33 pm
(also, I would like a thingy. you know where you say, {1:0 => put(1) fd lt}? well I want another number added to that 1:0. I want direction, and if there is only 1:0, it assumes all, but you can make 1:0:0, 1:0:1, ect to play different notes(or make different movements).)
Good idea! I'll think about it. And you're welcome to contribute too if you like -- unlike LifeViewer, LAM is open-source. https://github.com/dragoncoder047/ca-experiments
Langton's ant: Can't play the drums, can be taught.

User avatar
breaker's glider gun
Posts: 670
Joined: May 23rd, 2021, 10:26 am
Location: the inside of a stuffed anaconda or maybe [click to not expand]

Re: Langton's Ant Music

Post by breaker's glider gun » August 26th, 2022, 12:00 pm

ReferenceError: loadWorld is not defined
Is the error on my brother's Linux mint cinnamon.
Could you try to fix it? Other computers are not always available.
:?: :?: . . . :!:
Give me a suggestion of something to draw here!

User avatar
wirehead
Posts: 245
Joined: June 18th, 2022, 2:37 pm
Location: Under a thinking cap
Contact:

Re: Langton's Ant Music

Post by wirehead » August 26th, 2022, 3:34 pm

breaker's glider gun wrote:
August 26th, 2022, 12:00 pm
ReferenceError: loadWorld is not defined
Is the error on my brother's Linux mint cinnamon.
Could you try to fix it? Other computers are not always available.
Try force-reloading (press reload while holding shift). I pushed a lot of changes yesterday (renaming stuff, etc.) and so you may have gotten half of one commit and half of another. I force reloaded and checked in the devtools console - loadWorld should be defined.

BTW, I test on a Raspberry Pi. (Debian).
Langton's ant: Can't play the drums, can be taught.

User avatar
breaker's glider gun
Posts: 670
Joined: May 23rd, 2021, 10:26 am
Location: the inside of a stuffed anaconda or maybe [click to not expand]

Re: Langton's Ant Music

Post by breaker's glider gun » August 27th, 2022, 1:26 pm

wirehead wrote:
August 26th, 2022, 3:34 pm
breaker's glider gun wrote:
August 26th, 2022, 12:00 pm
ReferenceError: loadWorld is not defined
Is the error on my brother's Linux mint cinnamon.
Could you try to fix it? Other computers are not always available.
Try force-reloading (press reload while holding shift). I pushed a lot of changes yesterday (renaming stuff, etc.) and so you may have gotten half of one commit and half of another. I force reloaded and checked in the devtools console - loadWorld should be defined.

BTW, I test on a Raspberry Pi. (Debian).
nope, still does,'t work.
:?: :?: . . . :!:
Give me a suggestion of something to draw here!

User avatar
wirehead
Posts: 245
Joined: June 18th, 2022, 2:37 pm
Location: Under a thinking cap
Contact:

Re: Langton's Ant Music

Post by wirehead » August 27th, 2022, 2:02 pm

breaker's glider gun wrote:
August 27th, 2022, 1:26 pm
wirehead wrote:
August 26th, 2022, 3:34 pm
breaker's glider gun wrote:
August 26th, 2022, 12:00 pm
ReferenceError: loadWorld is not defined
Try force-reloading
nope, still does,'t work.
Sigh. With that little amount of information, I really don't know what is going wrong. Can you post what input you put in the text box that caused the error? That would certainly help.
Langton's ant: Can't play the drums, can be taught.

User avatar
breaker's glider gun
Posts: 670
Joined: May 23rd, 2021, 10:26 am
Location: the inside of a stuffed anaconda or maybe [click to not expand]

Re: Langton's Ant Music

Post by breaker's glider gun » August 27th, 2022, 5:55 pm

wirehead wrote:
August 27th, 2022, 2:02 pm
breaker's glider gun wrote:
August 27th, 2022, 1:26 pm
wirehead wrote:
August 26th, 2022, 3:34 pm

Try force-reloading
nope, still does,'t work.
Sigh. With that little amount of information, I really don't know what is going wrong. Can you post what input you put in the text box that caused the error? That would certainly help.
I didn't; I just opened the default.
:?: :?: . . . :!:
Give me a suggestion of something to draw here!

User avatar
wirehead
Posts: 245
Joined: June 18th, 2022, 2:37 pm
Location: Under a thinking cap
Contact:

Re: Langton's Ant Music

Post by wirehead » August 27th, 2022, 7:14 pm

breaker's glider gun wrote:
August 27th, 2022, 5:55 pm
wirehead wrote:
August 27th, 2022, 2:02 pm
Sigh. With that little amount of information, I really don't know what is going wrong. Can you post what input you put in the text box that caused the error? That would certainly help.
I didn't; I just opened the default.
My guess now is that your brother's web browser is way out of date. The file that loadWorld is defined in uses a few new ES6 features that weren't syntactically valid a few years ago, causing an old browser to crash on that file and move onto the next one.

Open the devtools and see if there is a syntax error coming from the file antsparser.js. If there is, either have your brother update his web browser, or don't use his computer.
Langton's ant: Can't play the drums, can be taught.

User avatar
wirehead
Posts: 245
Joined: June 18th, 2022, 2:37 pm
Location: Under a thinking cap
Contact:

Re: Langton's Ant Music

Post by wirehead » August 29th, 2022, 5:49 pm

breaker's glider gun wrote:
August 25th, 2022, 4:33 pm
(also, I would like a thingy. you know where you say, {1:0 => put(1) fd lt}? well I want another number added to that 1:0. I want direction, and if there is only 1:0, it assumes all, but you can make 1:0:0, 1:0:1, ect to play different notes(or make different movements).)
This is now implemented. Not exactly as you said but something of that sort is now possible using the new interpolation and expression functionality. See the documentation for details.
Langton's ant: Can't play the drums, can be taught.

User avatar
breaker's glider gun
Posts: 670
Joined: May 23rd, 2021, 10:26 am
Location: the inside of a stuffed anaconda or maybe [click to not expand]

Re: Langton's Ant Music

Post by breaker's glider gun » August 29th, 2022, 6:01 pm

ReferenceError: processExpressions is not defined
:?: :?: . . . :!:
Give me a suggestion of something to draw here!

User avatar
wirehead
Posts: 245
Joined: June 18th, 2022, 2:37 pm
Location: Under a thinking cap
Contact:

Re: Langton's Ant Music

Post by wirehead » August 29th, 2022, 6:09 pm

breaker's glider gun wrote:
August 29th, 2022, 6:01 pm
ReferenceError: processExpressions is not defined
Fixed, thanks.
Langton's ant: Can't play the drums, can be taught.

User avatar
breaker's glider gun
Posts: 670
Joined: May 23rd, 2021, 10:26 am
Location: the inside of a stuffed anaconda or maybe [click to not expand]

Re: Langton's Ant Music

Post by breaker's glider gun » August 29th, 2022, 6:10 pm

wirehead wrote:
August 29th, 2022, 6:09 pm
breaker's glider gun wrote:
August 29th, 2022, 6:01 pm
ReferenceError: processExpressions is not defined
Fixed, thanks.
TypeError: arg is undefined
:?: :?: . . . :!:
Give me a suggestion of something to draw here!

User avatar
wirehead
Posts: 245
Joined: June 18th, 2022, 2:37 pm
Location: Under a thinking cap
Contact:

Re: Langton's Ant Music

Post by wirehead » August 29th, 2022, 6:14 pm

breaker's glider gun wrote:
August 29th, 2022, 6:10 pm
TypeError: arg is undefined
Should be fixed now...
Langton's ant: Can't play the drums, can be taught.

User avatar
breaker's glider gun
Posts: 670
Joined: May 23rd, 2021, 10:26 am
Location: the inside of a stuffed anaconda or maybe [click to not expand]

Re: Langton's Ant Music

Post by breaker's glider gun » August 29th, 2022, 6:31 pm

wirehead wrote:
August 29th, 2022, 6:14 pm
breaker's glider gun wrote:
August 29th, 2022, 6:10 pm
TypeError: arg is undefined
Should be fixed now...
rt(): is not a number
:?: :?: . . . :!:
Give me a suggestion of something to draw here!

User avatar
wirehead
Posts: 245
Joined: June 18th, 2022, 2:37 pm
Location: Under a thinking cap
Contact:

Re: Langton's Ant Music

Post by wirehead » August 29th, 2022, 7:48 pm

breaker's glider gun wrote:
August 29th, 2022, 6:31 pm
rt(): is not a number
Fixed. There should be no bugs now. I apologize for not testing my own code.

In the future, if you have a GitHub account, small issues like this would probably better go on the repository. https://github.com/dragoncoder047/ca-ex ... gton-music
Langton's ant: Can't play the drums, can be taught.

User avatar
breaker's glider gun
Posts: 670
Joined: May 23rd, 2021, 10:26 am
Location: the inside of a stuffed anaconda or maybe [click to not expand]

Re: Langton's Ant Music

Post by breaker's glider gun » August 30th, 2022, 9:15 am

404 four the syntax guide
...........................^for
...........................^but four for a joke
:?: :?: . . . :!:
Give me a suggestion of something to draw here!

Post Reply