I'm glad I can just see these replies so I can actually not have to play, and not have to sit here wondering what happens if your score goes high enough.
I suspect you know this, but either way: you should initialize your arrays in R to the proper length-- dynamically growing them within a for-loop as you do with values, func and results in optimxWrapper is extremely slow in R, as it creates a new array every loop, copying the old one.
I feel like I'm failing at R if I'm using a for loop typically.
The for loop is a dirty hack to deal with a bug I didn't want to invest time in for one-off code. I wish I had cropped this out of the screenshot...
Nice. I thought I was the only one using end-of-line semicolons in R! Don't listen to the haters/purists that tell you against them.
Note though you missed the first two statements of 'somaWrapper' and in the return statement of 'optimxWrapper'.