9.3.10

Random

How do you program randomness? By programing it, are you not expecting certain results? Therefore, it is not random. Could someone explain this to me? Please.

3 comments:

  1. Suppose we want a program to perform one of five different actions chosen at random. We can simply generate a random number between 1 and 5 and each number corresponds to a different action. Therefore, the programmer can not predict what action will end up being performed, and it will be different every time.

    Currently, a computer is not able to choose a purely random number. However, a computer can do a pretty good job of simulating a random number. This is usually done by checking the system clock which tells you how many milliseconds have passed since January 1, 1970. This is a large number that changes 1000 times a second (i.e. it will be different every time). If you want a number between 1 and 5, you simply divide that number by five and return the remainder plus one. Does that make sense?

    In the case of DARCI, there is an element of randomness as she explores how to change images to reflect adjectives. For example, if she is trying to change an image to be "scary", she will randomly pick (using a method similar to above) different combinations of filters to try. She then determines (using a fitness function that measures scariness) which combinations worked best and keep those ones. To continue improving, she will randomly take one of the filters and swap in a different randomly chosen filter and if that change improves the results, she will keep the change. So even though there is a lot of random changes, over time the best combinations of filters for "scary" survive and she slowly discovers how to change an image to be "scary." We the programmers cannot predict what DARCI will come up with in the end. The result we expect is that it will hopefully be good, or at least better than when she started.

    ReplyDelete
  2. Does programing randomness actually emulate the process of thinking?

    ReplyDelete
  3. I think this goes back to our class discussion two weeks ago when it was asked (paraphrasing) "Can a computer actually think?" The answer given in class was, "If we can formalize it, we can get a computer to do it." So the problem we really face here is how to define what "thinking" really means. If we can formalize what it means to think, then yes a computer would be able to think.

    So correct me if I am wrong, but I believe what your asking is, does thinking involve randomness? Is there randomness in us when we think? Does the formalization of what it means to think involve randomness?

    We still struggle with being able to answer those questions. We have struggled defining what thinking means. However, we come up with theories and try them out and see what the results are. DARCI, is an attempt to answer some of those questions and her design does involve some random elements.

    Personally, I think there is an element of randomness as we think, but it is not purely random. We have lots of experiences and knowledge and personal biases that guide our thinking into something meaningful and effective. I think much of what goes on as we think may happen at the sub-conscious level and only reach our consciousness when they've been "deemed" good enough for conscious thought (by some sub-conscious filtering system). Who knows if that is actually correct, but those are my (random?) thoughts for today.

    ReplyDelete