General > Off Topic
making my own DB fan-version
Numsgil:
--- Quote from: endercrypt on December 29, 2015, 05:02:22 PM ---does your code, when given a strong of dna code, split each gene into its own object? im thinking of doing this
--- End quote ---
In both versions, the final result of the DNA parsing is an ordered list of base pairs. It doesn't try to break things apart in to genes except when it reparses it back for users to look at.
--- Quote ---also, what did you mean by the fact that the START operator AND's the boolean stack ? could you further try explain? thank you :)
--- End quote ---
suppose you have this gene:
--- Code: ---cond
1 2 >
3 4 < and
start
5 .up store
stop
--- End code ---
The gene wouldn't fire, since 1 is not greater than 2. The two conditions were ANDed together, so the gene is basically if 1 > 2 and 3 < 4 then store 5 in up.
For legacy reasons, if not explicitly stated, an implicit AND is assumed. The above will function identically to this:
--- Code: ---cond
1 2 >
3 4 <
start
5 .up store
stop
--- End code ---
In order to get this behavior, when a start is encountered, if there's more than one value on the boolean stack they're all combined together with an AND.
--- Quote ---why does .setaim accept a value between 0 to 1256
--- End quote ---
A complete circle is 2 pi radians. Multiply that by 400 and you get 1256, which is sort of close to 1000 (which is a nice round number) and can be evenly divided in to 8 slices. So a full circle is 1256 units, and the number was chosen kind of arbitrarily. There are better numbers to choose (1080 is also close to 1000, maps to degrees, and has better prime factors (2, 2, 2, 3, 3, 3, 5) ), but for legacy reasons we're stuck with it.
You might double check my answer about sine/cosine. I'd expect them to use the same same scale, so I might have gotten it wrong.
--- Quote ---and also, is .setaim prioritized over things like .aimdx and .aimsx?
--- End quote ---
I think so but I'm not sure actually. Try it and see :)
EnderCrypt:
--- Quote from: Numsgil ---In order to get this behavior, when a start is encountered, if there's more than one value on the boolean stack they're all combined together with an AND.
--- End quote ---
ah, so basically.. the gene executes aslong as there are no false in the boolean stack (correct me if im wrong)
--- Quote from: Numsgil ---A complete circle is 2 pi radians. Multiply that by 400 and you get 1256, which is sort of close to 1000 (which is a nice round number) and can be evenly divided in to 8 slices. So a full circle is 1256 units, and the number was chosen kind of arbitrarily. There are better numbers to choose (1080 is also close to 1000, maps to degrees, and has better prime factors (2, 2, 2, 3, 3, 3, 5) ), but for legacy reasons we're stuck with it.
--- End quote ---
wow, you been thinking about this alot! :D
hmm, im gonna try go for the 1080, also, could you explain the prime factor thing? i dont really understand the point of it, except that multiplying them gets you 1080, also, what stops us from multiplying pi with (1000/pi) which would make a circle be 0 to 1000?
also, speaking of what i said:
--- Quote from: endercrypt ---and also, is .setaim prioritized over things
--- End quote ---
does the sysvar list on darwinbots have some sort of .. priority of execution? because at the moment i got a randomly ordered list of all sysvars, and during each cycle all the sysvars get re-init (dont know what to call it, but i think you get what i mean, for example .robage, always get set to the robots age, before gene execution ) and after that it executes some code, for all sysvars, again randomly because the randomly ordered list
also, just realised a thing while writting the quote.. did i mess up by not making my e (first letter) in endercrypt, capital, i see you got your first letter as capital... but i dont.. great
--- Quote from: Numsgil ---Try it and see :)
--- End quote ---
that is so tempting! but yeah, sadly.. im stuck on mac, and i dont think that will change.. for a long time.. so yeah, the only option i got to re-live darwinbots is playing at some other computer or.. make my own version, and making my own version is kinda fun + with your/administrators permissions, i'd love to open source my code at github (as approaches completion), problably wont get even close to as awesome as the real version of darwinbots which, for me has always stood as.. the holy grail for me, in a programming perspective :D i mean, darwinbots is the program that made me intrested in evolution and artificial intelligence ^^
edit:
http://wiki.darwinbots.com/w/Anglecmp
it says "Calculates the shortest angle between the two angles given. Angles in DarwinBots are expressed in radians multiplied by 200."
so... didnt we previously say that radians in DB was multiplied by 400?
also could you give an example of how to use this operator, as i never used it myself
Numsgil:
--- Quote from: endercrypt on December 30, 2015, 08:36:06 PM ---
--- Quote from: Numsgil ---In order to get this behavior, when a start is encountered, if there's more than one value on the boolean stack they're all combined together with an AND.
--- End quote ---
ah, so basically.. the gene executes aslong as there are no false in the boolean stack (correct me if im wrong)
--- End quote ---
Yeah, basically.
--- Quote ---hmm, im gonna try go for the 1080, also, could you explain the prime factor thing? i dont really understand the point of it, except that multiplying them gets you 1080, also, what stops us from multiplying pi with (1000/pi) which would make a circle be 0 to 1000?
--- End quote ---
The more prime factors you have, the more ways you can evenly divide the number in to equal parts. For instance, say a full circle is 1000 units. Say you want to turn 120 degrees (basically a third of a circle). You'd have 333.33333333 units, which you'll have to truncate to 333, since it's all integers. It'll be very difficult to have exactly three equal rotations then. That may or may not be a problem, of course, depending on your goals. I'd say you either want lots and lots of prime factors, or none and have it be a prime number. The prime number would necessarily add some "fuzz" to integer angular calculations, which could be desirable.
--- Quote ---does the sysvar list on darwinbots have some sort of .. priority of execution?
--- End quote ---
Not really. There's the order things are run in, but I'm not sure that has any particle rhyme or reason to it.
--- Quote ---also, just realised a thing while writting the quote.. did i mess up by not making my e (first letter) in endercrypt, capital, i see you got your first letter as capital... but i dont.. great
--- End quote ---
I can fix it if you care.
--- Quote ---im stuck on mac
--- End quote ---
Try running it under Wine. I've had success doing that under linux.
There's also virtual machine installs if you want to play around with that. Depends how tech savvy you feel.
EnderCrypt:
i'll definetly be going for 1080 yeah ^^
--- Quote ---
--- Quote ---also, just realised a thing while writting the quote.. did i mess up by not making my e (first letter) in endercrypt, capital, i see you got your first letter as capital... but i dont.. great
--- End quote ---
I can fix it if you care.
--- End quote ---
ah, well.. its not really important, but if its not too much of a hassle, i definetly wouldnt mind being named properly as: "EnderCrypt"
--- Quote ---
--- Quote ---im stuck on mac
--- End quote ---
Try running it under Wine. I've had success doing that under linux.
There's also virtual machine installs if you want to play around with that. Depends how tech savvy you feel.
--- End quote ---
i think i already got wine under mac here, lets see..
ah, here we go: the moment i press "start new" simulation i get:
and then it crashes, and i get this message:
(after closing it, darwinbots re-appers, but no buttons work, and i had to just close it)
now, according to the wine forum, your not suppose to give admin to files under wine because of security risks or something, im not sure, but yeah, im not so good with macs, but i definetly think i'd be able to get a virtual machine up with some googling.. hmm.. dont have a windows cd though...
Numsgil:
It looks like a program crash. That is, something independent of the fact that it's running under Wine. Admin here I think means Darwinbots admin, ie: the guy currently fixing things. You can look at the files it wants to send, there's nothing in there really interesting from a security perspective. It's just a save of the Darwinbots sim and some of the settings.
If you create a new thread in the bugs and fixes forum with the attached settings that's a good way to have someone maybe look at it.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version