Exercise of logical programming
Today, in spite of being a Wednesday, I do not bring to you an informative article, but rather a problem colaborativo.
Any that one that has entered a little the world of the computer science, will know that programming is not anything simple. Often, a simple comma () it can do that a program does the opposite of what one wants (and believe to me that I speak for proper experience). So today I bring to you a small problem of programming or of logic, as it looks.
Some time ago, some teacher of that regrettably I do not remember his name, told me this problem. In short: we are going to try to programme a robot so that it cleans the teeth.
The conditions are the following ones:
- We have a completely virgin robot (without seconds), that is to say, it is necessary to teach him EVERYTHING.
- We are going to suppose that the physical aspect of the robot is the sufficiently similar thing to the human being, as for despreocuparnos if it has or do not teethe, or if it has or not fingers.
- The program that is prepared, should be linear, that is to say, in plan Orden-1, Orden-2, Orden-3…
- ANY tool that the robot is going to need, we are going to suppose that it has it within reach of the hand, that is to say, it is not necessary to be in charge to the robot to look for anything.
- The sequence of the programming, it must be completely logical.
The idea is that, between all, we do this program so that our robot could clean the teeth, across the comments. If someone believes that some point of the program can fail, also I invite you to to comment on it and explain it.
So, without much ado delay, I am going to initiate the program myself.
- To teach to the robot where the teeth and the hands are.
- To teach to the robot what a toothbrush is and what is a pipe of pasta of teeth.
Básicamente, acabo de inicializar (some) variables of the problem. From here, it is you who will be able to continue.
Fortitude and to the tororobot.