Wednesday, April 04, 2007


In the name of God, the Merciful, the Compassionate.

Someone asked the eminent shaykh Abu 'Ali b. Sina (may God the Exalted have mercy on him) the meaning of the Sufi saying, He who knows the secret of destiny is an atheist.  In reply he stated that this matter contains the utmost obscurity, and is one of those matters which may be set down only in enigmatic form and taught only in a hidden manner, on account of the corrupting effects its open declaration would have on the general public.  The basic principle concerning it is found in a Tradition of the Prophet (God bless and safeguard him): Destiny is the secret of God; do not declare the secret of God.  In another Tradition, when a man questioned the Prince of the Believers, 'Ali (may God be pleased with him), he replied, Destiny is a deep sea; do not sail out on it.  Being asked again he replied, It is a stony path; do not walk on it.  Being asked once more he said, It is a hard ascent; do not undertake it.

The shaykh said: Know that the secret of destiny is based upon certain premisses, such as 1) the world order, 2) the report that there is Reward and Punishment, and 3) the affirmation of the resurrection of souls.


-- Avicenna, On the Secret of Destiny (tr. George Hourani)

posted by J Ashley on Wednesday, April 04, 2007 5:25:25 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Monday, April 02, 2007

 

Download SAPISophiaDemo.zip - 2,867.5 KB

 

Following on the tail of the project I have been working on for the past month, a chatterbox (also called a chatbot) with speech recognition and text-to-speech functionality, I came across the following excerpted article in The Economist, available here if you happen to be a subscriber, and here if you are not:

 

Chatbots have already been used by some companies to provide customer support online via typed conversations. Their understanding of natural language is somewhat limited, but they can answer basic queries. Mr Carpenter wants to combine the flexibility of chatbots with the voice-driven "interactive voice-response" systems used in many call centres to create a chatbot that can hold spoken conversations with callers, at least within a limited field of expertise such as car insurance.

This is an ambitious goal, but Mr Carpenter has the right credentials: he is the winner of the two most recent Loebner prizes, awarded in an annual competition in which human judges try to distinguish between other humans and chatbots in a series of typed conversations. His chatbot, called Jabberwacky, has been trained by analysing over 10m typed conversations held online with visitors to its website (see jabberwacky.com). But for a chatbot to pass itself off as a human agent, more than ten times this number of conversations will be needed, says Mr Carpenter. And where better to get a large volume of conversations to analyse than from a call centre?

Mr Carpenter is now working with a large Japanese call-centre company to develop a chatbot operator. Initially he is using transcripts of conversations to train his software, but once it is able to handle queries reliably, he plans to add speech-recognition and speech-synthesis systems to handle the input and output. Since call-centre conversations tend to be about very specific subjects, this is a far less daunting task than creating a system able to hold arbitrary conversations.

 

Jabberwacky is a slightly different beast than the AIML infrastructure I used in my project.  Jabberwacky is a heuristics based technology, whereas AIML is a design-based one that requires somebody to actually anticipate user interactions and try to script them.

All the same, it is a pleasant experience to find that one is serendipidously au courant, when one's intent was to be merely affably retro.

posted by J Ashley on Monday, April 02, 2007 1:50:41 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]

I have been busy in my basement constructing a robot with which I can have conversations and play games.  Except that the robot is more of a program, and I didn't build the whole thing up from scratch, but instead cobbled together pieces that other people have created.  I took an Eliza-style interpreter written by Nicholas H.Tollervey (this is the conversation part) along with some scripted dialogs by Dr. Richard S. Wallace and threw it together with a Z-machine program written by Jason Follas, which allows my bot to play old Infocom games like Zork and The Hitchhiker's Guide to the Galaxy.  I then wrapped these up in a simple workflow and added some new Vista\.NET 3.0 speech recognition and speech synthesis code so the robot can understand me.

I wrote an article about it for CodeProject, a very nice resource that allows developers from around the world to share their code and network.  The site requires registration to download code however, so if you want to play with the demo or look at the source code, you can also download them from this site.

Mr. Tollervey has a succint article about the relationship between chatterboxes and John Searle's Chinese Box problem, which obviates me from responsibility for discussing the same.

Instead, I'll just add some quick instructions:

 

The application is made up of a text output screen, a text entry field, and a default enter button. The initial look and feel is that of an IBX XT theme (the first computer I ever played on). This can be changed using voice commands, which I will cover later. There are three menus initially available. The File menu allows the user to save a log of the conversation as a text file. The Select Voice menu allows the user to select from any of the synthetic voices installed on her machine. Vista initially comes with "Anna". Windows XP comes with "Sam". Other XP voices are available depending on which versions of Office have been installed over the lifetime of that particular instance of the OS. If the user is running Vista, then the Speech menu will allow him to toggle speech synthesis, dictation, and the context-free grammars. By doing so, the user will have the ability to speak to the application, as well as have the application speak back to him. If the user is running XP, then only speech synthesis is available, since some of the features provided by .NET 3.0 and consumed by this application do not work on XP.

The appearance menu will let you change the look and feel of the text screen.  I've also added some pre-made themes at the bottom of the appearnce menu.  If, after chatting with SophiaBot for a while, you want to play a game, just type or say "Play game."  SophiaBot will present you with a list of the games available (you can add more, actually, simply by dropping additional game files you find on the internet into the Program Files\Imaginative Universal\SophiaBot\Game Data\DATA folder (Jason's Z-Machine implementation plays games that use version 3 and below of the game engine.  I'm looking (rather lazily) into how to support later versions.  You can go here to download more Zork-type games.  During a game, type or say "Quit" to end your session. "Save" and "Restore" keep track of your current position in the game, so you can come back later and pick up where you left off.

Speech recognition in Vista has two modes: dictation and context-free recognition. Dictation uses context, that is, an analysis of preceding words and words following a given target of speech recognition, in order to determine what word was intended by the speaker. Context-free speech recognition, by way of contrast, uses exact matches and some simple patterns in order to determine if certain words or phrases have been uttered. This makes context-free recognition particularly suited to command and control scenarios, while dictation is particularly suited to situations where we are simply attempting to translate the user's utterances into text.

You should begin by trying to start up a conversation with Sophia using the textbox, just to see how it works, as well as her limitations as a conversationalist. Sophia uses certain tricks to appear more lifelike. She throws out random typos, for one thing. She also is a bit slower than a computer should really be. This is because one of the things that distinguish computers from people is the way they process information -- computers do it quickly, and people do it at a more leisurely pace. By typing slowly, Sophia helps the user maintain his suspension of disbelief. Finally, if a text-to-speech engine is installed on your computer, Sophia reads along as she types out her responses. I'm not certain why this is effective, but it is how computer terminals are shown to communicate in the movies, and it seems to work well here, also. I will go over how this illusion is created below.

In Command\AIML\Game Lexicon mode, the application generates several grammar rules that help direct speech recognition toward certain expected results. Be forewarned: initially loading the AIML grammars takes about two minutes, and occurs in the background. You can continue to touch type conversations with Sophia until the speech recognition engine has finished loading the grammars and speech recognition is available. Using the command grammar, the user can make the computer do the following things: LIST COLORS, LIST GAMES, LIST FONTS, CHANGE FONT TO..., CHANGE FONT COLOR TO..., CHANGE BACKGROUND COLOR TO.... Besides the IBM XT color scheme, a black papyrus font on a linen background also looks very nice. To see a complete list of keywords used by the text-adventure game you have chosen, say "LIST GAME KEYWORDS." When the game is initially selected, a new set of rules is created based on different two word combinations of the keywords recognized by the game, in order to help speech recognition by narrowing down the total number of phrases it must look for.

In dictation mode, the underlying speech engine simply converts your speech into words and has the core SophiaBot code process it in the same manner that it processes text that is typed in. Dictation mode is sometimes better than context-free mode for non-game speech recognition, depending on how well the speech recognition engine installed on your OS has been trained to understand your speech patterns. Context-free mode is typically better for game mode. Command and control only works in context-free mode.

posted by J Ashley on Monday, April 02, 2007 11:03:46 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Sunday, April 01, 2007

 

A new Newsweek poll reveals frightening data about the curious disjunct between faith and science among Americans.  Pundits have attributed these results to anything from poor science education in pre-K programs to global warming.  According to the poll, while 51% percent of Americans still ascribe to Darwin's theory of gradual evolution through adaptation, an amazing 42% continue to cleave to Lamarkianism, while only 6% believe in Punctuated Equilibrium. 1% remain uncommitted and are waiting to hear more before they come to a final decision.

This has led me to wonder what else Americans believe:

The 2002 Roper Poll found that 48% of americans believe in UFO's, while 37% believe that there has been first hand contact between aliens and humans.  25% of Americans believe in alien abductions, while approximately 33% believe that humans are the only intelligent life in the universe, and that all the UFO stuff is bunk.

The 33% of people who ascribe to the anthropocentric view of the universe corresponds numerically with the 33% of Americans who opposed the recent deadline for troop withdrawal from Iraq (PEW Research center poll).   According to the Gallup poll, in 1996 33% of Americans thought they would become rich someday.  By 2003, this number had dropped to 31%.  According to a Scripps Howard/Ohio University poll, 33% of the American public suspects that federal officials assisted in the 9/11 terrorist attacks or took no action to stop them so the United States could go to war in the Middle East.  A Harris poll discovered that in 2004, 33% of adult Americans considered themselves Democrats.

PEW says that as of 2004, 33 million American internet users had reviewed or rated something as part of an online rating system.  33 million Americans were living in povery in 2001, according to the U.S. Census Bureau.  According to PEW, in 2006 33 million Americans had heard of VOIP.  Each year, 33 million Americans use mental health services or services to treat their problems and illnesses resluting from alcohol, inappropirate use of prescription medications, or illegal drugs.  The New York Times says that out of 33 countries, Americans are least likely to believe in evolution.  Researchers estimate that 33% of Americans born in 2000 will develop diabetes.  In the same year, 33 million Americans lost their jobs.

CBS pollsters discovered that 22% of Americans have seen or felt the presence of a ghost.  48% believe in ghosts.  ICR says 48% of Americans oppose embryonic stem-cell research.  CBS finds that 61% support embryonic stem-cell research.  There is no poll data available on whether they believe that embryos used for stem-cell research will one day become ghosts themselves.

82% of Americans believe that global warming is occuring, according to Fox News/Opinion Dynamics.  79% believe people's behavior has contributed to global warming.  89% do not believe the U.S. government staged or faked the Apollo moon landing, according to Gallup.  Gallup also found that 41% of Americans believe in ESP, 25% believe in Astrology, 20% believe in reincarnation, while only 9% believe in channeling.  A USA TODAY/ABC News/Stanford University Medical Center poll found that 5% of American adults have turned to acupuncture for pain relief.

According to Gallup, 44% of Americans go out of their way to see movies starring Tom Hanks.  34% go out of their way to avoid movies starring Tom Cruise.  Only 18% go out of their way to avoid Angelina Jolie.

posted by J Ashley on Sunday, April 01, 2007 2:34:28 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Wednesday, March 07, 2007

In the Valentine's edition of The New Yorker, there was a rather nice portrait by Larissa MacFarquhar of Paul and Pat Churchland, connubial philosophers of the mind-body problem at UC San Diego.  For years they have been basically decrying in the wilderness against the way that philosophy of mind was being done without any regard for the experimental data being produced by studies in neurophysiology.  In the article, Pat Churchland says this prevalent approach was the result of Anglo-American common language philosophy, which holds that the object of philosophy is to clarify our ideas by analyizing language. The problem, as she sees it, is that clarifying incorrect notions about the relationship between mind and body does not get us to truth, but rather leads us simply to have sophisticated bad ideas.  The mind-body problem had become a problematic (to borrow from Foucault), when the evidence from neurophysiology was very clear -- there is the brain and that's it.  Everything else is language games.

The article continues on a disappointed note:

These days, many philosophers give Pat credit for admonishing them that a person who wants to think seriously about the mind-body problem has to pay attention to the brain.  But this acknowledgment is not always extended to Pat herself, or to the work she does now.

 

The common language philosophy that Pat Churchland critisizes has its roots in german philosophy and the general post-Kantian diminishing of the relevance of Metaphysics.  The deathknell for metaphysics in the 20th century may have arrived with Wittgenstein's pronouncement in the Tractatus Logico-Philosophicus that  "[w]ovon man nicht sprechen kann, darĂ¼ber muss man schweigen."  There are different ways to take this, of course, one of which is to say that, as with the dove-tailing of Kant's first and second critiques, it delimits metaphysics in order to make room for faith (or occultism, or theosophy, or whatever).

The other is that it states what is already well known, that Metaphysic is dead, and there is nothing more to say about her.  But if philosophers can no longer talk about metaphysics, then what shall they talk about?  For years in Anglo-American philosophy, they talked about language.  Instead of the relation between appearance and reality in the world, they talked about appearance and meaning in language instead.  What the Churchlands found disturbing about this was that this seemed simply to be a way to practice metaphysics underground.  Philosophers could dismiss metaphysics on the one hand, but then reintroduce it in their conversations about language instead -- though insisting that all they were doing was discussing how we talk about metaphysical notions, not metaphysics itself.  Like vampire hunters to the rescue (though under-appreciated, as indicated above) the Churchlands moved in and reapplied Wittgenstein's dictum to this underground metaphysics.  I like to think of them as latter day versions of Maximus the Confessor, pointing out that the compromise monothelite christology was in fact simply the monophysite heresy under a new guise.  Claiming that Christ has two natures but one will is no better than claiming that he has one nature.  Claiming that mind and body are the same in the world but separated in language is no better than claiming that they are different in the world, also.

The natural endpoint for the Churchlands is, then, to make our language conform to the world, in order to remove these errors of thought.

One afternoon recently, Paul says, he was home making dinner when Pat burst in the door, having come straight from a frustrating faculty meeting. "She said, 'Paul, don't speak to me, my serotonin levels have hit bottom, my brain is awash in glucocorticoids, my blood vessels are full of adrenaline, and if it weren't for my endogenous opiates I'd have driven the car into a tree on the way home.  My dopamine levels need lifting.  Pour me a Chardonnay, and I'll be down in a minute.'"  Paul and Pat have noticed that it is not just they who talk this way -- their students now talk of psychopharmacology as comfortably as of food.

 

But if we cannot do metaphysics, and we should not even talk of it anymore, what should philosophers do with themselves?  Open Court Press may have found an answer with their Popular Culture and Philosophy series.  Not all the books listed below are from their press, but they do emphasize the point that if we cannot speak of metaphysics, that is if we cannot use philosophy to go beyond what we already know, then we ought to use her instead to explore those things that we are familiar with.  We should practice the perennial philosophy.

  1. The Beatles and Philosophy
  2. Monty Python and Philosophy
  3. U2 and Philosophy
  4. Undead and Philosophy
  5. Bob Dylan and Philosophy
  6. The Simpsons and Philosophy
  7. Harry Potter and Philosophy
  8. Buffy the Vampire Slayer and Philosophy
  9. James Bond and Philosophy
  10. The Sopranos and Philosophy
  11. Star Wars and Philosophy
  12. Baseball and Philosophy
  13. The Matrix and Philosophy
  14. More Matrix and Philosophy
  15. Woody Allen and Philosophy
  16. South Park and Philosophy
  17. The Lord of the Rings and Philosophy
  18. Poker and Philosophy
  19. Hip-Hop and Philosophy
  20. Basketball and Philosophy
  21. Hitchcock and Philosophy
  22. The Atkins Diet and Philosophy
  23. Superheroes and Philosophy
  24. Harley-Davidson and Philosophy
  25. The Grateful Dead and Philosophy
  26. Seinfeld and Philosophy
  27. Mel Gibson's Passion and Philosophy
  28. The Chronicles of Narnia and Philosophy
  29. Bullshit and Philosophy
  30. Johnny Cash and Philosophy
posted by J Ashley on Wednesday, March 07, 2007 10:04:41 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1]