Saturday, August 3, 2013

Human Balance

Standing on two feet is no great feat to most people you might meet; but, to an engineer, at least to this engineer, it is awfully cool.

Engineering and football? They go together like
peanut butter and tunafish.

The first aspect of balancing involves our senses. We have to know that we are falling and how before we can correct it. That is where our ears come into play. Our inner ears contain fluid that moves and they can be used like accelerometers. Having two ears allows us to know whether we are translating or rotating. Next, we have our eyes, which are very adept at gauging the angle of the ground. Having two eyes also proves useful when distance to the ground becomes important, for example when falling. Our joints provide information about their current angles. Finally, we have our sense of feeling at the bottoms of our feet that tell us the distribution of forces applied by the floor. All of these redundancies are employed to compensate for closed eyes, turning heads, running legs, slanted or bumpy grounds, and so on. 

Now that we know the exact position, velocity, and acceleration of our body, as well as the different derivatives of orientation, we must tighten and loosen the appropriate muscles to keep from toppling over like a rootless tree. One way is to use our calf muscles to change the center of force in our feet. Unfortunately, this only provides up to a "foot" of movement. We could shift our weight from one leg to another to shift the center of our base. We could contort our body in such a way that it changes our center of mass. We could rotate our arms to provide a counter-acting angular momentum. Finally, we could lift our legs and plant our feet in different locations to dramatically change our base position. If we are already moving we can simply change the direction of our motion to right ourselves like a rolling wheel.

When it comes to human balance, there are so many senses to be tracked and options to be selected from in such a short time and with such precision that it would overwhelm even the most powerful computers. It is no wonder that football players are so difficult to knock over; actually, it is a marvelous wonder.

Thursday, June 20, 2013

Traffic Light Coordination, Genetics, and Machine Learning

Assuming that everyone always drives at the speed limit, we should be able to time the traffic lights down a stretch of road so that nobody ever hits more than one red light. Just make the lights change at a difference in time equal to the distance between the lights divided by the speed limit.

I don't know why this road has so many lights,
but at least they're all green.

Well, its not really that simple. What about the cars going in the opposite direction? What about the cars driving on the perpendicular roads? Is there a way that we could time the lights so that nobody ever has to hit them more than once? Maybe. Not for most roads, though. Can we optimize the timing? Maybe. Some roads have more traffic than others, which must be taken into account.  It turns out to be a very difficult optimization problem with many local minimums. A genetic algorithm may work well, nonetheless.

What if we don't assume that everyone is traveling at the speed limit all the time? People do take some time to accelerate before and after hitting lights. Also, different people drive at different speeds at different times of day and in different weather. Some roads have more cars at different times and on different days. In addition, it is almost impossible to predict how people will change their driving in response to changes in the light timing. These things make the problem essentially impossible to solve on a computer alone.

Try calculating that!

Maybe we need to use some machine learning. Have a camera installed on each light that can count the number of cars waiting. Then, change the timing of the lights every so often and see what works the best. Done. Well, not really. There is a concept in machine learning called "Exploration vs Exploitation" and it plays a crucial roll here.

Like I said, this is a problem with many local minimums. Finding an optimum solution by merely watching the effects of the timing on the traffic could take years. We would be wasting valuable time with bad systems just to find the absolute minimum.

We could combine the genetic algorithm with the learning technique. Start by calculating some optimum solutions with the genetic algorithm that assumes speed limit driving. Apply the best solution and then watch the flow of traffic. Learn where the calculations have gone wrong and why. Update the genetic algorithm. Continue to use the best solution from the algorithm, but continue to improve it via machine learning.

This is much easier said than done, but many smart people are currently working on this problem. Maybe one of them will figure it out. Until then, take the highway.

Thursday, April 25, 2013

Reinforced Wood

Wood is a great building material. It's fairly cheap. It's fairly light. It's fairly strong. What else could you ask for?

Well, wood is a little weak in tension and very weak in shear. Being that it is very commonly used in bending, a great application of its large cross section, this can be a problem. The solution: reinforced wood.

Essentially, wrap a steel mesh around the trunk of a young tree. As the tree grows larger, it will push through the mesh. Eventually, you will have an ordinary looking tree with steel mesh running through it. Chop it down and cut it up. Now, you have steel reinforced wood that is great in tension and shear and just about anything!

(I have to give credit to my father for this one, as it was his idea.)

Thursday, April 18, 2013

On God

I hate to infuriate the 75% or so of people who believe in some kind of god, but I am going to do it anyways.

God can do the impossible. He is beyond reason, correct? Well, I'm not. I'm an engineer. I better have good reasons for everything I do. If I design a plane and it fails, I won't get much sympathy for claiming that God informed my decisions while making it.

I'm sure their families will feel the same way...

So, that's my philosophy about religion. If I can't use it as an engineer, why should I use it to engineer my life?

Friday, April 5, 2013

More on Gravity Transport: A City on a Clam-Hill

When it comes to riding a bicycle, the old saying should be: "what goes down, must ride all the way back up."

Couldn't have said it better.

What if there was a place where you could always ride down hill? "Impossible", you say? Hck-Ptooey! I spit on impossible. 

Imagine a hill that is shaped like a clam shell. Essentially, there is a cliff on one end and a shallow slope on the other that raps back around to the base of the cliff.

Just in case you don't remember what a clam looks like...

Now, just put a few elevators along the cliff.

I have attempted, with surprising success, to draw a contour plot
 of the clam-hill. The red circles are elevators.
The flow of traffic would always move downhill from the top of the cliff to the base.

A flow chart... The red cylinders are elevators.
The rectangular prisms are buildings.
Don't judge me. 

Now, that is a place where I would want to ride a bike! Obviously, it would only work for a small city, but it is still a really neat idea.

Thursday, April 4, 2013

The Kind of School I Would Like To See (Cont'd.)

As the geniuses amongst you may have figured out already, I am an engineering student. This means that I do lots and lots of work. Did I mention that I do a lot of work?

What grinds my gears is that all the work I do is used for a total of zero useful things. Nadda. Zippo. Straight into the smiling trash cans.

"Me happy, because me love engineering student homework..."
(Yes, that is how trash cans speak!)

In my fictional school, actual companies collaborate with professors to assign useful work to the students. Nonetheless, professors only give assignments that are relevant to the class and are useful in teaching the material. Otherwise, people might not want to take their class, which, in this school, actually has consequences.

Students who do good work are recognized by these companies. Some even get paid to do it. Many use this recognition to get a job after graduating.

It seems I have solved the "GPA/Degree" problem with room to spare!

By "room to spare," I mean that I have also solved the high tuition prices problem. Teachers wont need to be paid much by students if they are being sponsored by companies. "Corruption," you dare say? Every student has a completely voluntary choice on the classes to take and the teachers to choose in my school! Why shouldn't they choose the class that is cheaper and might get them job offers?

To be fair, there is one - I repeat: one - class at UF that does this to a very minor extent. It's called Integrated Product and Process Design and I will be taking it next year. So, expect another post on this in a little over a year...

Tuesday, March 19, 2013

The Kind of School I Would Like to See

A big problem with schools is that the free market gets flipped on its head. Students rarely get to choose their teachers. When they do, the choice is made primarily on the easiness of getting an A. Even if a student does choose a teacher for being good at teaching, the teacher is not rewarded. Ultimately, there is little competition among teachers whose salaries are based primarily upon seniority.

In a system that does not reward good teaching, there won't be many good teachers. I would like to see a school where each teacher chooses the price for their course and is paid for each student that elects to take it. They pay the school a fee for the use of its resources, but keep the rest as profit. 

One problem with this system is that students will still choose their classes based on easiness. The only way to give students the right incentive is to eliminate the GPA and "degree." Instead, each course should be treated separately. Each teacher chooses their own grading method: percent, letter grade, pass fail, position in class, or even no grade at all. There are no mandatory courses. Maybe, a standardized test is given by each department as a requirement for graduation, but nothing else. 

A problem is then: what do the graduates show potential employers? That is the hard part. In the current system, there is a nice, simple number that they can show off. In my imaginary school, the employers will have to look at a complicated list of courses with a variety of different grading methods. Maybe, resources will develop that help potential employers to assess graduates. Maybe, not. I don't know the answer.

In the end, what I want is not really a school, but a market of learning. I want to to transform the school into a grocery store where the staff members are employees, the teachers are food brands, the courses are food items, and the students are hungry customers.

A flea market is a good analogy too.

Right now, its more like a factory where the teachers are minimum wage employees and the students are well packaged, identical products.

And what is with those graduation hats?! Not the ones in this picture, which are weird too.
Just, graduation hats in general are very strange. And the gowns?...

Counting to 1023 With Your Fingers

Everyone is taught from an early age to count with their fingers. The trouble is that it only works for numbers of 10 or less. Or, does it!...

In fact, anyone with ten fingers can easily use them to count to 1023 ($2^{10} - 1$).

Make two fists. That is zero. Lift only your right thumb: 1 ($2^0$), only right index: 2 ($2^1$), right thumb and right index: 3 ($2^0 + 2^1$), only right middle: 4 ($2^2$), and so on.

This way, any whole number less than 1023 can be represented. Suppose you wanted 783. That would look like:

What? I'm an engineer, not an artist.
 ($783 = 512 + 256 + 8 + 4 + 2 + 1 = 2^9 + 2^8 + 2^3 + 2^2 + 2^1 + 2^0$)

This is probably not the most intuitive way for most people, but that might just be a result of their upbringing. If this was the way you learned to count, I bet it would seem perfectly natural. Either way, it is certainly more useful.

Saturday, March 16, 2013

Giant Roller-Coasters: The Future of Transportation

I was recently on a flight to Colorado for a skiing trip. And although I am always impressed by the defiance of gravity that is human flight, on this occasion I was imagining the possibilities presented by skiing, namely the harnessing of gravity.

The big problem with planes is that they are too slow, inefficient, and unpredictable. The culprit is of course friction. However, there is a way to do with out it. The idea of a vactrain has been around since 1910. Essentially, it is a train that levitates on magnets and runs in a vacuum tube. There would theoretically be no friction and the train could go at extremely high speeds with incredible energy efficiency.

Nice looking train. Too bad shape is completely irrelevant
when there isn't any air resistance...

The question is: how should the train be accelerated and decelerated? If the magnets are used to decelerate the trains, which could be done, a large percentage of the energy would be lost, even with attempts to re-store it. There is a better way to do it though: gravity.

Why not start and end the train high up? Then it will accelerate down one hill to reach a high speed and decelerate up another to stop. That way no energy is ever lost. Basically, I believe that giant roller-coasters are the future of transportation!

(Amazingly, I am not the first to think of this. Who would have thought that using giant roller-coasters in vacuum tubes as a transportation system would be an unoriginal idea? Still, I couldn't resist talking about it a little. Unfortunately though, roller-coasters actually can't go that fast. Even with a drop in altitude of a mile, the train would only reach a speed of about 500 mph. Maybe, a little energy loss isn't that bad after all.)

Monday, February 25, 2013

How to Lie: An Analysis of Deception Algorithms

I never lie, though I have no way to convince you of that. Either way, I am an engineer and I have been thinking about the mechanics of lying. Specifically, I am interested in the logical thought processes required to avoid being caught.

Someone who lies often must constantly keep track of all their lies. Otherwise, they end up saying the wrong thing at the wrong time. The question is this: what is the best way for them to search through the list of lies and ensure that their next sentence won't be disastrous?

The most basic method would be to search through the lies, one at a time in some random order, until a problematic one is found or until they all check out. That is pretty slow, though.

A faster way is to group the lies by topic. Then, only the lies in topics relevant to the conversation must be checked. If this was a computer, then it would probably be more efficient to group the lies within each group and group those as well and so on. However, people have limitations on their ability to control subconscious thought processes; I would guess that only one or two levels of grouping is efficient for people. While this is a great improvement on the basic method, it still requires that every group topic be compared with that of the intended sentence to decide whether it needs to be searched.

The Tree of Lie

Instead of grouping by topic, they could group by person. Only a few lies are relevant to each person. Therefore, it makes sense to only check the lies that are relevant to the person being spoken to. One benefit this has over grouping by topics is that no subjective, time consuming comparisons need to be made for every group to determine whether it is relevant, as for topics. A problem with this method comes when more than one person is listening. It may take significantly longer to check every one of their packages.

So, combine the two, using person grouping when talking to one or two people and topic grouping when talking to many. Also, for some people, it may be helpful to group all their lies by topic as well.

Occasionally, even with a good deception algorithm, there won't be enough time to finish searching through everything. Therefore, the lies should be sorted from most to least important within each group and the groups sorted likewise. Then, they can always be checked in that order and, if there isn't enough time to finish, at least the important lies have been checked.

All of this is very interesting, but do liars actually employ these methods? I have no clue. These are just the absurd musings of an engineer's mind.

Wednesday, February 20, 2013

Reverse Cloud Computing

When I first heard about cloud computing, I assumed it meant the exact opposite of what it actually implies.

No. I didn't make that myself. Its from Wikipedia.

Basically, cloud computing is just the use of computing resources over a network. However, it has come to describe the services provided by large companies to individual devices over the internet.

What would be the reverse? Individual devices providing computing resources to companies. Think for a second about all the computers doing absolutely nothing at this moment. What if all that computing power being harnessed, somehow?

One way to do it might be to pay people for the use of their unoccupied computers. Then, whenever someone is not using their computer, it can be connected to a server over the internet and used by someone else. This seems like a win win situation to me.

Imagine that an animation company is attempting to render some 3D footage by a deadline. If they don't have enough computing power to finish it on time, they could just pay some provider for the extra resources. Then, the provider connects with a bunch of the computers it has registered in order to perform the additional rendering. The people get paid for doing absolutely nothing, the provider takes a piece, and the company finishes on time. A win win win!

I don't know whether this has already been implemented or if there are reasons why it would not be so useful. Nonetheless, it is certainly a neat idea.

Wednesday, February 13, 2013

The Real Flat-Earthers

We all know that the earth is round, but, only a few centuries ago, it was almost universally accepted that the earth is flat...

Flat Earth
What if pink elephants could fly?

What?! Are there not mountains and valleys all around us? They didn't notice those? They didn't dig wells hundreds of feet deep?

No, people have always known that the earth is not a flat plane.

It can still be "flat-ish" though, you say. True. It can be a cube or a pyramid or a cylinder or a dodecahedron and we are just living on one side. Let me ask you though: do you really believe that anyone thought the earth is shaped like a cube?

They didn't see the circular sun every day? The spherical moon was nonexistent? Nobody ever noticed that lunar eclipses are always circular? When the masts of ships rose above the horizon, just as they do now, nobody gave them a second glance? Are you kidding me?

The truth is that prior to Columbus it was not common knowledge that the earth is flat. In fact, Eratosthenes calculated the radius of the earth with an error of less than 2% in 240 B.C. The flat earth idea became popular in the 19th century and is perpetuated by elementary school teachers to this day.

The point here is not that we are wrong about something, yet again. It is that people accept this myth, a symbol, if there is any, for gullibility, without a second thought. "Of course," they say, "we are extremely enlightened. Those barbarians could never comprehend something so large. It would make their puny little brains explode. Ha ha ha. Stupid ignorant people..."

Ok, maybe that's an exaggeration, but my point stands. With just a little thought, some serious reasons for doubting the myth about the myth can be found. I think it is very clear that we are the real flat-earthers here.

Saturday, February 9, 2013

First Post, Smiling Trash Cans

Hi everybody!

I was walking around the UF campus the other day when I noticed a smiling trash can.

Smiling Trash Can
"Yipee! Look at meeeee! I'm smiling.
Now, feed me."

And, there is certainly nothing wrong with that. I mean, the trash can has needed a makeover since its inception and this looks quite nice, a perfect match of form an function.

Wait a second, do I see two holes for "Bottles & Cans?" As if I am throwing away so many bottles that I can't just do it in one measly hole? Who the hell has so many cans? Oh, they needed it for the smiley face. I see. You'd think they would at least use one eye for the cans and the other for the bottles. Oh well.

These trash cans are new on campus. So, my first thought upon seeing that beautiful face was to imagine the conversation that occurred just before the decision was made to replace the old ones.

"Jim, we have just got to replace those cans. They're plain ugly. Period."
"Are you aware that we are already millions of dollars over budget?"
"Exactly! So, what difference will it make if we spend a couple hundred grand on these cans? They smile goddamn it!"
"We barely have enough to afford our necessary faculty. We can't waste money on silly things like this."
"Oh, come on. It looks like somebody needs to turn that frown around... Come on... You can do it... Even the trash cans are doing it..."
"OK. Fine! We'll get the smiling cans."

I think the worst part is that they made the mouth so small. How can I score a three pointer with a paper ball in a hoop like that? And, suppose I miss and it rolls into the eyes. Am I expected to reach my arm in there and get it out. Although, it doesn't say "Bottles & Cans Only." So, I guess paper is allowed? Let's get this straight: someone actually thought that without the word "Only" after "Landfill Trash," people would be unable to comprehend that bottles and cans are not supposed to go in there! It makes me want to by a soda just to put the bottle in the wrong spot. Muahahahaha.

In case you haven't already noticed, that trash bag, hanging across the middle, is no ordinary bag. It was made specifically for this can. That's right. There is now a factory making trash bags for use only in smiling garbage cans. And, how is the bag supposed to be replaced? Clearly, a new method of bag removal is necessary. Past are the days when garbage containers could simply be emptied into large containers for transport to yet larger containers. Now, we recognize the great care that must be taken to avoid mixing the precious gems on the one side with the toxic sludge on the other. Either that, or Jim's brother own's a smiling garbage bag factory...

So, the new can is not really that useful. Who cares? It still smiles. Isn't that enough?