General > Off Topic
How to use my new features.
Carlo:
--- Quote ---shape works like def. That is, it's a command to the parser instead of the DNA execution.
--- End quote ---
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?
--- End quote ---
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.
Carlo:
--- 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?
--- End quote ---
Ah, and I forgot to add this: that if you really want to bind shape to number of allowed ties, then the parameter in the dna code (and in the option window) should be named something like "maxtienum", not "shape", as shape would be just a consequence of the max tie number.
PurpleYouko:
The maximum tie number thing was just something that Num and I spoke about a while ago.
I never really had any intention of limiting the number of ties with respect to the shape of the robot.
I must admit that I have been considering ways in which the shape of an individual robot could be used to help define the shape of a multi-bot but I don't really have any concrete ideas about that just yet.
As fot the shp command, it operates exactly like def in that it sits outside of the main DNA and never passes to the genome array at all. The robot's shape is defined at the point at which the DNA text file is tokenized.
I specifically didn't want any kind of control for the shape from within the genes and controlling it from the options panel would take away control from the bot designer. Tagging it onto the front of the text file is the perfect solution and has zero effect on the way that DNA is parsed.
There are many other things that can be set this way in the future. Things such as enzyme bit strings and energy management types.
It is possible to define the shape as any number from 2 to 10 from within the DNA file but if you don't bother to put anything in then it will be randomized to 3, 4 or 5. I found that more than 10 slows the sim down way too much.
The shapes also mutate just like color does although changes are very infrequent.
The shape function is really just there for a bit of eye candy rather than being a functional part of the program. That is why it can be switched on and off. Basically the shapes are very much like the skins except that control is given to the DNA programmer directly.
Also putting some some thought into more interesting shapes but haven't really reached any usable idea yet.
Carlo:
--- Quote ---The shapes also mutate just like color does although changes are very infrequent.
The shape function is really just there for a bit of eye candy rather than being a functional part of the program. That is why it can be switched on and off. Basically the shapes are very much like the skins except that control is given to the DNA programmer directly.
--- End quote ---
That's ok for me. But I insist that you have to put the shape type among the other parameters (one of them defines, for instance, the robot's color) and not as a parser command. You can take advantage of routines to load and save those parameters, so most of the work should be already done. You can put there also (if you want) a parameter for defining the skin. Finally, you may want to add a shape control on the robot options windows, so to set the shape also from the program's interface.
Numsgil:
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).
So I would have the shp command for making bots, and then use the hash for saving the shape.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version