Langtons Ant Project

  • NDR149
    30th Sep 2016 Member 0 Permalink

    I want to create an element based on Langton's Ant. I'm looking for somebody good with Lua, but if this can only be done in C++ then okay. The only real problem I can imagine with this is the turning. The Ant would turn right or left every frame -- meaning it would have to keep track of the direction it is currently going -- and I'm not sure how to write that.

  • LBPHacker
    1st Oct 2016 Developer 1 Permalink

    You can keep track of the direction by storing it away in tmp/tmp2/ctype/whatever property. It's totally doable in Lua.

     

    Actually, have this. I wrote a demo. It looks like this.

    Edited 2 times by LBPHacker. Last: 1st Oct 2016
  • NDR149
    3rd Oct 2016 Member 0 Permalink

    @LBPHacker (View Post)

     Oh my land! This is great! Green-plus-thing for you!

    Hmm, wait. The ants ignore every other particle in the game.If you could teach me what the heck some of the source code does, I'd like to edit it so that it stores its turns and direction in tmp and tmp2, so that it can use CTYPE for storing the last eaten element, that way it can leave behind trails of what it's been eating...

    Edited once by NDR149. Last: 3rd Oct 2016
  • LBPHacker
    5th Oct 2016 Developer 0 Permalink

    Kudos to the forum engine for not bumping this to the top of the active topics when you posted. Could you join #powder sometime?

  • NDR149
    5th Oct 2016 Member 0 Permalink

    @LBPHacker (View Post)

     What's that?

  • LBPHacker
    5th Oct 2016 Developer 0 Permalink

    It's the #powder channel on freenode. That's an IRC network (basically IM and a bit more). If you have no idea what I'm going on about, just head to https://webchat.freenode.net, join as NDR149 (leave the Channels field blank, I don't think you can join #powder until you register), and once you're in, type /query LBPHacker. Also say at least "hi" or else I won't notice.

    Edited 3 times by LBPHacker. Last: 5th Oct 2016
  • 209CATrus
    6th Oct 2016 Member 0 Permalink
    This post has been removed by Sylvi: Spam posting
  • NDR149
    10th Oct 2016 Member 0 Permalink

    @LBPHacker (View Post)

     I'm not allowed to connect to freenode