Showing posts with label education. Show all posts
Showing posts with label education. Show all posts

Thursday, September 1, 2011

The Evolution of Lines

Good evening, ladies and gentlemen...

Bang Goes the Theory had a segment using the repeated freehand tracing of a single line to illustrate some of the basic mechanisms of evolution. It lacked any selective pressure, so I whipped up a program to add some. I started with ten perfectly straight lines, each of which had ten offspring with a small chance of containing replication errors (1% to shift each pixel one place right or left). From that pool of one hundred, I then chose the ten that most resembled my target shape and repeated the process. To keep it simple, I didn't require the line be continuous (in fact, it's not technically a line as there's only one pixel for each vertical position on the image). I used the sum of the horizontal distance squared for each pixel from it's target x value as a measure of fitness. You may recognize the final shape, which took 2,200 generations to settle upon. Its efficiency could be increased dramatically as the algorithm employed was crude.

This is a lot less involved (asexual reproduction for a start) than many genetic algorithms I've written, but it's much less abstract.

Thursday, October 8, 2009

How to Teach the Value of Outlines

A big problem I've noticed about how outline skills are taught in various disciplines, be it writing or programming, is that they're introduced for problems that aren't complicated enough to actually warrant them. Students correctly identify that the more powerful organizational techniques aren't needed and resent the use of them, picking up bad habits that stay with them long term. The smarter a student is, the larger a problem he can handle without outline skills so the difficulty is compounded. Since it's impractical to jump straight to a very involved problem, I believe that the initial, simple problems given to students should not involve any mention of making an outline. After those small assignments have been mastered, then an extremely complex, more realistic task should be assigned, so that the greater organizational techniques are justified. Since such huge problems would likely take too long to solve completely in the space of a course, only a subsection need actually be implemented by the student, although it may be desirable to have all the parts solved by the various students so that effective collaboration can be taught. By only introducing outlines in the context of projects that reasonably require them, the bad attitude students tend to develop towards them can be eliminated.