Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Quad, AndrewAMD), 1,007 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
DNACreature Sim #252474
02/18/09 12:57
02/18/09 12:57
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline OP
Expert
Damocles_  Offline OP
Expert

Joined: Feb 2009
Posts: 2,154
Hi,

Here a Lite-C Demo of a DNA Creature Simulation,
that you can watch a population of "stick" animals evolve,
trying to move on the ground.




DNACreature.zip


DNA Creature


How to use it:

-start
-let the sim run for some time, as it needs time to evolve (there is not end to the sim)
-use SPACE to switch between slow and fast simulation
-use the mouse and the W,A,S,D keys to move the camera

This program simulates a virtual creature over several generations
using genetic programming, mutation, crossover etc.

The results are not as potent as I thought in the beginning,
using a "genetic programming" code.
There is actually an interpreter build in, that can run
a program, to controll the creature.
Though the creatues only use the very basic commands after some time.

A better approach will be later to switch to neural nets.


Some Facts:

-100 creatures per population
-genetic mutation
-sorting out the fittest creature for the next population
-genetic crossover for a part of the population
-physics engine
-creatures also have sensort for leg-contact with the ground, and legmovement


Feel free to experiement in the code by changing some variables

Re: DNACreature Sim [Re: Damocles_] #252490
02/18/09 15:05
02/18/09 15:05
Joined: Jul 2004
Posts: 1,710
MMike Offline
Serious User
MMike  Offline
Serious User

Joined: Jul 2004
Posts: 1,710
very very interesting, and i saw something like this somewhere.

Re: DNACreature Sim [Re: MMike] #252530
02/18/09 19:46
02/18/09 19:46
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
hmmm damocles, do you happen to be the damocles that made xspire ai, and wasteland, and left like a year ago? or are you a new one laugh


if you are the same, welcome back, if not welcome smile

Re: DNACreature Sim [Re: lostclimate] #252534
02/18/09 20:09
02/18/09 20:09
Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
GorNaKosh Offline
Junior Member
GorNaKosh  Offline
Junior Member

Joined: Feb 2009
Posts: 84
Deutschland/Niedersachsen
very nice to see how the creature "grows" ^^ ... I the much of these evolution apps on youtube. Very interesting! Is there a documentation or a simple Tutorial how to implement and use genetic code?

Last edited by GorNaKosh; 02/18/09 20:11.
Re: DNACreature Sim [Re: GorNaKosh] #252536
02/18/09 20:14
02/18/09 20:14
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline
Expert
Puppeteer  Offline
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
yes -> ai thread -> ai-junkie.com


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: DNACreature Sim [Re: Puppeteer] #252539
02/18/09 20:24
02/18/09 20:24
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
Cool demo, but quite slow evolution wink
how long did the programming take you?

Which ability determains the fitness? the ability to move into a certain direction? to move in any direction?
How far they move?

EDIT: Why have you started a new account? what happend to your old one?

Last edited by SchokoKeks; 02/18/09 20:26.
Re: DNACreature Sim [Re: SchokoKeks] #252543
02/18/09 20:42
02/18/09 20:42
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Interesting demo. But how long does it take to have an "advanced" evolution in this demo? I run it for about 10 minutes and the creature did only some steps forward.

Re: DNACreature Sim [Re: SchokoKeks] #252545
02/18/09 20:48
02/18/09 20:48
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline OP
Expert
Damocles_  Offline OP
Expert

Joined: Feb 2009
Posts: 2,154
Hi,

The programming did not take so long, maybe 4 to 5 days.
I made the core program some time ago.
The most time took to learn what the physics engine needs,
and the test and tuning of variables.

The fittnessfunction gives fittness for the distance moved from spawning point, and also for moving the legs (make the creature
look more active, its more optical)


The evolution is so slow, as every creature is spawned and tested for a few seconds in the physics world.
Also: 100 creatures are tested every populations (it might be too many).


The sim has actually some problems, as the genetic program that
I create is a bit too fancy, and the evolution
keeps stuck in a local minima.
Try to let it run for one hour.
(dont keep it int to the slow mode (SPACE), as this then takes longer to evolve)

I will work later on a different approach, by using
evolved neural nets.
--

For my old Account I dont remember the password..

Re: DNACreature Sim [Re: Damocles_] #252557
02/18/09 21:50
02/18/09 21:50
Joined: Jul 2004
Posts: 1,710
MMike Offline
Serious User
MMike  Offline
Serious User

Joined: Jul 2004
Posts: 1,710
my creature jumps and stuff all the time after 20 minutes, lol, i think its a spider... with some frog capabilities. lol

Anyway i think you could add 2 entities.. and then the 2 entities creatures cross over and share their code and then more legs are added, etc etc..

Re: DNACreature Sim [Re: MMike] #252564
02/18/09 22:56
02/18/09 22:56
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
really interesting. the evolution of movement reminded me somehow of this demo


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1