76
Off Topic / How to use my new features.
« on: May 31, 2005, 06:58:47 AM »Quote
shape works like def. That is, it's a command to the parser instead of the DNA execution.
There are three types of code in the dna files:
1) robot's parameters: these are parameters which can be added to a dna and are automatically saved by the dna save function. Parameters are useful because they carry additional robot's features which cannot be expressed by the dna.
2) parser commands: these commands affect the dna parser. There's only one parser command (def) and it only defines an alias for numbers. Alias label are simply converted to number when dna is tokenized.
3) the executable dna. This is what the parser executes, that is, genes.
Now, the shape type has definitely NOTHING to do with how the dna is parsed or executed. It is instead an additional feature of the robot. So it has to be expressed with the code for that type of feature. There are dedicated routines to parse that kind of code in the dna, as well as routines to add it to the dna when it is saved again from the simulation. So, please, use them, or the program will soon become a total mess.
Quote
You were talking about shape effecting how many ties you can have (1 tie per side, right?). Are you still thinking along those lines?
I hope you're not. In my opinion, there should be a one way arrow going from the simulation to the visual representation, like this:
what happens inside the simulation ----------> what you can see on the screen
(this kind of model is so elegant and so used that modern object oriented programming languages have special constructs to implement it).
I understand that, if you decide that a square robot can have only four ties, then the fact of the robot being square it's just a visualization of the fact it can only have four ties. But let's face it: if you were really interested in this, you'd have added the 1-2-3-4 ties selector in the robot options window, and only after you'd have imagined a way to represent this visually. But here we have the opposite: first you decide that having a triangle robot is funny, and after you say "oh, well, but this should mean something after all". This makes me very very doubtful about the real need of this new feature.