@Henke
trying to learn from your code.
1)
TimeoutConstant=20 (line 41)
Is that 20 millisec? It seems the game waits longer than that when Mario is against a wall or just stopped. More like3 sec.
Obviously I am missing something.
2)
What is going on in this loop (line 532 in your code)
for s = 1,#pool.species do
local species = pool.species[s]
for g = 1,#species.genomes do
table.insert(global, species.genomes[g])
end
I do not understand the syntax of using the number sign in a for loop. Why not use getn function? This discussion about the '#' suggests there is more depth to the choice of using this syntax:
https://stackoverflow.com/questions/2705793/how-to-get-number-of-entries-in-a-lua-table
Do you have any words of wisdom?
3)
I am wondering what you did to the mutate genome function.
see pastebin for relevant code
http://pastebin.com/raw.php?i=WtZa1Jc3
You both start by randomly picking a hi or lo mutation rate.
The original looks in the array genome.mutationRates and randomly either enables or disables a property. His syntax is curious- he uses a while loop that is designed to only execute once. Why bother with a while loop and a local p variable?
Your syntax is even more confusing. What does this do:
if math.random() <genome> 0
and then why are there a bunch of sequential if statements?
and finally you set p to a negative number though it isnt used?