Author Topic: Hello! (and newbie questions)  (Read 6829 times)

Offline Lovely Acron

  • Bot Neophyte
  • *
  • Posts: 6
    • View Profile
Hello! (and newbie questions)
« on: April 18, 2008, 06:18:14 PM »
Hello. I love this sim. I've always found a certain allure towards programming, though I never was able to get good at it. Its still fund to play around with the DNA, even though the results usually are nothing like what I wanted. I have two questions though and I'm horrible at using wikis.

1. How does the physics of this work? I tried to create a simple veggie that would turn at 90 degrees until it found a side that was open, reproduce, tie, repeat. It would kind of work, until a reproduction accidentally hit an existing cell, in which case everything would cause a chain reaction, moving all the cells around. How do I prevent slight nudges from transforming my plants into vicious tornadoes?

2. Since movement is executed first, is there a simple way to work around that and force the wanted order? I can find ways to do it, but they are just duct tape solutions.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Hello! (and newbie questions)
« Reply #1 on: April 18, 2008, 08:55:32 PM »
Hi there and welcome!

1) You might try fixing your bots.  Just have them do:

1 .fixpos store

And they shouldn't get moved when bots knock into them.

2) I'm not sure I understand what you want to do here.  What order of what do you want to force and why?
« Last Edit: April 18, 2008, 08:56:30 PM by EricL »
Many beers....

Offline Lovely Acron

  • Bot Neophyte
  • *
  • Posts: 6
    • View Profile
Hello! (and newbie questions)
« Reply #2 on: April 18, 2008, 09:43:46 PM »
Quote from: EricL
Hi there and welcome!

1) You might try fixing your bots.  Just have them do:

1 .fixpos store

And they shouldn't get moved when bots knock into them.

2) I'm not sure I understand what you want to do here.  What order of what do you want to force and why?

1. Well, that is not exactly what I want. I'd like to be able to move, but I want to stop slight nudges from turning the entire organism into chaos.

2. Well, many things. Like tie to the bot in front of it before it turns, or shoot an enemy before it moves, and so on.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hello! (and newbie questions)
« Reply #3 on: April 18, 2008, 09:43:52 PM »
You can also try to use fixed bot radii.  I think the option is in the general tab in the options window.  It will help reduce issues with different sized bots.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Hello! (and newbie questions)
« Reply #4 on: April 18, 2008, 10:55:03 PM »
Quote from: Lovely Acron
1. Well, that is not exactly what I want. I'd like to be able to move, but I want to stop slight nudges from turning the entire organism into chaos.

2. Well, many things. Like tie to the bot in front of it before it turns, or shoot an enemy before it moves, and so on.
You could fix them until your structure is established and the ties harden, then unfix them...

I still don't understand #2.  Are you talking about the order of operations performed by the simulator during a cycle or the order you bot code perfroms operations or something else?  

Many beers....

Offline Lovely Acron

  • Bot Neophyte
  • *
  • Posts: 6
    • View Profile
Hello! (and newbie questions)
« Reply #5 on: April 19, 2008, 08:23:32 AM »
Quote from: EricL
You could fix them until your structure is established and the ties harden, then unfix them...

I still don't understand #2.  Are you talking about the order of operations performed by the simulator during a cycle or the order you bot code perfroms operations or something else?

Is that what is going on? I didn't realize before the 20 cycle hardening statement in the wiki, but maybe thats it (though I don't see how even that would cause this). I'll test in a second.

And about the order the simulation uses. But apparently, I meant rotation, not movement in general. According to the wiki , its higher on the "Activation Hierarchy" I'll give an example of my current bot (Even though it was solved in this case). One of it conditions is that if there is a family member directly in front of it, and another condition is that if there is something in front of it, rotate 90 degrees. The bot will never tie, since the rotation command will be activated first.


I hate to throw yet another question out there, but can bots be "crushed"? I'm trying to figure out the feasibility of creating a mousetrap-esque jaw.

Quote from: EricL
You could fix them until your structure is established and the ties harden, then unfix them...

I still don't understand #2.  Are you talking about the order of operations performed by the simulator during a cycle or the order you bot code perfroms operations or something else?

Is that what is going on? I didn't realize before the 20 cycle hardening statement in the wiki, but maybe thats it (though I don't see how even that would cause this). I'll test in a second.

And about the order the simulation uses. But apparently, I meant rotation, not movement in general. According to the wiki , its higher on the "Activation Hierarchy" I'll give an example of my current bot (Even though it was solved in this case). One of it conditions is that if there is a family member directly in front of it, and another condition is that if there is something in front of it, rotate 90 degrees. The bot will never tie, since the rotation command will be activated first.


I hate to throw yet another question out there, but can bots be "crushed"? I'm trying to figure out the feasibility of creating a mousetrap-esque jaw.


And thanks Numsgil, I can use that until I get around to adding body regulation

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Hello! (and newbie questions)
« Reply #6 on: April 19, 2008, 08:59:31 AM »
Bots can't currently be killed by crushing, sounds like a cool idea though. Feel free to ask questions, it's nice to get fresh ideas.

Offline Lovely Acron

  • Bot Neophyte
  • *
  • Posts: 6
    • View Profile
Hello! (and newbie questions)
« Reply #7 on: April 19, 2008, 03:39:21 PM »
Quote from: Endy
Bots can't currently be killed by crushing, sounds like a cool idea though. Feel free to ask questions, it's nice to get fresh ideas.
Now that I think about it, a multi-cellular organism crushing a single cell really isn't practical. Not only would the single cell have an advantage at slipping into some crack somewhere, but the multi-cell would have to be extremely streamlined for the trap to not loose more energy that it gains. However, if a multi-bot was developed sophisticated enough in cell specialization that it couldn't survive separated, the mechanisms probably could have enough force to wreck ties and arrangement, which would cause it to eventually die. However, I can't even make a simple plant that is stable, so I really need to lower my expectations for now.  

Offline Lovely Acron

  • Bot Neophyte
  • *
  • Posts: 6
    • View Profile
Hello! (and newbie questions)
« Reply #8 on: April 20, 2008, 07:10:52 PM »
Hold on, I think I understand. On another post Erict talks about adding the ability for negative .fixang to allow free rotation. That made me realize that currently they dont freely rotate. So maybe thats the problem, that when the bot goes to turn it drags all its ties around too? That would explain the circular, tornado looking effect.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Hello! (and newbie questions)
« Reply #9 on: April 20, 2008, 07:20:20 PM »
Quote from: Lovely Acron
Hold on, I think I understand. On another post Erict talks about adding the ability for negative .fixang to allow free rotation. That made me realize that currently they dont freely rotate. So maybe thats the problem, that when the bot goes to turn it drags all its ties around too? That would explain the circular, tornado looking effect.
That's it.  That circulating mass is a side effect of the tie physics attempting to resolve the torque from multipel hardened ties.  It can become a real rotating mess...
Many beers....

Offline Lovely Acron

  • Bot Neophyte
  • *
  • Posts: 6
    • View Profile
Hello! (and newbie questions)
« Reply #10 on: April 20, 2008, 10:30:44 PM »
Okay. If I'm judging the atmosphere here right, multibots won't really be easy until version 3, right?

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Hello! (and newbie questions)
« Reply #11 on: April 20, 2008, 11:03:55 PM »
Quote from: Lovely Acron
Okay. If I'm judging the atmosphere here right, multibots won't really be easy until version 3, right?
I wouldn't say that.  I have a rather nice multibot going at present....

I''ll tell you the trick.  Forget about trying to assemble a multibot in a series of timed steps using exact relative distances or angles or positions.  Doing that is really hard and ends up being super fragile.  The slightest change in phsycis or environment or another bot bumping you at the wrong tine and it all goes to hell.  Helios is about the only multiibot I know that was able to do that successfully adn he's been broken a long time now.

The trick is to program independent, self asssembling units that can hook together over time, if and when they encounter each other and then negoiate their relative functions dynamically.  Go for something basic first, like a simple snake or a worm.  There's a reason nature uses segmentation so liberally.  It works and it's relatively easy to code.
Many beers....

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Hello! (and newbie questions)
« Reply #12 on: April 21, 2008, 02:00:22 AM »
It's actually better to use setaim for MB turning. Bots turning via setaim don't effect the rest of the MB structure, so bots can hunt/search as individuals, but still reap the bennefits of being a multibot.

314 rnd *.aim .setaim store

I still think the standard turning commands could be useful in MBs as a sort of evasion technique, suddenly spinning the whole MB at once to confuse/counterattack enemies.

Offline Peksa

  • Bot Destroyer
  • ***
  • Posts: 118
    • View Profile
Hello! (and newbie questions)
« Reply #13 on: April 21, 2008, 06:08:52 AM »
Quote from: Endy
314 rnd *.aim .setaim store

I think that would be
314 rnd *.aim add .setaim store

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Hello! (and newbie questions)
« Reply #14 on: April 21, 2008, 01:19:50 PM »
Quote from: Lovely Acron
Okay. If I'm judging the atmosphere here right, multibots won't really be easy until version 3, right?

Easier, anyway, since the physics engine will be more robust.  But Eric looks like he's managed to get a rather impressive MB worm going, so maybe a nice MB is possible.