Thursday, September 30, 2010

Mortimer Sobers Up

Last week's challenge (delayed blog entry, sorry) was to 'sober' up Mortimer--so when he followed a black line, he didn't shake back and forth so much. In the entry two weeks ago, you see how drunken he seemed.
To do this, we rewrote the line-following program. This was the original program, which made Mortimer turn one way until he hit the line and then turn the other way until he hit the line:



First, Yu Mei and I tried this (supposedly well-written and graceful) program, appropriately named:



After that failed many a time (despite being good on paper), P. Berg helped us write this simpler program that worked relatively well:



This challenge taught us some very important things about engineering and science:
1) The simplest way is always best,
2) Even the best-written programs may not work when put in the real world,
and
3) Be flexible in your problem-solving.

Until the next post, stay cool,
Lucia

No comments:

Post a Comment