An every-day-Algorithm
First thing that comes
to mind in terms of an algorithm I do every day is a recipe. A recipe is a sequence of steps that
correctly followed will lead to successfully accomplish the task of
transforming groceries in a dish. So,
prepare yourself to enjoy “Arroz de Carreteiro”, a recipe typical from
Brazilian State of Rio Grande do Sul! The name of this dish means “Wagoner’s Rice”. These “wagoners” were people who ride ox
carts in long trips thru the fields; they used to cook his meals in just one
pot, for convenience, and created this recipe.
Ingredients – 4 people: Oil (cotton, canola, sunflower); 1 kg prime beef; rice – 2 cups; 2 big onions; 2 tomatoes; red chili pepper -1; garlic – 3 cloves. Salt – to taste.
Algorithm:
Chop the onion, the tomatoes, the pepper and the garlic.
Dice the beef in 1cm cubes.
Put oil in a pot – enough to cover the bottom.
Heat the oil. Try it with a bit of onion from time to time; when it wheezes, it’s hot enough.
Add the onion, the pepper and the garlic. Stir with a spoon all the time, until the onion gets transparent.
Add the beef. Continue to stir to avoid burning or sticking to the bottom of the pot. Do it until the beef is fried.
Add the tomatoes. Stir until the tomatoes starts to cook and release its juice.
Add the rice. Stir until the rice absorbs the juice that got out the beef and the tomatoes.
Add 2 cups of water. Add the salt. Cover the pot.
When the water starts to dry, lower the heat.
Before the water dries completely… IT’S READY! The rice shall be cooked, but not soft. Turn off the stove and enjoy!
Could a computer system
be built to follow this algorithm easily?
I don’t think so! Certainly not
easily and maybe not at all!
Even a person not
familiar with cooking could produce some disgusting stuff instead of an
appetizing dish! There are a lot of
concepts that the algorithm’s author is assuming are shared with the person
following the instructions. For example,
what exactly is “prime beef”, how to chop vegetables… And “salt to taste” is
really vague – just like “the rice shall be cooked but not soft”.
But I think it would
be possible - not easy at all - to build a robotized system to cook Arroz de Carreteiro.
If you assemble an extremely controlled environment, and use extremely standardized ingredients, this system would not need necessarily use any kind of sensors to be aware of the results, all it would need to do would be blindly following a sequence of steps. But, in that case, a different kind of rice, or a different tuning of the stove, for example, could lead to unpredictable results.
To build a system
really aware of what is happening, like if the rice has the right consistence
or not… Well, then we would need a very highly sophisticated system, with
sensors, controls, and probably several layers of functional abstraction!
I would say that ask
our auntie to help us follow the recipe would be cheaper and simpler!
But if I share this “algorithm”
with somebody familiar with cooking, probably a good dish will be cooked
without problems!
Another habitual
action to what I even actually wrote (despite partially) an algorithm is my morning
routine.
05:30
|
Get out of
bed. Walk like a zombie adrift and without purpose.
|
Turn
on the computer. Walk like a zombie adrift and without purpose.
|
|
Check
weather web site. Walk like a zombie adrift and without purpose.
|
|
Put
some music to play.
|
|
05:45
|
Exercising
– and here I have a set of scripts for each day of week. For
example, on Mondays: Squats, Abs, “Reverse Abs”, Rowing (I
use the bunk bed J ), One-Leg-Squats, Push Ups.[1]
|
Between
one exercise and the next, pick the clothes I´ll be using (according to the
weather) and put it over the bed.
|
|
07:00
|
Shower,
shave, dress up.
|
07:15
|
To
Derby for breakfast
|
Since that early in
the morning I´m sleepy and sometimes really tired due to staying up late, busy
with the astonishing amount of homework our pitiless teachers ( J ) give us, it really
helps to have a “script” to follow!
And this is not the first
version of this algorithm. I tried
several “versions”. Some included more
steps, like “check newspapers from Brazil” – dropped, not the best time of
day. And the part regarding using the
intervals between exercises to pick the clothes for the day is a result of brilliant
optimization! J Probably, more improvements will be done in
the future.
No comments:
Post a Comment