Hello!
       I'm just a beginner in java and also a newbie,in fact this is my first post. I already programmed some stuffs such as games, calculators and other stuff. I also have a good grasp on the language and some of it's libraries . I am planning to take my experience to the test by making my first BIG project.

       Well, because I love science, I decided to make a program that could simulate evolution. So far, here are my ideas:
        OOOOThe world is random generated,it is 2d and tile-based, with randomly placed obstacles. There will also be a start and a finish tile.
        OOOOThe Movers(the actors) will start from the start tile and try to reach the finish tile.
        OOOOEach mover have a specific order of instruction on how to move which is it's "genes".
             e.g. Up, down, stay, down, up....
        OOOOFrom time to time, the program will pick the 2 most "fit" movers and copy their genes. After some      manipulation in that "gene", a baby mover will be born with that gene.This is the reproduction part.
        OOOOAfter the manipulation of the gene, there is a chance that a part of it will "mutate"
             e.g. if it is Up, change it to something else

       And my problems are:

       * Defining the word "fit".What factors makes a mover fit?
       * How to manipulate the genes or what to manipulate.
       * Maybe... How to implement it??? Some tips?
       * Could someone explain this please?
           "The code snippet in your post is formatted incorrectly. Please use the Code button in the editor toolbar when posting whitespace-sensitive text or curly braces. "

       Each Mover will be updated every 500 millisecons. And just to clarify, the movers have no idea WHERE they are heading. They will just follow their instincts or its "genes" even if they will hit an obstacle. In the end, the program will determine the mover that was ables to reach the finish tile. 

       That's probably all and I hope my experience here will be good. You may also suggest ideas. I will really appreciate it. :)

I'm so sorry people, I'm a newbie. I don't know how to format this and that. And I know, it looks awful :(

you want us to explain your idea to you, or do I miss something there?

Sounds like a really interesting project! Some ideas:
You could use an ArrayList to hold a sequence of U/D/L/R/S(traight on)/B(ack) etc Characters as the genetic code - easy to process and easy to make a new one by mixing from 2 "parents" and making some random additions or substitutions ("mutations").
Maybe you could measure "fitness" by how far they move? Maybe make them die without reproducing if they get stuck in a dead end?

"The code snippet in your post is formatted incorrectly. Please use the Code button in the editor toolbar when posting whitespace-sensitive text or curly braces. "
The daniweb editor assumes indentation means code, not plain text, so your indetation from line 4 onwards has confused it.

commented: Ooohhh... So that's what it means. Thank you :D +0

Hello stultuske, what I meant is that if you people COULD give me some tips on how to implement it, more like a pseudo-code or something less "cody". Or just some tips...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.