1) phase_separation.png - a1, b1 and f1 atoms repel c0, d0 and e0.
2) bilayers.png - a2b1 pairs self-organize into two-sided layers,
repelled by atoms in state 0.
3) pseudo-cells.png - one-sided layer of a2b1 pairs surround d1 atoms
Reactions still apply in this experimental build, on collision as
normal. Of course collision is less likely between atoms that are
repelling each other.
The challenges don't make much sense in this experimental build.
The lipid-like behaviour is nice to see, since it is a key part of
biological chemistry.
http://en.wikipedia.org/wiki/Lipid_bilayer
Let me know if you can think of some interesting challenges we could
make with this idea. Ideally the DNA-like replicators would be able to
encourage the formation of a lipid membrane around themselves, in
order to control the chemical composition inside, for the purposes of
outcompeting other cells. This could form an alternative to challenge
19, instead of building the membrane from strong 'covalent' bonds.
Speed is a problem. Lipids only make sense with lots of atoms and java
seems quite slow compared to a C++ implementation I've tried. On my
machine this build runs at only 10 frames per second, with 1360 atoms.
Please tell me your thoughts.
Thanks,
Tim
--
Tim Hutton - http://www.sq3.org.uk
Take the Organic Builder challenge -
http://www.sq3.org.uk/Evolution/Squirm3/OrganicBuilder/
Also sending this to the list, which I had meant to do in the first place.
2009/7/30 Tim Hutton <tim.h...@gmail.com>:
> Ah yes, good point.
>
> I replaced Atom::bonds and Collider::buckets with ArrayList, and it
> ran over twice as fast - thankyou Jaroslav.
>
> I also replaced the multiple creations of Point2D in
> Collider::doTimeStep and this added ~10% speed too. Now averaging at
> ~26 fps on my machine (attached).
>
> I've tried profiling it myself but I'm not very knowledgeable about
> this area. Any more performance-improving tips will be very welcome!
> We should probably multi-thread the physics properly, right?
>
> Tim
>
> 2009/7/30 Jaroslav Bachorik <j.bac...@gmail.com>:
>> Hi Tim,
>> I have a small suggestion for performance improvement - I profiled
>> your application and found out that the most CPU intensive task is
>> creating huge amounts of list iterators on LinkedList in Collider
>> class (tens of millions of instances created and immediately thrown
>> away). You could try to replace LinkedList with ArrayList and iterate
>> over that list using the get(index) syntax rather than using iterator.
>>
>> I hope this will help a bit
>>
>> Jaroslav Bachorik
>> NB Profiler (http://profiler.netbeans.org)
>> VisualVM (http://visualvm.dev.java.net)
>> BTrace(http://kenai.com/projects/btrace)