Bots and Simulations > Evolution and Internet Sharing Sims

Simplest Evo Starter Bot

<< < (18/30) > >>

EricL:
FYI, I have found and fixed the period parse bug.  The fix will be in 2.42.3.

The code attempts to detokinize any BP of type 'number' (type 0) preceeding a store command (type 7) into a sysvar string, either a built in sysvar or a private variable string.  If it can't, it just displays the number.  But in the case where the value of the number is 0, things go a little off track.  This DNA code will exhibit the error:

cond
start
0 store
stop
end

In such cases, the conversion to a built in sysvar string fails as expected.  The code then attempts to match the number to the values of the bot's private var strings by walking through the bots's array of private varables comparing the number to the corrosponding 'value' of each entry in the var array.  In the case where the number is 0 and the bot has no private varables, it matches ALL 50 but none have strings of course.  This leads to the output stirng containing "." but no sysvar string.  I simply added a check for the number 0 as a special case in the private varable comparison portion of SysvarDetok().

Note that the DNA detokinization routines here are horribly ineffcient, walking through all 50 private vars and all 300+ sysvars for every sysvar detokinization attempt...  This doesn't really matter much I suppose since I believe these routines only get called when the user is viewing DNA, but it's still ugly...

Numsgil:
It could possibly be sped up by a binary search since both arrays are probably sorted (or can be sorted rather easily).

EricL:

--- Quote from: Numsgil ---It could possibly be sped up by a binary search since both arrays are probably sorted (or can be sorted rather easily).
--- End quote ---

Yup.  If it was a core routine insde the sim execute loop, I'd be on it.  As it is, I don't think it really matters perf wise.

Numsgil:
Not really, but if you're anal retentive enough feel free to whack at it

PurpleYouko:

--- Quote from: Elite ---Aaaaaaaargh, evolved DNA is so incalculably complex  

Wait until you get one that replicates, then natural selection will kick in  
--- End quote ---
OK guys. This isn't really finished yet but it might help to work out th ekinks in really complex evolved DNAs.

Just save your bot's DNA from the sim then run up the updated snapshot utility, go to the "StepThru" tag and click the big button at the top left to open the control panel. From there you can import your DNA and step through it while viewing the stack visually at each stage.

There are a bunch of the newer commands missing since this only has the early (basic) stuff. The code is VBA (macro) so it should be pretty easy to modify if anyone has the time.

Ahh CRAP!!!!!

I can't attach XLS files.  

I will try zipping it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version