What is Artificial Intelligence?

A Blog Dedicated to Artificial Intelligence Technology & News.

Archive for the ‘Artificial Intelligence and Robotics’ Category

5 Easy Ways to Use Artificial Intelligence in Your Java Programs

Posted by William On October - 24 - 2009
Artificial-Intelligence-JAVA

Most of the electronic stuffs we use everyday are products of artificial intelligence in collaboration with electrical, mechanical and computer engineering. These things include cell phones in general, digital radios, digital clocks, car stereo or t.v., microwave ovens and more you can add to the list.

Artificial Intelligence is also responsible in making your social network sites like twitter, easy to use, even on iPhones or Droids. It is also the core concept in web research engines like google and yahoo. Added to the list are data mining technologies, and text classification and filtering.

AI is just the theory or the concept. In order for this concept to work, we need a tool to implement a systematic program that will create its interface. And this is where Java comes in. Java is a one of the most portable and easiest to write programming language. It is in fact the widely used platform of most software applications today.

So, in this article, we will discuss the 5 easy ways to use artificial intelligence with Java.

Customer Recommender System

Most often, customers depend on recommendations to make decisions. Having a large volume of information in your site, not to mention the competitor's solutions, it is important to employ collaborative filtering in your recommender system.

Collaborative filtering strains out historical search items for a specific user and then correlates them to available information in your site, thus the process predicts the user's future interests and recommends the best given option. An example implementation for this is shown here.

Intelligent Search Applications

Intelligent Search Applications

Intelligent Search Applications

Intelligent search is a process of finding relevant information from an enormous set of non-relevant information. Finding the best results from a given search keyword is a task of a full-featured text search engine library such as Apache Lucenel

The Apache Lucene is the 800 pound gorilla in the realm of open source search. It's written in 100% JAVA however it's been ported to many other languages. Here is a short example of how to use the library.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_CURRENT);
 
// Store the index in memory:
Directory directory = new RAMDirectory();
// To store an index on disk, use this instead:
//Directory directory = FSDirectory.open("/tmp/testindex");
IndexWriter iwriter = new IndexWriter(directory, analyzer, true,
    new IndexWriter.MaxFieldLength(25000));
Document doc = new Document();
String text = "This is the text to be indexed.";
doc.add(new Field("fieldname", text, Field.Store.YES,
    Field.Index.ANALYZED));
iwriter.addDocument(doc);
iwriter.close();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Now search the index:
// read-only=true
IndexSearcher isearcher = new IndexSearcher(directory, true);
// Parse a simple query that searches for "text":
QueryParser parser = new QueryParser("fieldname", analyzer);
Query query = parser.parse("text");
ScoreDoc[] hits = isearcher.search(query, null, 1000).scoreDocs;
assertEquals(1, hits.length);
// Iterate through the results:
for (int i = 0; i < hits.length; i++) {
  Document hitDoc = isearcher.doc(hits[i].doc);
  assertEquals("This is text to be indexed.", hitDoc.get("fieldname"));
}
isearcher.close();
directory.close();

Text Processing

Probably the most widely used computer application is text processing. Text processing is the manipulation of letters, words or phrases and even sentences and paragraphs. This process is performed by text processors such as your Microsoft Word, Lotus Notes etc. We do text editing of all sorts which may come handy depending on the type of document we are working on.

Text Document Classification

Text Document Classification

Text processing is enabled by text editor programs developed in JavaScript/ECMAScript,which is higly customizable. An example of a text editor program is JTextPro. A Java-based Text Processing tool that includes sentence boundary detection (using maximum entropy classifier), word tokenization (following Penn conventions), part-of-speech tagging (using CRFTagger), and phrase chunking (using CRFChunker).

A desirable feature of a word processing application is to change the case of a word, sentence or entire document. This sample application shows you, how to implement the different cases known from Microsoft Word in TX Text Control ActiveX. We are going to implement the following case changes:

* UPPER CASE

* lower case

* Title Case

* tOgGlE cAsE

* Sentence case.

Click here to see a snippet code for this implementation.

Text Document Classification

Document classification is the partitioning of unstructured sets of documents into groups that describe the contents of the documents. There are two main variants of document classification: text clustering and text categorization. The first is concerned with finding a static group structure in the set of documents, while the second (also known as text classification) can be seen as the task of structuring the repository of documents according to a group structure that is known in advance. For our discussion, let's focus on text classification.

Data can be classified according to any criteria, not only relative importance or frequency of use. For example, data can be broken down according to its topical content, file type, operating platform, average file size in megabytes or gigabytes etc. A well-constructed data classification system makes essential data easy to find.

Naive Bayesian Network is one best way to implement text classification. A naive Bayes classifier is a simple probabilistic classifier based on applying Bayes' theorem (from Bayesian statistics) with strong (naive) independence assumptions. In simple terms, a naive Bayes classifier assumes that the presence (or absence) of a particular feature of a class is unrelated to the presence (or absence) of any other feature. Here is a worked example of naive Bayesian classification to the document classification problem.

If you find this interesting, here is a sample code for the naive bayes classifier using Lucene.

Data Mining

Data mining "is a process for finding patterns and relationships in the data". This process is then used to classify users text or document into an information relevant to profiling practices, such as marketing, surveillance, fraud detection and scientific discovery.

Data mining commonly involves four classes of task, classification, clustering, regression and association rule learning. Please refer to "Text Classification" section for Classification and clustering. Regression attempts to find a function which models the data with the least error. A common method is to use Genetic Programming. Finally, association rule learning searches for relationships between variables. For example a supermarket might gather data of what each customer buys. Using association rule learning, the supermarket can work out what products are frequently bought together, which is useful for marketing purposes. This is sometimes referred to as "market basket analysis".

Refer to this link for in-depth discussion on this topic.

CYCLOPS: A Rover for the Blind with Artificial Retina Implant

Posted by William On October - 21 - 2009
CYCLOPS - a mobile robotic platform, or rover designed to emulate what the blind can see

CYCLOPS - a mobile robotic platform, or rover designed to emulate what the blind can see

The blind can see! Thanks to the researchers at California Institute of Technology (Caltech) who have created a remote-controlled robot that is able to simulate the "visual" experience of a blind person who has been implanted with a visual prosthesis, such as an artificial retina.

This artificial retina or retinal prosthesis captures the image from the environment, it is then processed and passed along the implanted silicon chip's electrode array. The chip directly stimulates the eye's functional retinal ganglion cells, which carry the image information to the vision centers in the brain.

The mobile robotic platform or rover, a.k.a. Cyclops, is the first such device to emulate what the blind can see with an implant, says Wolfgang Fink, a visiting professor in physics at Caltech. Cyclops is equipped with a gimballed camera, four-rubberized grooved wheels and a computing platform which contains the algorithms to process the captured images. Though for now it is operated locally by a joystick, it is hoped that this approach may one day give blind persons the freedom of independent mobility.

Click here to read the full "CYCLOPS: A Rover for the Blind with Artificial Retina Implant" article.

What is Artificial Intelligence?

Posted by William On August - 28 - 2009

So you may be wondering just what is artificial intelligence? Many people think of AI and relate it to movies about robots traveling through time, killing people, or other outlandish tales.

What is Artificial Intelligence

What is Artificial Intelligence?

One of the best movies that perhaps relates to AI, especially in the relatively near future would have to be the actual movie A.I. This describes a whole generation of androids that think for themselves, and some not even knowing they were robots in the first place.

If you type 'what is artificial intelligence' into a search engine on the computer you will be bombarded with so much scientific information you may have your own system overload. There is talk about the brain, and intelligence, and computers. It is greatly overwhelming and hard to understand most of it. It takes time and creative thinking to find information that you can relate too.

What is artificial intelligence?

Put simply it's the study of programming software to make computers and other items smarter. It also means that programming software to learn from mistakes, or errors and fix them automatically.

Making computers learn on their own is much less time consuming than having to reprogram it all the time. Robots too have learning capabilities as well. Using censers, cameras, and other kinds of information gathering, they can perform a wide range of different motions, including being able to walk up stairs, dance, and interact with people.

"Put simply it's the study of programming software to make computers and other items smarter."

What is artificial intelligence? Well you can see it in action every day. It started out teaching strategy games to computers, like chess. The basic principles of the game were programmed in, as well as what each pieces movements were. As people play against the computer, it learns from your techniques and using that knowledge calculates the best way to beat you.

It can also use what it learns to predict what possible moves you may make, and adjusts strategies accordingly, often calculating many moves ahead. With the human factor, sometimes we do things that are unpredictable, and so if you make a move that wasn't predicted by the computer, it will extrapolate accordingly.

When we play on gaming stations against the computer, this is a form of artificial intelligence as well. With the newer gaming platforms the computer brain uses knowledge programmed into it to act accordingly to your moves, and tries different ways to defeat you, or to help you out. Signals sent from the controller are relayed to the gaming brain and is translated into movement, shooting, etc.

What is artificial intelligence? Making computers and other devices smarter, faster and using your input to do things that make life easier.

You see artificial intelligence in a variety of applications, from smart appliances that will automatically save electricity, to a whole house wired to turn lights on automatically when you enter a room, and turning them off when you leave. Refrigerators than can sense when you are getting low on something and reminds you using a monitor and key pad on the outside of the door.

"You see artificial intelligence in a variety of applications..."

Coffee makers and other small appliances often have small computers in them that can turn on automatically at a certain time, and have your coffee ready for you when you get up.

The field of artificial intelligence is growing by leaps and bounds. If you have the skills and knowledge, it is possible to get into one of these exciting careers.

You will have a hand at new breakthroughs in robotic sciences, for consumer or military applications, as well as medical and manufacturing technologies. There is a wide array of opportunities that can await you, but will not wait for you.

You can find out more information through the internet, but as I said before, make sure you type in exactly what you're looking for, or you may get more than you bargained for.

You can find out what is artificial intelligence and how it works for you, find a job in this field, and even buy 'smart' products the make daily activities easier to do. There are assortments of robots that you can buy, from small figures that can interact with you, to smart vacuums that can pick up around the house by themselves.

The Future of Artificial Intelligence

Posted by William On August - 27 - 2009

It's quite possible that the future of artificial intelligence is here. And if it is, as some in the know are coming to believe, then it is called HTM, or Hierarchical Temporal Memory.

The Future of Artificial Intelligence

The Future of Artificial Intelligence

HTM is a machine learning model developed by Jeff Hawkins and Dileep George of Numenta, Inc. Jeff Hawkins is an engineer, entrepreneur, and author of the 2004 published book about A.I. titled On Intelligence 0.

Dileep George is a former electrical engineering graduate student who was working part-time at the Redwood Neuro-Science Institute, a small think tank founded by Hawkins in 2002 (it's now part of UC Berkeley). At the same time he was working at the Institute he was looking for a PhD topic about the brain and decided he wanted to team up with Hawkins.

The possible future of artificial intelligence is based on a key insight that Hawkins had in the classic "Eureka" moment back in his UC Berkeley PhD study days. As he pondered the question of how he would react if a blue coffee cup were to quite suddenly materialize on his desk it came to him.

Hawkins' insight may hold the key to the future of artificial intelligence development: that all former A.I. models and theories eventually crumbled or came up against impassable walls because they did not grasp the core fact that the human brain's capacity is centrally based on predicting the future; both the immediate future and the far-flung future.

"...all former A.I. models and theories eventually crumbled.... because they did not grasp the core fact that the human brain's capacity is centrally based on predicting the future"

Hawkins is completely fascinated by the concept that "when you are born, you know nothing," and he and George have begun creating and expanding a software platform that transfers this principle to artificial intelligence design: when it's "born", it knows nothing. But, like human brains, this A.I. will have "instincts"--the human-programmed protocols for learning.

HTM is the likely future of artificial intelligence because with this platform, an A.I. must create memories from sensory input, learn from experience, and then use those remembered and processed experiences to make predictions about the future.

This goes right down to the basics of recognizing what an object is from only obscured, partial, or distorted sensory data--something that human beings take doing for granted--but which the world's chess champion computer program would hopelessly fail at.

Just as a little tiny infant begins doing instinctively from the second it emerges from the womb, such an A.I. grows itself--it starts from knowing nothing and learns from having and then assimilating experiences.

Future of Artificial Intelligence

Future of Artificial Intelligence

HTM programming rests on the core concept of hierachical knowing. This practical insight comes from the observation that the human brain's neocortex--the top layer of our three layers of gray matter--makes up at least 60% of the human brain by itself.

Almost all higher level insights and calculations, such as Hawkins' own revelation about the basic structure of human intelligence, are made within the neocortex. Fun Fact: Humans is the largest neocortex, and takes up the highest percentage, of that of any mammal on earth... by far.

The future of artificial intelligence will be built upon something out of the ancient past: the pyramid. This means that A.I. "neurons" are arranged hierarchically, which Hawkins, backed up by a great deal of neurological research, presumes to be the situation with human brains. Lower-level neurons are like those which receive the basic sensory input from, say, a musical instrument.

These tones are first picked up by the ear, then interpreted by those lower-level neurons, which process information about them and then kick them up to mid-level neurons. The mid-level neurons then follow suit but with higher processing, and then kick them up to the top.

Then the top makes the ultimate processing and then translates signals about those stimulations back down to the low-level neurons, "teaching" them like a "more experienced" guide or mentor. Just as there are fewer geniuses than average-intelligence human beings, so there are fewer higher-level neurons than mid-level or lower-level neurons. The future of artificial intelligence is hierachical in structure, just like human brains, just like human society.

"The future of artificial intelligence is hierachical in structure, just like human brains, just like human society."

It was George, over the course of several weekends, who constructed the original basic, elemental A.I. model of the process used in the human visual cortex. The usual modeling of a program is linear; it processes data and makes calculations in just one direction.

George then created multiple, parallel layers of nodes, with each node embodying thousands of neurons in cortical columns and each in and of itself a tiny computer program with a unique ability for processing information, remembering patterns, and making predictions.

Hawkins' company Numenta has been at work with Edsa Micro. Adib Nasle, Edsa's president, says of HTM-based A.I., "We've seen some incredible speed improvements. Some approaches, you give too many examples and they get dumber. HTM seems not to suffer from that. It's pretty impressive."

The most likely future of artificial intelligence 0 is pretty impressive, indeed.

Artificial Intelligence and Robotics

Posted by William On August - 26 - 2009

Artificial Intelligence and Socks in a Galaxy Far, Far Away Dook Skywacker gazed up from the puddle he had just tripped into. “R3D4-I require you to fetch me some dry socks from the space shuttle,” the Heroic Cosmo Knight commanded. So, the brave robot began to do its required job.

Artificial Intelligence and Robotics

Artificial Intelligence and Robotics

If only it were that simple! However, in the true world of artificial intelligence, even an easy job like fetching a couple of dry socks from the hold of a space shuttle is filled with unintentional risk.

Because beyond the stage of a space program, real robots have trouble with the types of principles, even a two year old would find very simple to understand. The appearance of artificial intelligence is that it is not truly intelligence as we see it.

A person’s brain is not only clever-it is clever in an extremely particular way. Even though a computer can add millions of calculations per second, a person’s brain can use logic to solve problems that no computer can.

The reason for this is that true intelligence is created to make leaps of relation and intuition that are very hard to note into the types of algorithms a computer can comprehend. One of the best methods to get this is to examine an easy problem, such as R3 getting Dook Skywacker a pair of dry socks.

The Intelligent Agent

One of the biggest aspects of an artificial intelligence is the capability to be an intelligent agent. What an intelligent agent is is an artificial intelligence that is able to take in its surroundings and can decide what it must do within that surrounding to accomplish its goal.

This is not very easy at first. For instance, the action of being aware of the surroundings is much harder for a computer than it is for a living being. Even though the only sense used to perceive this is sight.

Machine Vision

Now R3D4 must find the socks in Skywacker’s space shuttle. The first issue is that its cameras do not work in the same way as Skywacker’s eyes. A PC’s “eyes” - are also called a machine vision system, need:

Robotics AI - Machine Vision

Robotics AI - Machine Vision

1) Cameras (digital or analog), with the capability to keep images. One camera will suffice -if you add two for binocular sight, it will make the situation more complex.

2) Exceptional light sources. The reason for this is that PC networks are very selective about sensing light in particular ways. If, for instance, soft light makes a red sock appear black, a machine vision system might experience a breakdown immediately.

3) Programs in which to handle pertinent features of the perceived item. This is far more difficult than it sounds; a computer must keep a matching image of the item being regarded, or it will not recognize it, because computer neural networks cannot conclude an object’s class from just generally view it.

Class Inference

All is good so far. However let us pause a while and discuss necessity number three. Where Dook’s eyes look at an entire image and instantly understand it as an object, SOCK, R3’s camera views the sock as a bunch of pixels. It will have to put those pixels together into one image, and then transpose that combination of pixels into an image it recognized as being a sock. Sound easy? Not likely.

R3 might have a photo of a sock in its memory storage. However, it is just that single photo. What if the sock in its memory is red and not blue? R3 will not see it because it does not match the photo. What if the sock in the memory is not folded and Dook’s sock has been nicely rolled up by faithful Princess Cinabuns? Again, R3 will not see the sock because it does not match the photo.

Pattern Recognition

How is Dook able to recognize the sock no matter what it may look like? It is because Dook is able to make assumptions about the sock. He has a mental image of what “sockness” means in his mind. All he has to do is search for defining signs such as L-shapes, tubular shapes, made of cloth, one side open, and he can also designate his rolled up red socks to the “sock” column.

"Pattern recognition is one of the largest walls to building true artificially intelligent robots."

This is termed, as “pattern recognition” Pattern recognition is one of the largest walls to building true artificially intelligent robots. Pattern recognition is the capability to put together that mental image of an item or surrounding from several cues that the item gives.

Pattern recognition is a very difficult program because every solitary pattern has several elements that can alter the pattern’s cues. To the exact mind of a computer, a sock being in shadow can completely alter the nature of the sock’s pattern.

However, to a human mind, the distinction of shading easily becomes reassigned to the column of “shade” with the inherited idea that items in shade are darker than items in light. (As a funny side remark, this type of thinking is known as “fuzzy logic.”)

Cognitive Architecture

To enable R3 to locate Dook’s sock will take an exceptional type of programming, a type of neutral net that is known as cognitive architecture. A subsidiary of the concept of intelligent agents, cognitive architecture is developed by situating many types of “thinking” programs into one bigger control program. For instance, one section of R3’s cognitive architecture must include the concept of visual states, such as the concept that light can influence the visual pattern of an item.

This program would view the general light given off in an area and would be able to tell whether a shadow was there. Another section of the CA program must recognize what theoretical characteristics determine what is “sockness.”

"... cognitive architecture is developed by situating many types of “thinking” programs into one bigger control program."

This section of the CA would search for characteristics of texture, tubes, open ends, and common L shapes. If the item being looked at has enough of those characteristics, R3’s neural net would be able to declare, “Hmmm. This matches the criteria of what determines a sock,” it can then categorize that item as a sock.

Finally, R3’s cognitive architecture must know how to test that so called “sock” against the data that it has kept on socks. For instance, the same elementary characteristics of sockness (rough texture, tube with L shape, open mouth) can as well be used to describe a snake.

Think of Dook’s shock when R3 comes with a ten-foot python back to the puddle. As a human, Dook is aware of methods to test his hypothesis; if the “sock” slithers and hisses, it is most likely not a sock.

As well, R3 will require a section of his intelligent agent program that can test items, gaining further information that can clarify whether it carrying a boa constrictor, or an argyle.

Similar to the way a baby shoves stuff into its mouth, R3 will require ways of experimenting with items in its surroundings, and gaining knowledge from experience that any “sock” that has sharp teeth and hisses is likely not a good selection.

Will Dook don a cozy pair of pythons? Not likely, however he might want his trusty laser sword nearby when R3 comes back with the dry pair has asked for. Nevertheless, as we have shown here, even an easy job like getting a pair of socks can be a very trying task when artificial intelligence and robotics mix.

For the near future, it appears as though the service of our handy robot friend will be restricted to the factory area and the laboratory, where the elements of machine vision, cognitive architecture, and pattern recognition are better harnessed.

Eventually perhaps, R3 will be clever enough to tell a pair of socks from a snake, however for the moment, Dook Skywacker will have to march to the ship and fetch his own dry socks.

About Me

I am a computer programmer that loves technology, gadgets, making & learning new stuff. I love to read & basically to figure crap out.

Twitter

    Photos

    BrainNuronFormulaBulbBulbsBeachComputerBrainCollaborative-filtering-and-AIBinaryOrangeBinaryBlueBrainNetworkBinaryBlueBrainBinaryFunnel