Archive for computer science

Presence in Virtual Worlds

There have been a lot of experiments conducted to establish how much people feel “present” in virtual words. Loosely, this is usually defined as how much a person reacts to the virtual objects as if they were real (this paper (pdf) gives a good sense of it in its first paragraph). One of my friends in a 3d virtual environment recently wanted to sit on a chair. He’d been so taken in by the quality of the illusion that for a moment he treated the virtual chair as if it actually could support his weight. This is presence, and it’s the zenith of what we aspire to.

Actually, I don’t think it is. I don’t have a nebulous feeling of ‘presence’ in VR, but then I don’t when I’m in a shop, or at work, and sometimes I specifically feel unpresent in the real world. If I’ve been reading a good book, I feel that I’m more in its world than in this one. I think that almost all of these experiments suffer from a way of thinking that almost negates what the experimenters themselves are hoping for. They all start from the assumption that the virtual world is not real, and there’s a difference between it and the real world.

In fact, when I’m in a new environment, real or virtual, I treat it the same. I explore, I try to work out the rules of this new space. I experiment. If I find that the chair in this environment is insubstantial and I can pass my hand right through it, I don’t think that the chair somehow isn’t real, I simply realise that it’s a new kind of real chair, a chair I can’t sit on. I’d be the same in reality if someone gave me an insubstantial chair.

Nobody reacts in a 3d environment as if they are simply being shown patterns of projected colours, just like nobody treats the TV they’re watching Schindlers List on as if it’s just a mesh of colours, or for that matter - nobody treats a book as a bunch of squiggles on sheets. Art is a virtual reality that we explore, experience and decode. In neither simulators nor the walking around world do we experience unfiltered reality. What we experience are the concepts that our environment suggests to us.

There’s no question in my mind that Crayola land, where some of my other friends taunted crudely drawn ducks, or the library, where I was briefly menaced by a ghost child while books flew around are real places. They are just spaces with different rules to spaces I’m used to, and spaces where the assumptions I’m used to don’t always hold. We spend a lot of our lives, particularly when we’re young, working out what is real and what isn’t, and it’s exhilarating to be in that place of possibilities. Reality is a puzzle, and we love to try to solve it.

One of the presence experiments that has been carried out many times is the Pit experiment (pdf). People are asked to conduct a simple task in the virtual environment, and then relatively suddenly are confronted with a huge hole in the floor. Physiological measures show that their heart rate goes up, and their skin conductance changes. Is it Presence? Have people responded to the ‘virtual pit’ in the same way as they would to a ‘real pit’?

The Pit Experiment

I don’t think so, even though when I was there, I nearly lost my balance stepping out over it. (Did me talking about it as if it was really ‘there’ bother you?) I responded to it exactly as I would respond to a real pit - that I knew I couldn’t fall into, but that’s because it was a real pit that I knew I couldn’t fall into. There’s a difference between a ‘real pit’, which contains the notion of something you can fall into and a real pit that you can’t fall into. I’ve jumped out of an airplane, strapped into a parachute, knowing I was completely safe, but that doesn’t mean my heart rate didn’t go up. I responded to it not as I would respond to a real fall, but as I would respond to a real fall where I was safe - a virtual fall.

Of course, it’s difficult to run the experiments to prove this - you’d have to have an insubstantial chair to give me (and how would you carry it?), or run an experiment with a pit that people couldn’t fall into (perhaps using wires?) and compare it with a pit that they really could fall into. It’s difficult to get ethics approval for truly potentially life threatening experiments, even to try to establish a baseline.

And here we find some of the more interesting brand of presence experiments in virtual worlds. Doing experiments virtually that are too unethical to do in the real world. There’s the famous Milgram experiment for example, difficult to get approval for these days, but the virtual version is fine (I think it should be a compulsory part of education to watch the video of some of the 35% of people refusing to give the shocks in the original experiment. It’s inspiring). I saw an experiment where a virtual woman chatted up men, some of whom found her attractive and felt guilty with who knows what effects on the long term health of their relationships. The Millgram experiment is not ethically challenging because of its effect on the actor who is pretending to be shocked, it’s ethically challenging because of its effect on the participants. If people do respond in the same way to the virtual one as they do to the real one, then it’s just as unethical. There is nothing more or less real in the Virtual Milgram experiment than in the “real” one.

In some ways it’s more disturbing. Just like the man in a relationship who wondered if he was a freak because he found himself fancying a virtual woman, it is challenging to our sense of what it means to be human to discover our emotions and cherished empathy responses can be tricked and played so easily. And perhaps this is where the most interesting work is, searching the psyche for what makes us tick, because after all, finding out how we respond to what is inside our own and other peoples heads is even more important than finding out how we respond to various forms of the outside world.

That is Easy, but It Will Still Take You a Full Week To Do.

I used to program BASIC V on the Archimedes, and you could at any time drop into assembly and out again, within the BASIC program. I want to be able to do the same thing in Eclipse with java.

I should be able to specify @lang for each method/class/package. Ruby, Groovy, Nice, Scheme, Visual Basic, BASIC, Lisp, Prolog, Smalltalk, Ada, Javascript, BeanShell, Python, Assembly are all available in ways that compile to the JVM, so why can’t I say “I want to implement this method in Scheme, and this other method in Nice, and this other method in assembly” within the same class?

This should be transparent, with all code highlighting, refactoring tools, javadoc, etc, available.

When native code has to be called, this is something else that should be straightforward. I should just be able to specifiy language C or C++ in the same way as all these others, and it should do everything it needs to automatically. Why should I have to fiddle with build scripts or header generators? Mindless repetitive tasks are things that computers are supposed to be good at.

During debug, I want to see an object graph of the whole system that I can drill down through and edit the state of (the whole time it’s running, not just at breakpoints), and have a console window, with all scripting languages available to manipulate the system.

Eclipse seems to spend half of the time I use it recompiling projects. Sometimes when it doesn’t need to. It loves to randomly pause in the middle of something and leave me stuck for ages. It’s just way too slow for large projects.

And why, when I create servlets, do I have to edit interminable xml, and wait for hours while simple changes are deployed here and there. The amount of configuration you have to do to create a HelloWorld servlet that talks to a database is utterly crazy. The amount of time I’ve spent waiting for eclipse to redeploy a servlet on every tiny change is bizarre.

It seems that java, with its myriad libraries, and IDEs, makes everything easy, but nothing trivial. No wonder people are jumping ship to more dynamic languages.

Contrast this with Ruby on Rails, or even .Net. Just put [webmethod] in front of your normal c# method declaration and drop the file into the web server, and suddenly you’ve got a SOAP service and a form to test it. It’s so easy.

As I read in a Perl book once, simple things should be simple.

Comments (1)

Interesting Lives Are A Waste Of Space

Well, you know, some people lead pretty interesting lives, and maybe it would be nice to experience their experiences or to record everything], not just node]the odd thing. How much space would it take to fit an entire human life on a hard drive?

In 1986, T. K. Landauer did a study that estimated that people only take in and remember about 1 byte per second. At that rate, assuming an 80 year life span, you’d only need 80 x 365.25 x 24 x 60 x 60 bytes or a 2.4 gigabyte harddrive to store your entire life experiences.

That seems a bit low to me, so I thought, what about if you wanted to store everything the nervous system receives, not just what it remembers, or just the stuff that gets to the brain, but everything, so that if you rigged someone up to a replay device they would have exactly the same experiences for their entire life.

By current estimates, there are approximately 380 million receptors in the human body. These are just the neurons that take something from the outside world and turn it into a signal that can go into the nervous system.

Usefully enough, these receptors, although they fire many peaks when excited are only on or off, so the analog to digital conversion is as simple as you can get - only 1 bit is needed per receptor.

The next task was to decide on a sample rate for the life dump recording. The sample rate should be high enough so that two stimuli in quick succession that the body can tell apart would appear as two stimuli in the life dump. The receptors can only fire at a maximum of 1200 Hz. Initially I thought that I would use this figure as the sample rate but then I realised, although this is the maximum firing rate, the receptors can fire at different times – they aren’t clocked synchronously at 1200 Hz. The figure I really need is the smallest time interval that two stimuli can happen together for the biological system to perceive them as two separate events. It’s kind of a resolution in time. Bear in mind the auditory system can distinguish between sounds even near the 10kHz mark.

The figure that I decided to use in the end was the transduction time in visual receptors, taking this as an average across the whole body (seems reasonable, approximately 70% of all receptors are visual ones anyway). The transduction time is the time it takes for the receptor to turn an external signal (heat/light/pressure) into a physiological one, so I figure this is plenty quick enough. It’s probably a lot faster than I need, but it’s the best figure I’ve got so I’m going to use it. The visual transduction time is about 6 femtoseconds or 6×10-15 seconds, which gives us a sample rate of 1/6 femto seconds or 1.7×1011kHz.

Now multiplying those values together gives us the number of bits per second we need.

380×106 (receptors) x 1 (bit per receptor) x 1.71011kHz (sample rate)

which is 7.4 zettabytes per second. That’s about 1470 million times as big as google cache. Too big you say? Well according to one estimate, there will be 1 zettabyte of information on the world wide web by 2010.

Well lets work out the figure for an 80 year life. 7.4 zettabytes s-1 x 80 x 365.25 x 24 x 60 x 60 = 18 700 000 000 zettabytes for a lifedump.

Bearing in mind the kind of data, I think I can safely say we would expect to get some pretty fantastic compression rates on it, but even without compression I reckon we’ll have the kind of storage necessary to make a life dump within 150 years.

Please contact me if you can improve this calculation in any way - I’d particularly appreciate a better figure for temporal resolution in receptors.

First published on everything2.com (hence the linking) under the name delfick.

Halting dog problem

Here is the story of how I discovered that if you believe in psychic dogs, you must be barking

Ok, I’ve got a bunch of dogs that bark. Now these dogs aren’t just any dogs, oh no, they’re pretty clever. So, I’ve got a dog (rex) that barks at cats, and a dog (gnasher) that barks at fish, and a dog (fido) that barks at black things, a dog (pig) that barks at white things and some others. But am I happy? No. I want more!

One day, I start playing with a mirror. Most of the dogs look in the mirror and aren’t even remotely interested, but my dog that barks at black things (fido) happens to be black, so when he looks in a mirror, he goes off on one. Some of the other dogs bark at themselves in the mirror as well.

Unfortunately, my mirror is one of those full length ones on the front of a wardrobe, so whenever I want to play with the mirror and the dogs I have to carry the whole wardrobe downstairs (the dogs aren’t allowed upstairs).

So, I think for sometime, and I come up with a plan. I spend months training an amazing psychic dog (meg), which barks if it sees a dog that will bark at itself. This makes it a bit easier, as I don’t need to cart the wardrobe around anymore, meg barks at fido, but not at gnasher, so I can take meg around with me instead of going to all that furniture movement effort.

One day, just for fun, I retrain Meg to bark at the opposite of what she used to bark at. This is fairly easy - she’s pretty intelligent. Now, she barks at dogs that won’t bark at themselves in a mirror. She barks at gnasher now but not at fido anymore.

So everything was fine, until one day, in contravention of the rules, Meg went upstairs and looked in the mirror…



First published on everything2 (hence the linking style) under the name delfick, with the title “Halting Dog Problem”