Wednesday, January 28, 2009

Lie to Me

I got burned on the last police procedural that involved an unorthodox genius who is virtually able to read minds based on his knowledge of psychology, body language, and purposeful deception. That last show was The Mentalist, and while it started out decently, it got very silly, very fast.

So I wasn't sure whether I'd want to give the new Tim Roth drama, Lie to Me, a chance. It's about a guy named Dr. Cal Lightman, who has studied the body language and its correspondence to truthfulness and deception in depth. The character is apparently based on real psychologist Paul Ekman.


So I checked out the first episode, and though it was guilty of the gratuitous use of slow motion at the end, overall it was interesting and watchable enough to make me want to see more. It also stars Kelli Williams, who was on The Practice, which was a guilty pleasure of mine, and she's good.

At one point in the show, when Williams' character tells Lightman he should try to be happier, he says something like "Truth or happiness...you can't have both." He may have been saying it ironically...I don't know. Because he spends the whole trying to expose the truth of a given situation, and does, and it certainly makes certain characters a lot more happy, and others not so much. But the general theme of truth and deception as it relates to morality and happiness is an interesting one which could develop into a thought-provoking show.

On the other hand, the show could easily degenerate into silly parlor tricks. We'll see. But if you haven't seen the first episode, I'd tentatively recommend it.

Tuesday, January 20, 2009

Inauguration Day

I haven't felt much like blogging in the past couple of weeks. For one, I've been pretty busy. But sometimes you just get a little burned out blabbing every day (or at least, most people do). In the meantime, my sister had a baby, Daniel, so I'm now an uncle all over again, which is cool.

And of course today is the inauguration of our new President.



I first heard about Obama when he gave his speech at the Democratic Convention in 2004. I just read excerpts, but I wasn't a fan of the Democratic Party, or John Kerry, and the cynic in me thought that this was just an instance of throwing a politically-correct bone to a rising star in the party. I thought he was just a flash in the pan.

But that was before I actually knew much about him or listened to him talk. The more I did that, the more impressed I was. There actually does seem to be a core of substance to him, although that's difficult to assess solely on the basis of rhetoric. Now that he's taking office, his actions will truly tell what kind of leader he is. Things are not going great in our country right now, so here's hoping for all our sakes that he lives up, at least in some measure, to the hype.

Tuesday, January 6, 2009

Using ANJI

One of the things that led me on the path back to school was a rekindling of my interest in neural networks and artificial intelligence. In 2002 my friend Philip took a neural networks class at The University of Texas at Dallas, and I audited it along with him. After that, I started reading a lot of academic papers related to neural networks and game AI. At some point I came across Ken Stanley's work, which involved using evolutionary algorithms to optimize the organization and weights of neural networks. That really lit things up for me.

After looking at the existing implementations of Stanley's algorithm, called NEAT (NeuroEvolution of Augmenting Topologies), we decided to implement our own version, which we called ANJI (Another NEAT Java Implementation). There was already an existing NEAT Java implementation, but we wanted to do our own, partially to really learn the algorithm inside and out.



We made the software open source, which means that anyone can access it, use it, and alter it in just about any way they want, and we released it in January of 2004 on SourceForge. Here's the homepage of the project (though I should probably update it).

In the past four years, it's been downloaded over 1,500 times, and used in various projects and research. I hadn't Googled it in a while, but I was pleased to see some of the following examples of people using ANJI:

Rudolf Kradec used it in his 2008 Master's Thesis on the evolution of intelligent behavior in computer games at Charles University in Prague.

John Peberdy used it for a final project for a computer science class at The University of Waterloo last year on evolving agents (he's got some cool movies, too).

And Oliver Chamberlain used it for work on evolving controllers for robotic soccer players at The University of Birmingham in 2008.

The download rate has been fairly consistent over the past four years, with about 400 downloads per year. These aren't staggering numbers, but I think they're pretty good for a highly-specialized piece of scientific software. Anyway, it's cool to see people consistently using something you worked on to investigate the same kinds of questions you're interested in.

Derek's Year in Movies 2008

Here's a list of all the movies released this year that I saw (there are 35), along with my rating:

* "Appaloosa" (B+)
* "The Bank Job" (B)
* "Burn After Reading" (B)
* "Cloverfield" (A-)
* "The Dark Knight" (C+)
* "Doubt" (B+)
* "Eagle Eye" (C)
* "Expelled" (F)
* "Forgetting Sarah Marshall" (C+)
* "Get Smart" (C+)
* "Hancock" (D)
* "Hellboy 2" (B)
* "Horton Hears A Who" (B)
* "In Bruges" (C+)
* "Incredible Hulk" (C+)
* "Indiana Jones 4" (B+)
* "Iron Man" (A)
* "Jumper" (C)
* "Kung Fu Panda" (A-)
* "Mirrors" (C)
* "Rambo 4" (C)
* "Redbelt" (B-)
* "Religulous" (A-)
* "The Ruins" (B-)
* "Slumdog Millionaire" (B)
* "The Spirit" (F)
* "Star Wars: Clone Wars" (C)
* "Step Brothers" (B)
* "The Strangers" (C+)
* "Sukiyaki Western Django" (???)
* "Teeth" (B+)
* "Tropic Thunder" (D)
* "Valkyrie" (A-)
* "WALL*E" (C)
* "Wanted" (B+)

No doubt you'll disagree with me on some of these, but that's the way it goes, right? If you want, go make your own list.

I was going to do a Best and Worst 10, and then realized I didn't like enough films to do a Top 10. It was hard even coming up with a Top 3. Instead I'll just designate some special awards:

Best Superhero Movie of the Year: Iron Man

Most people will probably think The Dark Knight was the best superhero film of the year. They'd be wrong. True, Heath Ledger was incredibly good as The Joker, but just about everything else about the movie sucked balls, from Batman's ludicrous gravelly voice, to the silly boat dilemma, to the preachiness about civil liberties, to handling Two-Face's origin, career, and death in half an hour, to the absurdly moronic final lines. No, Iron Man was what a superhero movie should be: fun, slick, and action-packed. Bonus points for having an engineer as the hero.

Worst Piece of Propagandizing Swill: Expelled

Ben Stein and the producers of this film set out with deceit and a room full of shitty vintage stock footage and managed to make the most intellectually dishonest celluloid turd I've ever seen put to film. This film wasn't just anti-evolution; it was anti-anything-close-to-rational-thought. And to boot, it was just utterly shitty film-making.

So Bad It Was Good: Redbelt

This was a tough one. There were other strong candidates in Eagle Eye and Wanted, both with plots so silly you just had to laugh (or you'd cry). Wanted was probably the better of those two, for the simple fact that it had people shooting guns and slinging them to alter their trajectory, and they practiced on dead pigs! It also had an army of bomb-wielding rats. In short, it out-sillied Eagle Eye, and that's saying something. But David Mamet's philosophical mixed martial arts movie took the prize, mostly because it took itself so mother-fucking seriously. I think Mamet actually thought he was penning something profound, and not some silly little movie about grift and guys wrestling and kicking each other. And the ending was so very, very silly. But it made me smile.

WTF: Sukiyaki Western Django

Unlike the last category, this one was clear-cut. This bizarre Western with Japanese actors speaking mangled, Southern-US-affected dialect while dressed in outlandish costumes, wielding guns and swords while Quentin Tarantino was some kind of goofy Greek chorus...it was supposed to be cool, but it made my brain hurt.

Overall it just wasn't a very good year. Here's hoping things are better in 2009.

Tooth Regeneration

Via a SlashDot posting entitled "Tooth Regeneration Coming Soon" (they do love to sensationalize over there, don't they?) comes this rather goofy article in the Washington Post about using stem cells to regrow teeth.


I say it's goofy because it's one of those pop science articles chock full of pop culture references (e.g. Dr. Strangelove) that have nothing to do with the topic at hand, and it's over halfway through before they get to the current state of research, which isn't exactly "soon".
Regenerating a whole tooth is no less complicated than rebuilding a whole heart, says Songtao Shi of the University of Southern California, who heads a team working on creating such a tooth.

Not only do you have to create smart tissue (nerves), strong tissue (ligaments) and soft tissue (pulp), you've got to build enamel -- by far the hardest structural element in the body. And you have to have openings for blood vessels and nerves. And you have to make the whole thing stick together. And you have to anchor it in bone. And then you have to make the entire arrangement last a lifetime in the juicy stew of bacteria that is your mouth.

...

Nobody is predicting when the first whole tooth will be grown in a human, although five to 10 years is a common guess. "The whole tooth -- we've got a long way to go," says Shi.

But his team is pursuing what he believes is a practical and immediate result: growing important parts of teeth that he thinks people will want to use right away. They're working on creating a living root from scratch. "I think it will take a year," Shi says. "Depends on how lucky we are, and how good we are."

"How to make a root is real important," says Robey. "Dentists say, 'Give me a root and I can put a crown on it.' "

In addition, "we're really, really close to treating periodontal disease with regeneration," Shi says. Groups in Japan and Taiwan and at the University of Michigan are using stem cells to create hard and soft tissue in humans, he says. The idea is to take a tooth about to fall out and reconnect it firmly.

When you ask Shi how close we are to growing full teeth on demand, he laughs. But his crew has already created a living root using stem cells in a pig. "We did it. It works. We're happy. We still have some questions to answer, but we're working on it."
But then you've got clinical trials and FDA approval and all that, so I'd go ahead and double even the most optimistic estimates. Futurists geeks just love to overspeculate on the latest technology, but it needs to be tempered with a bit of realism.

That said, it will happen, and the technology of regrowing lost teeth from stem cells, while not nearly as important as regrowing brain or heart tissue, is still pretty damned awesome.

Saturday, January 3, 2009

Tim Minchin's Storm

Via PodBlack Cat, here are the words to Tim Minchin's beat poem Storm:

Inner North London, top floor flat
All white walls, white carpet, white cat,
Rice Paper partitions
Modern art and ambition
The host’s a physician,
Lovely bloke, has his own practice
His girlfriend’s an actress
An old mate from home
And they’re always great fun.
So to dinner we’ve come.

The 5th guest is an unknown,
The hosts have just thrown
Us together for a favour
because this girl’s just arrived from Australia
And has moved to North London
And she’s the sister of someone
Or has some connection.

As we make introductions
I’m struck by her beauty
She’s irrefutably fair
With dark eyes and dark hair
But as she sits
I admit I’m a little bit wary
because I notice the tip of the wing of a fairy
Tattooed on that popular area
Just above the derrière
And when she says “I’m Sagittarien”
I confess a pigeonhole starts to form
And is immediately filled with pigeon
When she says her name is Storm.

Chatter is initially bright and light hearted
But it’s not long before Storm gets started:
“You can’t know anything,
Knowledge is merely opinion”
She opines, over her Cabernet Sauvignon
Vis a vis
Some unhippily
Empirical comment by me

“Not a good start” I think
We’re only on pre-dinner drinks
And across the room, my wife
Widens her eyes
Silently begs me, Be Nice
A matrimonial warning
Not worth ignoring
So I resist the urge to ask Storm
Whether knowledge is so loose-weave
Of a morning
When deciding whether to leave
Her apartment by the front door
Or a window on the second floor.

The food is delicious and Storm,
Whilst avoiding all meat
Happily sits and eats
While the good doctor, slightly pissedly
Holds court on some anachronistic aspect of medical history
When Storm suddenly she insists
“But the human body is a mystery!
Science just falls in a hole
When it tries to explain the the nature of the soul.”

My hostess throws me a glance
She, like my wife, knows there’s a chance
That I’ll be off on one of my rants
But my lips are sealed.
I just want to enjoy my meal
And although Storm is starting to get my goat
I have no intention of rocking the boat,
Although it’s becoming a bit of a wrestle
Because - like her meteorological namesake -
Storm has no such concerns for our vessel:

“Pharmaceutical companies are the enemy
They promote drug dependency
At the cost of the natural remedies
That are all our bodies need
They are immoral and driven by greed.
Why take drugs
When herbs can solve it?
Why use chemicals
When homeopathic solvents
Can resolve it?
It’s time we all return-to-live
With natural medical alternatives.”

And try as hard as I like,
A small crack appears
In my diplomacy-dike.
“By definition”, I begin
“Alternative Medicine”, I continue
“Has either not been proved to work,
Or been proved not to work.
You know what they call “alternative medicine”
That’s been proved to work?
Medicine.”

“So you don’t believe
In ANY Natural remedies?”

“On the contrary actually:
Before we came to tea,
I took a natural remedy
Derived from the bark of a willow tree
A painkiller that’s virtually side-effect free
It’s got a weird name,
Darling, what was it again?
Masprin?
Basprin?
Asprin!
Which I paid about a buck for
Down at my local drugstore.

The debate briefly abates
As our hosts collects plates
but as they return with desserts
Storm pertly asserts,

“Shakespeare said it first:
There are more things in heaven and earth
Than exist in your philosophy…
Science is just how we’re trained to look at reality,
It can’t explain love or spirituality.
How does science explain psychics?
Auras; the afterlife; the power of prayer?”

I’m becoming aware
That I’m staring,
I’m like a rabbit suddenly trapped
In the blinding headlights of vacuous crap.
Maybe it’s the Hamlet she just misquothed
Or the eighth glass of wine I just quaffed
But my diplomacy dike groans
And the arsehole held back by its stones
Can be held back no more:

“Look , Storm, I don’t mean to bore you
But there’s no such thing as an aura!
Reading Auras is like reading minds
Or star-signs or tea-leaves or meridian lines
These people aren’t plying a skill,
They are either lying or mentally ill.
Same goes for those who claim to hear God’s demands
And Spiritual healers who think they have magic hands.

By the way,
Why is it OK
For people to pretend they can talk to the dead?
Is it not totally fucked in the head
Lying to some crying woman whose child has died
And telling her you’re in touch with the other side?
That’s just fundamentally sick
Do we need to clarify that there’s no such thing as a psychic?
What, are we fucking 2?
Do we actually think that Horton Heard a Who?
Do we still think that Santa brings us gifts?
That Michael Jackson hasn’t had facelifts?
Are we still so stunned by circus tricks
That we think that the dead would
Wanna talk to pricks
Like John Edwards?

Storm to her credit despite my derision
Keeps firing off clichés with startling precision
Like a sniper using bollocks for ammunition

“You’re so sure of your position
But you’re just closed-minded
I think you’ll find
Your faith in Science and Tests
Is just as blind
As the faith of any fundamentalist”

“Hm that’s a good point, let me think for a bit
Oh wait, my mistake, it’s absolute bullshit.
Science adjusts it’s beliefs based on what’s observed
Faith is the denial of observation so that Belief can be preserved.
If you show me
That, say, homeopathy works,
Then I will change my mind
I’ll spin on a fucking dime
I’ll be embarrassed as hell,
But I will run through the streets yelling
It’s a miracle! Take physics and bin it!
Water has memory!
And while it’s memory of a long lost drop of onion juice is Infinite
It somehow forgets all the poo it’s had in it!

You show me that it works and how it works
And when I’ve recovered from the shock
I will take a compass and carve Fancy That on the side of my cock.”

Everyones just staring at me now,
But I’m pretty pissed and I’ve dug this far down,
So I figure, in for penny, in for a pound:

“Life is full of mysteries, yeah
But there are answers out there
And they won’t be found
By people sitting around
Looking serious
And saying isn’t life mysterious?
Let’s sit here and hope
Let’s call up the fucking Pope
Let’s go watch Oprah
Interview Deepak Chopra

If you’re going to watch tele, you should watch Scooby Doo.
That show was so cool
because every time there’s a church with a ghoul
Or a ghost in a school
They looked beneath the mask and what was inside?
The fucking janitor or the dude who runs the waterslide.
Throughout history
Every mystery
EVER solved has turned out to be
Not Magic.

Does the idea that there might be truth
Frighten you?
Does the idea that one afternoon
On Wiki-fucking-pedia might enlighten you
Frighten you?
Does the notion that there may not be a supernatural
So blow your hippy noodle
That you would rather just stand in the fog
Of your inability to Google?

Isn’t this enough?
Just this world?
Just this beautiful, complex
Wonderfully unfathomable world?
How does it so fail to hold our attention
That we have to diminish it with the invention
Of cheap, man-made Myths and Monsters?
If you’re so into Shakespeare
Lend me your ear:
“To gild refined gold, to paint the lily,
To throw perfume on the violet… is just fucking silly”
Or something like that.
Or what about Satchmo?!
I see trees of Green,
Red roses too,
And fine, if you wish to
Glorify Krishna and Vishnu
In a post-colonial, condescending
Bottled-up and labeled kind of way
That’s ok.
But here’s what gives me a hard-on:
I am a tiny, insignificant, ignorant lump of carbon.
I have one life, and it is short
And unimportant…
But thanks to recent scientific advances
I get to live twice as long as my great great great great uncles and auntses.
Twice as long to live this life of mine
Twice as long to love this wife of mine
Twice as many years of friends and wine
Of sharing curries and getting shitty
With good-looking hippies
With fairies on their spines
And butterflies on their titties.

And if perchance I have offended
Think but this and all is mended:
We’d as well be 10 minutes back in time,
For all the chance you’ll change your mind.

Seven Pounds

The newest movie starring Will Smith got savaged among reviewers. I saw it recently, and I think the ultra-harsh reviews were a bit unfair. The movie is about a man named Ben who seems to be stalking and examining an odd array of people. He also seems very troubled. What's going on? It's impossible to talk about the specifics of the movie without spoiling it, so I'll do that below the picture. But just about anyone paying close attention to the movie can figure out in broad strokes what's going on in the first 15 minutes. But this is one thing I actually liked about the movie. It was a puzzle of sorts. You're given fragments, pieces of something broken, and you need to piece them together to make sense of what you're seeing. I think movies like that are interesting, if done well, and I think Seven Pounds is done reasonably well.

[SPOILERS BELOW]








So what's the big mystery? Ben is not Ben, but actually Tim. He's using his brother's credentials as an IRS agent to investigate people, specifically people who need organ or tissue transplants. Tim used to be a big-shot aerospace engineer with a beautiful fiance. But one night he was driving his car along a windy road, checking his Blackberry, and he caused a wreck which killed seven people, including his fiance.

So he decides to help seven other people. But he wants to make sure they're good people, hence the stalking. He donates part of his liver to a social worker. He donates bone marrow to a dying boy. He gives a kidney to a man and his house to an abused woman and her children. But he's apparently so stricken with guilt that his final acts of charity involve killing himself. His final donations are his eyes to a blind man and his heart to a woman named Emily who has congenital heart disease.

There's a wrinkle with this last one, since while investigating Emily, he falls in love with her. But her condition worsens and when the doctor tells him that she has about a 3% chance to find a donor, he does the math and kills himself to give her his heart.

All the actors are good, and the direction is competent, and I actually found the situation poignant. I would have liked a scene between Tim and his friend or a psychiatrist or someone trying to talk him out of it, just to see more of what was going through his head and his rationale, but that might have actually made the film worse. I could actually believe that someone who had killed seven people through recklessness would try to atone for it this way. The only really absurd part that pulled me out of the movie was the way in which he killed himself.

By jellyfish. Yes, that's right...he got a jellyfish into his motel room, filled his bathtub with ice, and went swimming with a jellyfish. He even put down a laminated sign near the tub that read "DO NOT TOUCH THE JELLYFISH" for the paramedics. I think the writers thought that this was a poetic way to commit suicide. There's an early scene where Tim as a boy is taken to the zoo by his father, and we see the ethereal movement of the jellyfish in their tank. So I'm pretty sure I know what the creators were going for, but unfortunately it didn't really work, and as a result was the silliest part of the movie. I think the suicide by jellyfish is what earned it such scorn (28% on Rotten Tomatoes as of this writing). Which is a shame, because it really is an interesting, well-made, if emotionally-manipulative movie. It could even have been a powerful movie if Tim had actually researched a way to kill himself that would preserve his organs that didn't involve a friggin' jellyfish.

One last note: I was reminded of the philosophical conundrum of sacrificing a single person to save some number of strangers. It usually goes something like this: Is is ethical to kidnap and kill a healthy person in order to use their organs to save seven healthy people? In studies, people usually find such scenarios highly unethical, though in forced choice situations (e.g., a madman puts you in a room with two buttons, one of which kills a single person, the other kills seven, and if you don't press either, they all die) it is usually deemed ethical to kill one person rather than seven. The organ transplant scenario is not normally seen as a forced choice (even if we could reliably predict that all seven people will be dead within a month). Anyway, Seven Pounds has the capacity to lead to some interesting discussions of philosophy and morality, despite the silly business with the jellyfish.

The Dragon in My Garage by Carl Sagan

Here's a classic excerpt from Carl Sagan's The Demon-Haunted World: Science As A Candle In the Dark:

"A fire-breathing dragon lives in my garage"

Suppose (I'm following a group therapy approach by the psychologist Richard Franklin) I seriously make such an assertion to you. Surely you'd want to check it out, see for yourself. There have been innumerable stories of dragons over the centuries, but no real evidence. What an opportunity!

"Show me," you say. I lead you to my garage. You look inside and see a ladder, empty paint cans, an old tricycle--but no dragon.

"Where's the dragon?" you ask.

"Oh, she's right here," I reply, waving vaguely. "I neglected to mention that she's an invisible dragon."

You propose spreading flour on the floor of the garage to capture the dragon's footprints.

"Good idea," I say, "but this dragon floats in the air."

Then you'll use an infrared sensor to detect the invisible fire.

"Good idea, but the invisible fire is also heatless."

You'll spray-paint the dragon and make her visible.

"Good idea, but she's an incorporeal dragon and the paint won't stick."

And so on. I counter every physical test you propose with a special explanation of why it won't work.

Now, what's the difference between an invisible, incorporeal, floating dragon who spits heatless fire and no dragon at all? If there's no way to disprove my contention, no conceivable experiment that would count against it, what does it mean to say that my dragon exists? Your inability to invalidate my hypothesis is not at all the same thing as proving it true. Claims that cannot be tested, assertions immune to disproof are veridically worthless, whatever value they may have in inspiring us or in exciting our sense of wonder. What I'm asking you to do comes down to believing, in the absence of evidence, on my say-so.

The only thing you've really learned from my insistence that there's a dragon in my garage is that something funny is going on inside my head. You'd wonder, if no physical tests apply, what convinced me. The possibility that it was a dream or a hallucination would certainly enter your mind. But then, why am I taking it so seriously? Maybe I need help. At the least, maybe I've seriously underestimated human fallibility.

Imagine that, despite none of the tests being successful, you wish to be scrupulously open-minded. So you don't outright reject the notion that there's a fire-breathing dragon in my garage. You merely put it on hold. Present evidence is strongly against it, but if a new body of data emerge you're prepared to examine it and see if it convinces you. Surely it's unfair of me to be offended at not being believed; or to criticize you for being stodgy and unimaginative-- merely because you rendered the Scottish verdict of "not proved."

Imagine that things had gone otherwise. The dragon is invisible, all right, but footprints are being made in the flour as you watch. Your infrared detector reads off-scale. The spray paint reveals a jagged crest bobbing in the air before you. No matter how skeptical you might have been about the existence of dragons--to say nothing about invisible ones--you must now acknowledge that there's something here, and that in a preliminary way it's consistent with an invisible, fire-breathing dragon.

Now another scenario: Suppose it's not just me. Suppose that several people of your acquaintance, including people who you're pretty sure don't know each other, all tell you that they have dragons in their garages--but in every case the evidence is maddeningly elusive. All of us admit we're disturbed at being gripped by so odd a conviction so ill-supported by the physical evidence. None of us is a lunatic. We speculate about what it would mean if invisible dragons were really hiding out in garages all over the world, with us humans just catching on. I'd rather it not be true, I tell you. But maybe all those ancient European and Chinese myths about dragons weren't myths at all.

Gratifyingly, some dragon-size footprints in the flour are now reported. But they're never made when a skeptic is looking. An alternative explanation presents itself. On close examination it seems clear that the footprints could have been faked. Another dragon enthusiast shows up with a burnt finger and attributes it to a rare physical manifestation of the dragon's fiery breath. But again, other possibilities exist. We understand that there are other ways to burn fingers besides the breath of invisible dragons. Such "evidence" -- no matter how important the dragon advocates consider it -- is far from compelling. Once again, the only sensible approach is tentatively to reject the dragon hypothesis, to be open to future physical data, and to wonder what the cause might be that so many apparently sane and sober people share the same strange delusion.

I thought it was funny that the referring page had to point out that the dragon was a metaphor for god.