Bots and Simulations > DNA Tools
How DNA works
Gobo:
I'm going to write evolved DNA deobfuscator, and it is essential to understand perfectly how DNA works. Please check, if my explanation is precise.
http://www.darwinbots.com/WikiManual/index...her_Explanation
Numsgil:
For 2.43 it looks correct. However, with recent changes to the way DNA is handled, it changes things slightly. Conditions can now be executed inside the body of genes.
Gobo:
Hmmm... When has this change been applied? Because trunk has:
--- Code: --- Case 5 'conditions
If CurrentFlow = COND Then
ExecuteConditions .DNA(a).value
End If
Case 6 'logic commands (and, or, etc.)
If CurrentFlow = COND Then
ExecuteLogic .DNA(a).value
End If
--- End code ---
Or is it 2.43 on the trunk? Where can I see the latest source then?
Numsgil:
Eric hasn't released the latest source since 2.43. There's some sensitive information in it, too, so I'm not sure how or when we're going to release it generally. But I'm sure Eric'll be kind enough to copy+paste the relevant code here.
Also, Eric hasn't been using the SVN, so I'm not sure what version I have in there
EricL:
--- Code: ---
Case 5 'conditions
'EricL 11/2007 New execution paradym. Conditions can now be executeed anywhere in the gene
If CurrentFlow = COND Or CurrentFlow = body Or CurrentFlow = ELSEBODY Then
ExecuteConditions .DNA(a).value
End If
Case 6 'logic commands (and, or, etc.)
'EricL 11/2007 New execution paradym. Conditions can now be executeed anywhere in the gene
If CurrentFlow = COND Or CurrentFlow = body Or CurrentFlow = ELSEBODY Then
ExecuteLogic .DNA(a).value
End If
Case 7 'store, inc and dec
If CurrentFlow = body Or CurrentFlow = ELSEBODY Then
If CondStateIsTrue Then ' Check the Bool stack. If empty or True on top, do the stores. Don't if False.
ExecuteStores .DNA(a).value
If n = robfocus Or Not (rob(n).console Is Nothing) Then rob(n).ga(currgene) = True 'EricL This gene fired this cycle! Populate ga()
End If
End If
--- End code ---
I'll post the sorce less the password information for 2.43t later today.
Navigation
[0] Message Index
[#] Next page
Go to full version