About Archive Tag Cloud Translations RSS

You are writing a comment about Genetic Algorithms: Cool Name & Damn Simple, here is a quick summary:

Genetic Algorithms are one of the most natural approaches to optimization. Did you learn about evolution in grade school? Then you already "get" GA.


You are responding to this comment written by Will Larson on January 3rd 2009, 08:17.

That's odd Chris, I can't find the typo. Pasting the function from the Complete Code segment into a 2.5 interpreter just works, and retyping the interpreter segment works as well. It's more than possible I made an update that hadn't propagated by the time you saw it (my cache is about an hour stale... been on the todo list for a while now).

I actually didn't realize sum was a Python built-in. I guess that I don't spend that much time adding numbers. ;) In some way I like the explicitness of reduce and add, but you're right that using sum would have been a better approach.


Please be aware that comment forms go stale after one hour.





Comments may make use of LifeFlow MarkDown. Raw html will be escaped.


Quick Introduction to LifeFlow MarkDown Syntax

A highlighted code block:

@@ ruby
def a (b, c):
  b * c
end
@@

Other common languages work as well: scheme, python, java, html, etc.

Other markdown syntax:

 ### This is an h3 title
#### This is an h4 title
**this is bold**
*this is italics*

1. This is an
2. ordered list

* And an unordered
* list too

[this is a link](http://www.lethain.com/ "Lethain")