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. :)
Jump to Post
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").
All 4 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.