General > Off Topic

How to use my new features.

<< < (3/3)

PurpleYouko:

--- Quote ---put the shape type among the other parameters (one of them defines, for instance, the robot's color
--- End quote ---

So how can this be done from the DNA text file in any way other than the way I have done it?

The feature must be able to be written into the DNA text file or it will be utterly pointless.

Carlo:

--- Quote ---The problem with the commands you're talking about is that they're in Hash form, which is unreadable to humans. (I think I got that right, it's been a while).
--- End quote ---

No, you haven't.   :P
The parameters are written in a readable and editable form; but there's an hash of them plus dna at the end of the dna that's used by the program to understand if the dna or parameters have been generated by the program itself or have been manipulated by someone. The reason is that parameters carry information about the robot's generation and mutations number; but if there were no hash function, someone could write a f1 bot and then write in it "generation 10000, mutations 5000". Or take an evolved bot, modify it for being more efficient, and then reload it in the simulation. You understand that's not really fair.
Actually, the program lets you load dnas without hash or with wrong hash, but if the hash is wrong it simply ignores the "important" parameters, that is, robot's "real" name, generation and mutation number.
For example, if you saved a dna of an evolved robot called "myrobot.txt", and the filename is "myrobot-10MillionCycles.txt", your dna file will look like that

'#name: myrobot.txt
'#generation: 12334
'#mutations: 4354
'#color: &Hffaa33

and at the end, you'll have

'#hash: (strange hash code here)

Now, if you reload the dna in the sim, it will be reloaded as myrobot.txt, not as "myrobot-10MillionCycles.txt"; moreover, its generation and mutation number values  and color will be restored to that saved in the dna file. But if you modify in any part the file, the program will notice it, and only the color (which is not "important") will be restored.

I made this system because when you use internet sharing you never know what is coming from the net; and also because it's no good to lose information about generation, mutations and original name each time you save a dna

Navigation

[0] Message Index

[*] Previous page

Go to full version