SFML community forums

General => SFML projects => Topic started by: lolz123 on December 31, 2013, 06:59:20 am

Title: Alife - Artificial Life Simulation
Post by: lolz123 on December 31, 2013, 06:59:20 am
Hello,

I made an artificial life simulation just for fun and I thought I should share it. It is still nowhere near done (I only worked on it for 3 days so far  :P), and still quite buggy, but it is already possible to witness some interesting patterns!  :)

So far I have seen simple gathering, competing for food, predators, baby-eating (nerfed), timed grazing intervals (a swarm of creatures moving on a clock), upgrading agility to eat before the rest of the swarm arrives, and lots of dying.

I aim to make one of the most complex artificial life simulations ever (big ambitions I know, I can dream :)) ).

Here is how it works so far:

Each creature gets a fixed number of points. These points can be allotted to 15 different attributes:


The way these points are allotted is evolved over time. Creatures can reproduce either with binary fission or with sex. A creature can lay down pheromones to help remember where things are (stigmergy). Creatures can evolve which pheromone type they lay down as well.

Each creature is controlled by 2 neural networks: A dopamine distributing network that defines the reward that the second actor network receives. The former is evolved, and the later both learns in its lifetime through hedonistic synapse modification and evolution (knowledge is not lost). As inputs, the neural network receives the creature's velocity, the grid around it, the nearest N creatures with information about them (direction, health, size, similarity), and the nearest food source. The creatures then decide how to move, attack, mate, and eat.

For the AI, I used my NNBrain library: http://en.sfml-dev.org/forums/index.php?topic=13449.0 (http://en.sfml-dev.org/forums/index.php?topic=13449.0)

Creatures can evolve to become either carnivores or herbivores. There are no omnivores at the moment.

Right now, there are major balancing issues in the stats. I also want to add construction (block placement), omnivores, and more complex fighting, among other things.

Here is the download link: https://sourceforge.net/projects/alifennplasticity/?source=navbar (https://sourceforge.net/projects/alifennplasticity/?source=navbar)

Be warned though, it is incredibly processing intensive! I get only like 20 fps on my rig. The reason is that there are simply too many creatures (and I need to add a spatial tree).

There are typically around 1000 creatures at once if I had to guess.

It's not exactly visually stunning, but here is an image of it (each colored square is a creature):

(http://i1218.photobucket.com/albums/dd401/222464/alife2.png)
Title: Re: Alife - Artificial Life Simulation
Post by: Barlog on January 01, 2014, 07:14:05 pm
Looks very promising. Keep going!
Title: Re: Alife - Artificial Life Simulation
Post by: BaneTrapper on January 02, 2014, 09:38:59 pm
I tried running to see it for my self, the executable is non compatible with win7 32bit.
Any help? (trying to start as vista, and server 2008 i had from drop menu didn't help)
Title: Re: Alife - Artificial Life Simulation
Post by: lolz123 on January 02, 2014, 10:06:04 pm
@BaneTrapper: It is indeed a 64 bit application, and is made in VS2013 (so it needs the redistributable for that). I can recompile it in 32 bit though. I'll let you know when it becomes available.

Depending on how interested you are, you can also compile it from source. Then you can mod it as well  ;)

On a different note, here is an image of the latest version. The textures do NOT belong to me. They will be linked when I release the next version.
I added lava pits as well as mouse controls (drag and zoom in on mouse position).

Will upload it to SourceForge soon.

(http://i1218.photobucket.com/albums/dd401/222464/alife3.png)


Title: Re: Alife - Artificial Life Simulation
Post by: BaneTrapper on January 04, 2014, 12:42:04 am
Id compile for 32, but i need to make the whole project i don't have day to spare :P.
I am really interested to see what did you make in action.
Title: Re: Alife - Artificial Life Simulation
Post by: sknnywhiteman on January 06, 2014, 04:41:08 am
for future reference, make sure you either post where we can find dependencies, or include them in the download file. It's a real turn-off when you find out you need to go out of your way to play something.
Title: Re: Alife - Artificial Life Simulation
Post by: BaneTrapper on January 06, 2014, 04:30:01 pm
Will upload it to SourceForge soon.
Did i miss the link or is it still not posted?