Code center > Darwinbots3
2D or 3D?
Cyberduke:
I know you have probably been around this cycle of thinking before but bear with me.
Can we not simulate the cells as a circle?
They don’t have to actually look like a circle they could be a roughly circular polygon to allow for direct joining etc.
It would put alot less stress on the physics side of things. As it's the narrow phase collision detection that really screws you.
In fact the physics simulation could look a lot like the current DB2 simulation, circles joined to each other with a tie of varying stiffness; you could then display that as a lattice of polygons all neatly sealed up. The physics underneath just needs to approximate how you wish the objects to behave.
Which do you want this to be closer too, a scientifically accurate simulation, or a game?
If you want accuracy you either need to limit yourself to about a dozen objects or buy some time slots on a super computer
Cyberduke:
When you come to draw the environment nothing stops you from embellishing it slightly.
Ok so they will still only get hit if something hits one of the bounding circles. But if they (your embellishment and reality) are close enough its ok, the bots won’t know any different. And since the player isn’t trying to shoot at them they won’t notice either.
You will have the position and size of all the cells, so from their you draw a more pleasant looking cell (Instead) over the area the real simulated one is, and if there is a join then you can just join up the exterior of the clump of cells if you like.
[attachment=1005:Drawn_Cell_Example.png]
Numsgil:
--- Quote from: Cyberduke ---http://www.youtube.com/watch?v=SvqY_pgA6DU...feature=related
http://www.youtube.com/watch?v=DFnmnMK1Yvw...feature=related
Heh Jello Physics would be cool, it's a soft body simulator, but it only looks to be capable of a few dozen active objects.
--- End quote ---
Yes, I was also playing with the idea of soft body physics at one point. But they're just way too computationally expensive. For something like this the more bots you can simulate the better.
Numsgil:
--- Quote from: Cyberduke ---I know you have probably been around this cycle of thinking before but bear with me.
Can we not simulate the cells as a circle?
They don’t have to actually look like a circle they could be a roughly circular polygon to allow for direct joining etc.
It would put alot less stress on the physics side of things. As it's the narrow phase collision detection that really screws you.
In fact the physics simulation could look a lot like the current DB2 simulation, circles joined to each other with a tie of varying stiffness; you could then display that as a lattice of polygons all neatly sealed up. The physics underneath just needs to approximate how you wish the objects to behave.
Which do you want this to be closer too, a scientifically accurate simulation, or a game?
If you want accuracy you either need to limit yourself to about a dozen objects or buy some time slots on a super computer
--- End quote ---
The problem comes from trying to design a creature like a squid and control it through DNA. If bots are circular, they are the joints, and connect to each other with bones (for lack of a better word). If they're long capsules, they're the bones and connect to each other with joints. The former was my original thinking, but it poses a few problems:
1. You have to simulate the bones anyway, and make sure that they're stiff. Meaning lots of constraints between bots to keep them just the right distance apart, which makes for complex physics anyway. You only save time on the narrow phase to pass it on to the constraint solver phase. Anyway, capsules aren't too bad at the narrow phase. You can implement a SAT (separating axis theorem) test fairly easily.
2. In order to have bots control the motion of the larger multibot, they need to be able to do things like apply a force to change the angle between two bones. Suppose you have a bot with 10 bones connecting it to other bots. It would need to specify two bones and then a force to change the angle between them (or maybe specify a delta angle and a max amount of energy to spend or something). Something like that isn't terribly likely to evolve. In contrast, if bots are the bones and connect to each other with joints, a bot only needs to specify a single joint and a force. Which is far more likely to happen.
--- Quote from: Cyberduke ---When you come to draw the environment nothing stops you from embellishing it slightly.
Ok so they will still only get hit if something hits one of the bounding circles. But if they (your embellishment and reality) are close enough its ok, the bots won’t know any different. And since the player isn’t trying to shoot at them they won’t notice either.
You will have the position and size of all the cells, so from their you draw a more pleasant looking cell (Instead) over the area the real simulated one is, and if there is a join then you can just join up the exterior of the clump of cells if you like.
[attachment=1005:Drawn_Cell_Example.png]
--- End quote ---
Sure, there's lots of fun things you can do graphically.
Cyberduke:
--- Quote from: Numsgil ---The problem comes from trying to design a creature like a squid and control it through DNA. If bots are circular, they are the joints, and connect to each other with bones (for lack of a better word). If they're long capsules, they're the bones and connect to each other with joints. The former was my original thinking, but it poses a few problems:
1. You have to simulate the bones anyway, and make sure that they're stiff. Meaning lots of constraints between bots to keep them just the right distance apart, which makes for complex physics anyway. You only save time on the narrow phase to pass it on to the constraint solver phase. Anyway, capsules aren't too bad at the narrow phase. You can implement a SAT (separating axis theorem) test fairly easily.
2. In order to have bots control the motion of the larger multibot, they need to be able to do things like apply a force to change the angle between two bones. Suppose you have a bot with 10 bones connecting it to other bots. It would need to specify two bones and then a force to change the angle between them (or maybe specify a delta angle and a max amount of energy to spend or something). Something like that isn't terribly likely to evolve. In contrast, if bots are the bones and connect to each other with joints, a bot only needs to specify a single joint and a force. Which is far more likely to happen.
--- End quote ---
In regard to point 1) without testing and profiling I am not currently sure which would turn out to be the biggest cumbrance.
I just wanted to make sure we really are at the simplest we reasonably can be in regards to the physical simulation, because as you know it’s very easy to get carried away with all the neat things you can do, whilst forgetting the need to strike a balance with performance at scale. And so much will be underpinned by the basic cell structure and the way the joints work.
But it sounds like you have already put a lot of thought into this.
You make a very good point though in regards to removing the additional ‘bone’/tie as not only would something interesting be more likely to happen from an artificial evolution standpoint but capsules with direct joints would also scale better performance wise if the majority of organisms where multi cellular. Capsules would of course scale worse if most where single celled.
As a side note, I think some thought might want to go into crafting a ‘nursery’ environment with constant but bearable selection pressures to get evolution to produce something that utilizes some of these neat opportunities, since so much is being designed with that goal in mind.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version