Pages

Saturday, September 19, 2015

CIS Blog 3 - Algorithms


I am choosing to describe my nightly routine of getting ready for bed as an algorithm. I think it may not be that hard to program the steps, but programming a robot that could actually do it would be much harder.

Moving in a three-dimensional space would probably be the toughest thing to program. The robot would have to be able to detect obstacles and maneuver around them, because my bedroom isn’t the neatest and there are random objects on the floor. They would also have to have dexterity programmed and built into them that would allow them to handle objects. This would require sensors equivalent to eyes to detect objects, but also touch sensors, so that an appropriate amount of force can be applied to varying objects depending upon their fragility.

Assuming the robot has the basics of movement and senses programmed into it, the robot’s algorithm for my nightly routine could begin with a signal. In myself that would be the levels of chemicals in my brain indicating that I have been awake long enough and sleep would be welcome. There could be an equivalent indicator for the robot, such as a low battery.

Once that indicator has set the process in motion, the robot would begin a sequence of operations like this:
  • Go to bathroom
  • Turn on light
  • Open cabinet
  • Remove contact lens case
  • Empty contact lens solution into sink
  • Insert contacts (I have OrthoK lenses that I wear at night)
-  If the lenses are not comfortable do the following or else continue with main routine:
- Remove lenses
- Rinse lenses in saline solution
- Reinsert lenses
- Repeat until comfortable, then resume main routine
     - Pick up toothbrush
     - Open cabinet
     - Remove toothpaste
     - Unscrew toothpaste lid
     - Put a specified amount of toothpaste onto the toothbrush bristles
     - Screw lid back on toothpaste
     - Place toothpaste in cabinet
     - Close cabinet
     - Brush teeth
- This would have to be a sub-routine that would involve moving the toothbrush in circular         motions, left and right, up and down, while simultaneously moving around the mouth, with these steps repeating for a time like the recommended 2 minutes
     - Rinse mouth with water
     - Rinse toothpaste with water
     - Return toothpaste to toothpaste holder
     - Etc.

I think the seemingly simple task of brushing my teeth is a good demonstration of how there are many steps even for something humans think of as simple. The other things I would do to get ready would have similarly long instructions. Peeing would require a sensor to indicate urgency, then that urgency would have to be evaluated for desire to pee before going to bed. There would be steps for preparing to pee, aiming, steps afterward including flushing the toilet and washing my hands. After washing my hands I would dry my hands. There would be an algorithm for how the robot moves his hands within the towel to dry them and an analysis of the specific level of dryness it is acceptable to stop drying his hands.

There are many more aspects to my routine, each with equivalently long break-downs of how they are done. Doors and light switches are maneuvered, food and drink is prepared and eaten. Smoking devices are prepared and smoken. All of this while taking into account comfort in terms of temperature, body position, bedding position, and the inconvenient positioning of a dog who isn’t good at sharing space. It would certainly be possible to teach a robot this routine and every other routine in my life, but it would require very lengthy and complicated algorithms for even simple routines.

My nighttime routine probably is not the most efficient, because I don’t do the same thing every night or maintain the same order every night, so a lot of thought processes go into decided what to do and when to do it, even though it ends up being roughly the same each night.
    

No comments:

Post a Comment