## Saturday, November 26, 2011

### Markov Chain

Image via Wikipedia

It may be surprising, but at the core of thousands of chatbots like Megabot and Cleverbot is a simple mathematical construction implemented in about 30 - 50 lines of code called a Markov Chain. This construction was developed over a hundred years ago by a Russian mathematician, Andrey Markov. Dr. Markov posited a finite state machine, in which one input lead to a series of outputs, and one was chosen by probability. The chain would not remember previous actions in the chain, but just note that this node is most likely associated with that one, and hop to that node to repeat the process. If it searches four nodes deep for probability, it can, given a graph of commonly used words from an existing corpus of text, write text almost indistinguishable from the kind that would be written by the original human author. Markov chains could also be used for math equations, chess games (associating moves), or even programming code (this line of code is probably followed by this one, so write that line in next). Given a broad list of sentences commonly said by human chat-attenders, a Markov chain can actually pass a Turing test. Key word being "can", not "will." On the downside of this, due to the stateless nature of the chain, the bot lacks any understanding of either the stimulus or the response. It lacks an understanding of grammar, and often posits totally nonsensical, or even ungrammatical, sentences. Fed enough scientific papers, it might write a sentence like "It is established that." This phrase might appear in the original work, but the bot fails to recognize that this is not an entire sentence. I might use a Markov chain to help with creativity. It would randomly combine ideas, which could lead to some creative conclusions. As an example, Usenet's Mark V. Shaney was actually a Markov Chain bot. People thought it was a very confused man, possibly on drugs, and possibly insane, but it was a computer program. The most famous utterance that this bot produced was "I spent an interesting evening recently with a grain of salt." The bot had started with a common opening statement for posts on the particular discussion group, "I spent an interesting evening recently," which they used to describe dating experiences, with part of the expression to "Take it with a grain of salt," meaning that the previous statement should be viewed via non-literal means, and with little claims to any veracity or truth. The two collide to produce the hilarious impression of a man obsessively staring at a tiny speck of salt, so infinitesimal, and yet so orderly, in some sort of weird quasi-science ritual. And that's the wonderful thing about Markov Chains -- you'll mostly get nonsensical crap, but hilarious things will pop up all the time.

## Thursday, November 17, 2011

### Plasma Water Cleaning

Clean water is a major need in much of the world. While water is a very common commodity on Earth, drinkable water is much less so. Much of our water is unthinkably salty, polluted, or so swarming with disease-causing bacteria and viruses that drinking it will probably result in your death. In many parts of the world, half of one's day is spent obtaining clean water so that your family doesn't die. And even then, some very clear, very clean water can be infected, and you'd never know until everyone who drank it becomes unbearably sick. In Berkeley, scientists have developed a way to not only sterilize water, but make it actively kill bacteria and viruses for up to a week after treatment, allowing people to stockpile water. They do this all with low temperature plasma, the type that develops in a neon light sign, or those lightning-ball toys. It's cheaper so far than the traditional treatments for water, such as bleach, filtering, or UV light. This kills even drug-resistant bacteria, which could save thousands of lives. Plus, it's cheap. A metal rod and a few cents of electricity will clean a few gallons of water. Even if the average resident can't afford this, there are many charities that would very cheerfully provide it. The saved time will also improve lives, as Dr. Hans Rosling pointed out how the washing machine turned his native Sweden into a first world country. Why? With the time that his mother saved by not having to manually scrub the family's clothing, she was able to educate her children, work to increase her income, and generally make life better all around. Automation has clearly made everyone's lives better. With clean water, child mortality will go down, hygine will improve, there will be more time for education and productive work.

## Friday, November 11, 2011

### It begins

So Apple now has a personal assistant with AI characteristics. People have been messing with it, and sometimes, it goes very very wrong:

## Thursday, November 10, 2011

### UFOs

You know where I think the ideas of UFOs came from? I think there was an experimental aircraft crash in 1947, the government got all weird and evasive about it, like they do for anything classified, rightly or wrongly, some guy happened to write a book about people being abducted by aliens that year, and the two ideas got combined in a massive hurricane of terrified and crazy. Tune in tomorrow when I continue with the downright strange things of this world.

## Monday, November 7, 2011

### Economic Creativity

The Korean, a Korean American man with some very fascinating takes on both his respective cultures and their interactions, has a fascinating article on why Korea will never produce a company quite like Apple. For cultural reasons. Wait, what?

The first surprising one is the superpower status of the home country. We Americans tend to think of our status as a superpower mostly in hard-power terms: Extensive military might, so many trillion dollars that we could outright buy at least 3 quarters of the countries out there, and the like, but the soft power is what's driving things here. People in incredibly diverse nations still love American ideas, culture, clothing, and inventions. That iPods and MacBooks are American designed is an active selling point in all but the most virulently anti-American areas of the world. The Korean points out that if the iPod were, say, Italian, it'd have difficulty selling outside of Italy. The modern internet's love of bands like Caramell (Swedish), O-Zone (Romanian), and singers like Eduard Khil (Russian) is actually an aberration historically, as most people prefer music in a language that they already speak, in a style appropriate to their own culture. Another culture's music typically sounds vaguely preposterous, unless that culture is a superpower that you feel you need exposure to for success. If the iPod was Korean....it'd probably be doomed unless well stocked with American music.

The Korean then went on to report that there used to be a site very much like Facebook many years before Facebook. It was perfect for Korea...proper language support, a style that suited Korean culture, and so on. One out of every four Koreans used it, a prospect that gets most businesses drooling. It then failed to expand past the borders of Korea when, surprise, things assumed to be true in Korea turn out to be totally false in other countries. The glam and glitter that appealed to Koreans looked like a cornball thing for a five year old girl in other countries. The extensive use of high density images that gave it its luster in Korea made it load slower than flowing glass in countries that didn't have as good a high speed network, which is pretty much all of them. And so today, those Koreans use Facebook. The network effect took off to the point where the older site just doesn't have your friends on it and facebook does. And today I've seen people use facebook to have friends across five oceans.

This isn't to say that being creative is not a cultural trait the Koreans have. My Korean-built cell phone is plenty creative. Korean ships can be found in every port. The creativity is clearly still there, but the domain and expression tends to be very different. Since Korea's independence in 1945, it went from the poorest country on earth (basically totally wrecked in World War II) to today in the top 7 wealthiest nations.

Nations are probably best off figuring out their strengths, and playing to them. If I wasn't so tired, I could probably draw a profound conclusion from this.

## Sunday, November 6, 2011

### Abstraction

Even relatively simple on your computer actually involve some rather complex chains of events. Take the keystrokes that I made to type this post up. Every time I hit a key, a little action something like this occurs: KEYBOARD: CPU, stop everything! The boss just pushed a key! CPU: Okay, I've stopped the task. What letter did he push? KEYBOARD: "e", sir. CPU: Alright, and I can enter that into the proper buffer so it can interact with the program. Now, back to work. The letters in the buffer then move into the text editing field, which gets uploaded to the server to make that post. And every time I pressed a key, literally hundreds of times per minute, the CPU had to quick, stop everything lest my keystroke be lost. Likewise, even turning the computer on involves a complex chain of actions, which is why your computer takes 2 to 5 minutes to even load up your desktop so that you can start working. A professor of computer science, Jean-Baptiste Queru, points out the deep abstractions involved when you so much as visit a website. All of this complexity is deeply hidden from you. You just clicked a link and this whole chain of events happened so that you could read something. Truly, we are better off today than even the richest and most powerful people a mere 300 years ago.

## Saturday, November 5, 2011

### Oh noes

My readers, I have failed you. I grew busy at work, solving problems, and killing many many bad things. I have neglected to write in this blog for over a month. If you stopped reading, I don't blame you. I will be queueing up some good things to read which should post during the week.