Sunday, July 31, 2005

The Mechanism of Human Consciousness picked up an article from The Economist about a possible breakthrough in the search for the neural correlate of consciousness.

In his latest (and final) published paper, Francis Crick (the late co-discoverer of DNA) speculates that the neurological basis of human consciousness is the claustrum, a thin layer of gray matter with two-way connections to every region of the cortex. It is possible that the claustrum is responsible for processing all of the various inputs from different parts of the brain to create a "cohesive, conscious experience." If research demonstrates this conclusion to be true, it will unequivocally prove the Materialist view that consciousness is merely a product of a physical system, and therefore can be artificially reproduced by mechanical means.

Rise of the Machine

I finally got around to reading a futuristic Wired article pointed out on Slashdot.

The bulk of the article is a retrospective look at how people have thought about and used the Internet. The really interesting part, however, begins with the last few paragraphs of page 4. While the Slashdot crowd focused on the prediction of a web-based OS and its ability to heal itself, the truly remarkable forecast is the emergence of real artificial intelligence from the net itself. The author recognizes that this "planet-sized computer" is as complex as the human brain, and is growing exponentially. It has already exceeded the "20-petahertz threshold for potential intelligence" proposed by Ray Kurzweil. Our participation in and behavior on the world-wide web might provide this being with the knowledge and programming necessary for consciousness to evolve. In the very near future the human race may be presented with a global network that has become self-aware.

Skynet anyone?

Thursday, July 28, 2005

A Formal Framework for Conceptual-Level Cognition Based on Objectivist Epistemology

I've been doing a lot of research into Objectivist Philosophy lately, and its given me a lot to think about. I've studied philosophy pretty intensely over the past 5 years (including a year at Oxford), and I don't understand how this could have escaped my attention for so long. I think I may have finally found something that encompasses most of the conclusions I've arrived at regarding reality and the existence. If you want to understand my personal view of the universe, Objectivism is unquestionably the perfect place to start. This website, however, is not a 'philosophy blog,' so I will quickly move along to my point.

One component of this philosophy, namely Objectivist Epistemology (the nature of knowledge), has led me to an idea for an internal conceptual model of a conscious machine. This system of knowledge representation would closely mirror the Objectivist structure of concepts and instances. Simply put, Objectivism contends that the senses are the only source of valid information, that 'reasoning' is nothing more than the classification & organization of the information provided by sensory perception, and that consciousness is the act of transforming that information into a system of concepts and propositions consisting of knowledge about the world. A conscious mind creates concepts by identifying and generalizing similar characteristics of things it encounters through the senses. Once a concept has been formed, an unlimited number of instances of that concept can be recognized by the agent.

This framework immediately reminded me of object-oriented programming, with concepts acting as classes and instances as objects. Just as a programmer can construct an unlimited number of objects once its class has been defined, a conscious mind can recognize endless instances of 'airplane' once the concept of 'airplane' has been properly formulated. The key is to identify the relevant characteristics that define the concept (man-made machine, has wings, enables flight), and to recognize those characteristics in similar phenomena.

We could implement this framework in a machine using these steps:

1. Define the machine's sensory perception. How will it observe the world? Will it have eyes? ears? tactile sensors? The limits of its perception will directly affect the scope of the machine's conceptualization.

2. Construct the mechanisms for input/output. Connect the cameras and microphones that serve as eyes and ears, and provide the machine with some method to interact with or otherwise manipulate its environment.

3. Formulate the aforementioned conceptual framework. Write the software that controls the operation of these devices, analyses the data they collect, and classifies & organizes the information accordingly.

4. Release into the environment. Allow the machine to observe and interact with its surroundings, building concepts and collecting knowledge about whatever it can discover.

For example, a machine designed with these capabilities might one day encounter what we would recognize as an 'airplane.' First, the machine would compare this object to its memory files to see if it had encountered something similar before. Failing that, it would make note of the distinguishing characteristics of the object and assign it an arbitrary identifier. Later on, when confronted with another instance of an 'airplane,' the machine would recognize distinct similarities between this object and the unidentified one in its memory, and would construct a concept of 'airplane' based on the obvious relationships between them.

This framework doesn't solve some of the major challenges of artificial intelligence like pattern recognition, machine vision or natural language understanding, but it does provide us with a system to integrate these systems once they are accomplished. And it wouldn't do much good starting from scratch. This agent would require some background information, a 'seed of knowledge' if you will, in order to get up and running. Even if this included things as (relatively) simple as language skills or a basic means of communication, designers will need to provide the machine with a small amount of starting information in order to 'prime the pump.' Humans are born with many 'instincts;' artificial minds like these must be programmed with them. Additionally, we will need to sort out the details surrounding memory access and storage requirements for this agent to function efficiently. An intelligent system which maintains a full audiovisual record of its experiences would likely be impractical, so perhaps this is where some contextually-relevant summary software would be useful.

Tuesday, July 26, 2005

Is It Even Possible?

I was recently introduced to an intriguing speech on the plausability of conscious machines given to a club of Objectivists a few years ago.

I appreciate many of the author's positions, but am not sure what his ultimate message is. The simple fact is that we are trying to recreate consciousness when we don't even know what consciousness is! Some attribute it to the soul, which doesn't address the issue and is simply an appeal to superstition. Others argue that thought is nothing more than calculation, but that fails to account for comprehension and understanding. Even though we are unsure of the direction we are going, we continue in our endeavor to build a thinking machine. In the end, perhaps our greatest success will not be the accomplishment of that goal, but in fact that we discovered the true nature of our own consciousness along the way.

Monday, July 25, 2005

A Tiger Under the Hood

Slashdot pointed me in the direction of a article about yet another DARPA Grand Challenge team. Unlike the rest of the 40 semi-finalists, this group uses Mac OS X to control their vehicle. But it seems they stole Stanford's idea to use a VW Taureg as the platform.

Wednesday, July 20, 2005

David Beckham's Modeling Contract Safe For Now

I don't normally pay much attention to this sort of thing, but C|Net News is covering RoboCup 2005, and it looks like we've got some real progress in the field of soccer robotics. Over the next several years we might even see some of these humanoid bots achieve 100% autonomy.

Against (Artificial) Intelligence?

Kuro5hin has an interesting (if amateurish) op-ed piece critical of the entire premise of AI.

Among the main points are that AI has yet to produce anything useful (and is therefore worthless), that machine consciousness is impossible, and that we should completely discard the philosophy of mind. I, however, would I argue that hashing out the philosophical issues is essential to solving the problem of AI. Indeed, the creation of a truly conscious machine will require collaboration between brilliant individuals from several disciplines, among these being neuroscience and philosophy, in addition to computer science.

Although I disagree with the author's premise, believe his view of AI is very limited, and find his logic fundamentally flawed (tons of circular reasoning), the article is worth a look, and has stimulated a lively discussion. I particularly appreciate the comment that says if the author's logic was applied to the early days of aviation, he would have to slam "the Wright brothers because they didn't achieve supersonic flight."

Tuesday, July 19, 2005

Translating and Sorting 2D Arrays for Fun

Just a quick project update. Yesterday, I succeeded in making my probability algorithm much more efficient, vastly reducing the number of wasteful steps and minimizing the memory footprint. Then, tonight, I straightened out the sorting functionality for the results using Arrays.sort(Object[] a, Comparator c). Next up, I want to write something that will generate a 'confidence level' number to accompany the results. After that, I will clean up all the code and put it in a presentable format for you all to see... I swear!

Robotic Camel Jockeys Save Enslaved Children

C|Net News has an amusing article about camel-riding robots replacing enslaved child jockeys in the United Arab Emirates' most popular sport.

(Pictures too!) Having solved this technological challenge, the engineers are now directing their attention towards the sport of cheese rolling.

Monday, July 18, 2005

More Coverage of DARPA Grand Challenge

As was brought to my attention by Slashdot, Tom's Hardware has a nice article about some of the nuts & bolts inside a few of the competitors for the 2006 DARPA Grand Challenge coming this October. The article seems a little awkward (translated from the original German?), but has a good collection of interesting info and cool photos.

Sunday, July 17, 2005

Java: Extracting All Possible Combinations from 2D Arrays of Varying Size

Recently I was having a hell of a time trying to get a snippet of code to work. Generally speaking, it really shouldn't have been that difficult to do, but I just couldn't figure out how to straighten everything out. When faced with this sort of situation, a quick web search will often bring you to the answer, but that was not the case this time. I did eventually get the whole thing working, and offer the solution here in the hopes that no one else will have to waste as much time on this as I did!

I needed to take a 2D array of integers and create another 2D array containing every possible combination of elements from each row in the original array. Sounds simple enough, but I had to allow for varying numbers of both rows and columns in the starting array. That is, I had no idea beforehand how many rows I would get, or more importantly, how many elements would be in each row. Each row could have a different number of elements. So I could have something as simple as:

0 1
0 2

to something as complex as:

1 2 3
1 2
0 1 2 3
0 3
0 1 2 3
0 2 3
1 3

I would have to take any sort of 2D array like those and construct another 2D array with every possible combination taking one element from each row in the first array. So the first array above would yield:

0 0
1 0
0 2
1 2

and the second would start like this:

1 1 0 0 0 0 0 1 1
2 1 0 0 0 0 0 1 1
3 1 0 0 0 0 0 1 1
1 2 0 0 0 0 0 1 1
2 2 0 0 0 0 0 1 1
3 2 0 0 0 0 0 1 1
1 1 0 1 0 0 0 1 1
2 1 0 1 0 0 0 1 1
3 1 0 1 0 0 0 1 1
and so on...

I could have gone the easy route and assumed each row in the original array was equal in length to the longest row, but that really wasn't correct for my application, plus it would result in many, many wasted steps. To make things more efficient, I needed to process only the possible combinations. So this is how I eventually got it all to work:

First thing I needed to do was calculate how many possible combinations would result.

int validCombos = 1;

for (int i=0; i < my2DArray.length; i++)
    validCombos *= my2DArray[i].length;

By multiplying the all of the lengths of each row together, we get the number of possible combination we can create. You need to start the validCombos counter at 1 instead of zero because we are multiplying, not adding (and don't want to remain at zero forever!).

Next we will construct our new 2D array to contain the results.

combosArray = new int[validCombos][my2DArray.length];

This gives us a final array with as many rows as there are possible combinations, with each row taking one element from each row in the original array.

Next we'll need a counter to keep track of which combination we're working on, and an offset value to track how we're changing the element in each combination.

int combo;
int offset = 1;

Now for the main part of the algorithm. Obviously, we will need to loop through each row in the first array, and make sure we start from the first combination for each iteration.

for (int i=0; i < my2DArray.length; i++) {
    combo = 0;

We need to make sure the 'pattern' we construct stays within the confines of the total number of possible combinations, so we add this line:

while (combo < validCombos) {

We also need to loop though each element in the first array.

for (int j=0; j < my2DArray[i].length; j++) {

And we will use the offset value to determine the rate of repetition of the 'pattern' for each element.

for (int k=0; k < offset; k++) {

We'll need to add this line to make doubly sure we don't grow beyond the maximum size of our resulting array:

if (combo < validCombos) {

And here we can finally start building our combination, one element at a time. Each row in combosArray represents one combination consisting of one value from each row in the original array.

combosArray[combo][i] = my2DArray[i][j];

We also need to increment our combo counter to ensure we fill out the entire array and not just each row over and over!


Now we can add close brackets for all except the first for loop.


Finally, we need to adjust the offset value for the next element in the combination to ensure that every possible combination is created, and then we can close out the final for loop.

offset *= my2DArray[i].length;

And that's it. combosArray now contains rows representing every possible combination from the original 2D array. Print the contents and have a look if you like.

for (int i=0; i < combosArray.length; i++)
    System.out.print("[ ");
    for (int j=0; j < combosArray[i].length; j++)
        System.out.print(combosArray[i][j] + " ");

After all that I finally have something working exactly the way I need it to. Given a 2D array of varying row length, we have created another 2D array containing every possible combination taking one value from each original row, without wasting any memory space or unnecessary steps.

Now this might all be a little confusing, and not very useful unless you are working on something very similar to this, but hopefully if someone out there finds themselves in the jam I was in, they will be able make some use of it. The entire block of code is below:

int validCombos = 1;

for (int i=0; i < my2DArray.length; i++)
    validCombos *= my2DArray[i].length;

combosArray = new int[validCombos][my2DArray.length];

int combo;
int offset = 1;

for (int i=0; i < my2DArray.length; i++)
    combo = 0;
    while (combo < validCombos)
        for (int j=0; j < my2DArray[i].length; j++)
            for (int k=0; k < offset; k++)
                if (combo < validCombos)
                    combosArray[combo][i] = my2DArray[i][j];
    offset *= my2DArray[i].length;

for (int i=0; i < combosArray.length; i++)
    System.out.print("[ ");
    for (int j=0; j < combosArray[i].length; j++)
        System.out.print(combosArray[i][j] + " ");

And just in case you are wondering, this code was used to increase the efficiency of the part-of-speech tagging tool I'm working on.

Saturday, July 16, 2005

'Captain Cyborg' on the AI Threat

I stumbled across an old transcript from an Australian news program featuring an interview with British cybernetics professor Kevin Warwick (often unflatteringly referred to as 'Captain Cyborg' by The Register for his controversial beliefs and methods) concerning the threat to human supremacy posed by AI. Apparently there are a lot of people who don't put much stock in this guy, but the ideas he present are quite interesting and worth a look.

From Deep Blue to Deep Thoughts

This week I began exchanging emails with an author who is writing a series of novels based on humanity's march towards the future.

One of the major events in the story is the emergence of a conscious AI. This process is presented from the point of view of the newly conscious entity, an approach that I find to be a wonderfully intriguing and novel concept. The process of becoming self-aware from the first-person perspective is certainly uncharted waters... even we humans cannot recall how or when we first became conscious as small infants. I have often tried to imagine what subjective experience would be like for a non-human intellect, both lower orders of intelligence (animal) and higher, more developed orders. I'm sure it must be very challenging to try to capture and describe that experience using human language and concepts. The small sample included in his most recent email has made me even more eager to read the story when it is completed.

He suggests that the key to subjective experience is likely the realization that the individual is separate and distinct from the rest of the environment, and I would be inclined to agree. He referenced a pdf slideshow by Owen Holland titled Machine Consciousness and Creativity. The central theme is that it is not the 'self,' but rather the 'internal model' of the self that is the conscious entity. If this is truly the case, it would fit well with the evolutionary development of consciousness (in that the capacity to accurately model future events would provide a strategic advantage in the 'survivial of the fittest' arms race), as well as cause a shift or refocus in AI research. It would seem that a conscious mind is more of a 'universal prediction engine' as opposed to a 'universal reaction engine.' So we might say that it would be impossible for a conscious entity to know what to do in every situation (or to program a machine for every possible circumstance), so instead we have developed the ability to predict possible outcomes and act accordingly. Interestingly, it is the ability to predict outcomes and formulate courses of action which is something IBM's Deep Blue has shown a remarkable aptitude for. Not that I am suggesting that a chess program is conscious, but if a machine was developed that was able to similarly model a much broader sample of reality, we might be much closer to accomplishing that goal.

Stanford's 'Robo-Taureg' Making Progress

C|Net News has another update about another DARPA Grand Challenge participant.

Stanford University's driverless car 'Stanley' recently managed to navigate 25 miles before a human driver was forced to take control. That is certainly an improvement over previous attempts, but 'Stanley' still has a way to go in order to complete the 175-mile DARPA course and score the $2 million prize.

Friday, July 15, 2005

We Love to Hate Them

I was watching the Season 2 Premiere of Battlestar Galactica tonight, and it got me to thinking...why are conscious machines nearly always portrayed as the enemy in science fiction?

The Terminator, Agent Smith, HAL 9000, the Cylons... all bad guys. Sure, there are a few exceptions, like Data and R2D2, but the good machines are severely outnumbered. Why is that? Is it because we, as humans, are afraid of losing control to our own creations? Hollywood has had quite a bit of success playing up to this fear, and the trend continues. The new movie Stealth (in theaters July 29) features an unmanned fighter plane that goes berserk and starts killing innocent people. It seems to me that all these negative examples will cause people to be awfully apprehensive when truly intelligent AI is eventually introduced into society. If all the fictional accounts of the advancement of AI are intrinsically tied to doom and disaster, it stands to reason that the average person will naturally be prejudiced against the acceptance of intelligent machines. Just something to chew on...

Thursday, July 14, 2005

It Knows...

That's what I said to myself while working on my project tonight.

Work was really slow today, so I had some time to scrutinize the probability algorithm for my part-of-speech disambiguator. Basically, the tool I'm working on now is meant to correctly identify the part-of-speech for each word in a given phrase. When I got home and tinkered with the code a bit, I was astonished with how well it worked. The program is now analyzing all possible combinations, and reports the instance it determines is most likely to occur, based on general usage statistics.

When I realized it was doing what I hoped it would do, and the statistical formula was working properly, I was pleasantly surprised. Later on, I will combine this with other methods of semantic analysis in an attempt to determine the specifc meaning of each word in a sentence. But for now, I'm cleaning up the code a bit, and improving the performance by eliminating unnecessary steps. The algorithm is working... but its slow, with an efficiency on the order of O(4^n)! Once I speed it up and get it into a presentable format, I will make it available to download and try out.

Not exactly what you would call a 'Eureka!' moment, but I was pleased nonetheless.

Wednesday, July 13, 2005

Pink Slip for NASCAR Drivers?

C|Net News reports a Carnegie Mellon Robotic Vehicle successfully completed a 200 mile, seven hour drive, completely autonomously.

Although the course was merely 131 laps around a 1.5 mile racetrack, the duration of this event represents a significant milestone in the development of driverless vehicles. The next step will be the 2005 DARPA Grand Challenge. The Carnegie Mellon team led all participants in last year's contest, completeing 7.3 miles of the 142 mile course before getting stuck.

Tuesday, July 12, 2005

Ethics & Artificial Intelligence

Right now I'm listening to a very interesting radio talk show about the IBM 'Blue Brain' Project and the ethics of creating a conscious machine.

You can listen to the RealAudio stream here.

Fighters without Fighter Pilots

Popular Science has an in-depth article about the possible future of air combat.

It discusses the development of Unmanned Combat Aerial Vehicles (including the X-45 Stingray), their roles in future conflict, and some of the internal politics related to the project.

Monday, July 11, 2005

Let the Buyer Beware!

I came across an interesting news story today that made me think. Basically, some store in Canada accidentally sold a few copies of the new Harry Potter book more than a week before the official release date. Yawn. But what's interesting is that the book's distributor won a court injunction "barring the buyers of 'Harry Potter and the Half-Blood Prince' from disclosing the plot." Additionally, the court ordered all copies be returned to the distributor.

This means that some poor Canadian child could have walked into his local bookstore and purchased a book he'd been waiting years for, but because the corporation behind the book decided it had been accidently sold a bit too early, a court of law decreed it must be returned and the little hoser has to keep his mouth shut about the storyline. I didn't know Canadian law granted merchants the right to refuse a transaction after the fact, or could restrict the freedom of speech to preserve marketing hype.

Could this be another step towards The Right to Read?

Sunday, July 10, 2005

My First Mac

So I finally broke down and bought the Mac mini I'd been eyeing for several months now. I originally planned on buying it as soon as I returned from my trip to Mississippi, but hesitated because of the WWDC-announced migration to Intel CPUs. But since I was eager to set up my 'Media Center Mac' I decided to go ahead and get the damn thing.

I drove up to the Apple Store in the Christiana Mall because I don't like waiting for shipping and the store has a nice military discount. To get the most out of the mini as a media center computer I elected to go with the so-called 'ultimate' package. Basically that's the mini with all the options: faster CPU, more RAM, bigger hard drive, SuperDrive, Bluetooth, Airport, yada yada...

Mac mini 'Ultimate'
1.42GHz PowerPC G4
80GB Ultra ATA drive
4x SuperDrive (DVD±RW/CD-RW)
Internal Bluetooth + AirPort Extreme Card

After the discount, that came out to $795 (no sales tax in Delaware). I added an Apple Wireless Keyboard & Mouse set for about $100 more. They were also offering $100 off any printer with the purchase of a Mac, so I picked up the HP PSC 1610 All-in-One ($29 after rebate).

So far, I'm really happy with it. As I expected from Apple, it was very easy to set it up out of the box. The only difficulty I came across was getting it to look right on my Samsung 32'' DynaFlat HDTV. I had to buy a DVI cable from Best Buy on the way home ($49), but I had a hell of a time getting the settings right. Maybe it had something to do with the fact that this model HDTV is not 16:9 widescreen, but I finally got it working on 720 x 480.

Connecting it to my home network was a breeze. I transferred all of my music and photos over from my laptop into iTunes and iPhoto. I've used iTunes for Windows before and I've always liked it. iPhoto, however, feels a bit clunky to me. It won't let me organize my photos the way I want to, but maybe I'm just not familar enough with the program yet or OS X doesn't like my hierarchical way of thinking.

Since then I've been going download-crazy, grabbing tons of cool videos from and QuickTime movie trailers. Video plackback quality is excellent on the HDTV- exactly what I was hoping for.

I haven't used a Macintosh regularly since before Windows 95, and I have to say I am as impressed with OS X Tiger as I thought I would be. Finder is so fast its scary. Safari is ok, and its growing on me, but I might just have to try out Firefox for Mac. The interface is simple yet beautiful, but I'm going to have to get used to only having the one mouse button. All in all, OS X lives up to my expectations and I'm eager to tinker around with it.

All in all, the Mac mini has integrated nicely into my home theatre. I wanted to be able to watch videos, browse photos, play music and surf the web on my TV while sitting on my couch with a wireless keyboard and mouse, and the Mac mini does all these things very well. Not a bad little setup for less than $1000.

Now I just have to figure out how to watch TV and use the Mac at the same time...