Difference between revisions of "CSC103: DT's Notes 1"
Line 957: | Line 957: | ||
===Time to Play A Game=== | ===Time to Play A Game=== | ||
|} | |} | ||
− | Let's assume that we want to play a simple game | + | Let's assume that we want to play a very simple game based on ''coding''. The game is quite easy to get: we want two people to have a conversation where each word or sentence that they can say is limited to a small set of preselected sentence, and each one is associated with a number. When the two people talk to each other, they must pick the number corresponding to the sentence, question, or answer they want to say. |
[[Image:CSC103 Conversation 2.jpg|200px|right]] | [[Image:CSC103 Conversation 2.jpg|200px|right]] | ||
Line 986: | Line 986: | ||
— 01 05 <br /> | — 01 05 <br /> | ||
− | If you didn't figure it out, the first person was saying "Hello" and "How are you?" to which the second person responded "Good". The first person then continued with "Did you enjoy" and "homework", to with the second person responded "Yes" and "A lot"! (Definitely somebody overzealous with the class! | + | If you didn't figure it out, the first person was saying "Hello" and "How are you?" to which the second person responded "Good". The first person then continued with "Did you enjoy" and "homework", to with the second person responded "Yes" and "A lot"! (Definitely somebody overzealous with the class!) |
− | What is important for us is to see that with this simple example | + | What is important for us is to see that with this simple example we can create a ''code'' where we replace sentences or words by numbers. The same number can represent different sentences, but because of the context in which they are used, one can ''decode'' the dialog and figure out what was said. |
Let's go one step further and add a counter next to each of the different sentences. Our dialog between our two interlocutors becomes | Let's go one step further and add a counter next to each of the different sentences. Our dialog between our two interlocutors becomes | ||
Line 1,011: | Line 1,011: | ||
04: 20 00 | 04: 20 00 | ||
− | You probably guessed it: it's the same conversation as before, but at the end the '''20 00''' numbers instruct us to go back to Line 0 and we start the conversation again. Just like a movie playing in an endless loop. While this may not seem terribly interesting, it is actually quite powerful. | + | You probably guessed it: it's the same conversation as before, but at the end the '''20 00''' numbers instruct us to go back to Line 0 and we start the conversation again. Just like a movie playing in an endless loop. While this may not seem terribly interesting, it is actually quite powerful. Watch the exchange between the robot played by Robin Williams and his owner, played by Sam Neil in the 1999 movie ''[http://youtu.be/REuNQvcN8tg?t=7m10s Bicentenial Man]". Here one of the two "people" |
+ | having a conversation is an ultra-logical being: a robot, who is not fully aware of the subtleties of the art of (human) conversation: | ||
+ | <br /> | ||
+ | <center><videoflash>REuNQvcN8tg?t=7m10s</videoflash></center> | ||
+ | <br /> | ||
Let's go one step further and change the rules of our "game" slightly. Imagine that instead of two interlocutors, we have a prof and a whole class of students, and we'd like to describe only the prof's side of the conversation he or she is having with the whole class, and not the student's part. But remember, the rule is still to only use numbers. How can we indicate that the conversation should be with one person first, then with the next, then the next, and so on? | Let's go one step further and change the rules of our "game" slightly. Imagine that instead of two interlocutors, we have a prof and a whole class of students, and we'd like to describe only the prof's side of the conversation he or she is having with the whole class, and not the student's part. But remember, the rule is still to only use numbers. How can we indicate that the conversation should be with one person first, then with the next, then the next, and so on? |
Revision as of 18:29, 28 September 2013
--© D. Thiebaut 08:10, 30 January 2012 (EST)