Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

Search: 

  Tutorial: Breathe intelligence into Java - JavaWorld April 2001

Breathe intelligence into Java - JavaWorld April 2001

Tutorial Details:

Breathe intelligence into Java
Breathe intelligence into Java
By: By Lane W. Sharman
Making AI work in your Java programs is easier than you think
volutionary computation is crucial for the next generation of applications. Evolutionary computation is software that adds and removes methods, parameters, and iterators, as well as generally modifies the elements of an algorithm in response to a fitness test: Did algorithm i yield a better fitness result than algorithm j, where fitness is time, distance, or some other value measure? The field of evolutionary computation, while shrouded in academia, provides the gateway for writing smart, adaptive, and self-evolving Java applications. Sadly, Sun Microsystems has invested thousands of man-hours in APIs related to dashboard technology and has yet to show a serious initiative for bringing artificial intelligence (AI) into the Java mainstream. Support for such an effort would make for a tremendous step in the advancement of Java computing.
For now, I will examine the basic concepts, look at the wealth of resources, and show how I am developing a Java component in the area of security and authentication using AI technology. Making AI work in your Java programs is easier than you think.
Terminology and concepts
The framework for developing an intelligent Java component requires the application of key concepts and discerning the branches of AI:
Statement of problem
Most important, an evolved component does something intelligently. The statement of what it does, not how it does it, is the important part. In 1959 Arthur Samuel asked, "How can computers be made to do what needs to be done, without being told exactly how to do it." Establishing the tableau, "what needs to be done" is shared between the domain expert and the engineer; for example, "find all schedules that get the project done in less than n months without exceeding cost X using human resources Y and machines Z." Another example, germane to the subject of this article, "find all users who have stolen the credential of a valid user within an error rate of 10 percent."
Fitness
You will require a fitness measure for your intelligent component. There must be some standard; for example, your component must have authentication errors fewer than 0.1 percent, mean time between failure (MTBF) greater than 90 days, least amount of time, lowest cost, shortest distance, and so forth.
Training set
You should employ a training set with known values to test the fitness of your Java component. Training sets are data sets that measure known fitness against a specific instance of an algorithm undergoing evolution. The program evolves against the fitness tests where each generation of solutions improves over time (milliseconds not eons).
The training set then provides the right answers for a given individual Java instance. If the instance is wrong for many of the training set elements, it is less likely to be combined with other instances into the next generation.
A training set is sometimes provided as part of the fitness test but not always. For example, for an algorithm to evolve, it may need an external training set to check its results. For classification components, the training set tells the fitness evaluator if the classification was right or wrong.
A good training set is essential, as you project that the variables that helped to evolve the algorithm in the real world are the same variables found in the field. If not, you get a lot of false negatives and positives in the field, which I will explain further in this article.
Evolution through reproduction, crossover, and mutation
An evolving component follows the principle of natural selection, survival of the fittest. The component has to be built so it can evolve to a fit state. This entails a strategy that allows the instances of your Java component to compete against other instances, and for creating new generations of instances, which over time, are more fit than previous ones. The reproduction strategy must allow for the exploration of fitness across a wide spectrum of instance values.
In evolving an algorithm to detect credential fraud, we start with an instance population of N. Let's call this class CredentialGuardian . Then, using the training set, we instantiate 1,000 instances of CredentialGuardian as our initial population with a random weight variable vector so that each instance explores the training set differently. Each instance will add and remove iterators and method calls, and return a result set that will be measured against the training set. The fittest instance can then be combined with less-fit instances and the weight values, and other algorithm elements can be randomized to produce a new population of 1,000 instances. That new population is the offspring of the fittest algorithm. The new instance is subjected to crossover, mutation, and randomization, which are strategy elements in evolution. Thus the new population is not a clone of the fittest; rather it is a genetic offspring of the fittest elements, other algorithm elements, and randomization. Without such genetic combining, true fitness will not be found and the algorithm will get trapped in a point of local optimization without discovering the true point of fitness.
Expert rules
Expert rules is the subject of Java Specification Request (JSR) 094: Java RuleEngine. Rule engines, which are static and require human intervention to add, delete, and modify rules, are not self-evolving. They are a substitute for evolutionary computing when the problem is small in nature and the rules are not interdependent. Of course, rule sets can evolve genetically. Expert rules impose a hard-wired condition upon an algorithm. For example:
if (credential.domain.equalsIgnoreCase("itworld.com"))
break;
Expert rules are therefore orthogonal to evolutionary computing. Logic decisions superimposed by an expert preclude the discovery of rare or obscure solutions within the total search space, which evolution tends to examine.
Neural networks
A neural network is a popular mathematical model with a number of variants for producing an output, discrete or continuous, from multiple inputs that often share no linear relationship. Neural Networks: A Comprehensive Foundation is an excellent and readable primer on this subject. Neural networks consist of nodes, weights, and layers. To obtain these values, a neural network itself is often subject to genetic evolution to produce a fit neural net.
Figure 1 depicts a neural net with five inputs, two internal processing layers, and two outputs. Thus, the modeler felt that the problem could be solved with an input vector consisting of five variables and an output vector consisting of two outputs.
Figure 1. A neural net
Every processing node in a neural net consists of multiple inputs x(1), ..., x(n), weighing values for those inputs w(1), ..., w(n), and an output value that, depending on the inputs and weights, can be a discrete or continuous value. This value can, in turn, be an input to one or more nodes or it can be a "result" value of the neural net itself. Figure 2 illustrates this process:
Figure 2. A processing node of a neural net
Genetic algorithms
A genetic algorithm (GA) includes any algorithm that derives its behavior from the evolutionary pattern of natural selection, fitness, reproduction, crossover, mutation, randomization, life, and death.
A GA in Java is an algorithm that reproduces new code from existing code using crossover, randomization, and selection against a fitness model. At my company, we have filed a patent to detect the theft of userid and password. Our GA to implement evolution might look like the following code segment:
// start with an initial generation, result container
int generation = 0;
Vector results = new Vector();
// create an instance of the interface
// which implements the evolution signature
// methods allowing evolution of a populations
Evolutionary evolution =
(Evolutionary) Class.forName("org.opendoors.security.EvolvingSecurityScreener").newInstance();
// create an initial population of evolvable instances
// implementing the evolvable pattern.
Evolvable[] population = evolution.createPopulation(t);
while (! evolution.isOptimal(results)) {
Fitness fitness = evolution.evaluate(population, generation);
// add the fitness element which is a composite object, not just a value:
results.addElement(fitness);
// increase the generation
generation++;
// select parents from the population according to fitness, generation
Evolvable[] parents = evolution.selectParents(population, fitness, generation);
// recombine the parents using fitness, generation as variables
evolution.recombine(parents, fitness, generation);
// mutate the population of parents possibly using fitness
evolution.mutate(parents, fitness, generation);
// evaluate parental fitness
Fitness parentalFitness = evolution.evaluate(parents);
// determine who survives according to fitness
population = evolution.survive(parents, parentalFitness, population, fitness, generation);
}
System.out.println("At generation " + generation + ", optimality was attained or time ran out.");
Object mostFit = evolution.mostFit(results);
System.out.println("Instance " mostFit " is most fit");
SysEnv.iceObject(mostFit, "instances/FraudDetector"); // serialize to disk.
A GA is appropriate when you are optimizing against a fitness test and the variable set is large and the discriminators are not obvious.
Check out these applets on the Web to see GAs in action:
http://www.wi.leidenuniv.nl/~gusz/Flying_Circus/3.Demos/Java/index.html
http://www.apm.tuwien.ac.at/~guenther/tspga/TSPGA.html
http://alphard.ethz.ch/gerber/approx/default.html
Genetic programming
Genetic programming is the application of a genetic algorithm to programming. This is the area of greatest promise, in my view, for Jav


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Breathe intelligence into Java - JavaWorld April 2001

View Tutorial:
Breathe intelligence into Java - JavaWorld April 2001

Related Tutorials:

Displaying 1 - 50 of about 3025 Related Tutorials.

Open Source Intelligence
Open Source Intelligence Open Source Intelligence Open source Intelligence The Open Source movement has established over... Intelligence". In this article, we use three case studies - the nettime mailing
 
Business Intelligence
Business Intelligence    ... is Business Intelligence Business Intelligence is a form of business management...; History of Business Intelligence The 20th and 21st century are known
 
Business Intelligence: Power to gain competitive advantage
Business Intelligence: Power to gain competitive advantage GPS Capability,GPS Capabilities Business Intelligence: Power... Intelligence technology companies of all sectors are increasingly depending
 
What is Business Intelligence
What is Business Intelligence GPS Capability,GPS Capabilities What is Business Intelligence   ... INTELLIGENCE IS A FORM of business management that takes business forward by the proper
 
Business Intelligence in Decision Making
Business Intelligence in Decision Making GPS Capability,GPS Capabilities Business Intelligence in Decision Making...; TODAY BUSINESS INTELLIGENCE IS the primary tool to collect and analyze
 
Business Intelligence Tools
Business Intelligence Tools GPS Capability,GPS Capabilities Business Intelligence Tools    ... DISCUSSED that Business Intelligence is a process to collect data and extract
 
Business Intelligence Value Chain
Business Intelligence Value Chain GPS Capability,GPS Capabilities Business Intelligence Value Chain  ... or big to cope with the pace of the market growth. Intelligence is the ability
 
Business Intelligence in Insurance
Business Intelligence in Insurance GPS Capability,GPS Capabilities Business Intelligence in Insurance  .... This makes insurance companies using Business Intelligence tools like data
 
Business Intelligence in Retail
Business Intelligence in Retail GPS Capability,GPS Capabilities Business Intelligence in Retail   ... decision. Business Intelligence tools and software are now used in all most all-major
 
Business Intelligence Solutions in India
Business Intelligence Solutions in India GPS Capability,GPS Capabilities Business Intelligence Solutions in India... information flow and here Business Intelligence plays the most important role as better
 
Business Intelligence for Telecommunications
Business Intelligence for Telecommunications GPS Capability,GPS Capabilities Business Intelligence for Telecommunications... and then analyzing them requires Business Intelligence (BI) technology. This article
 
The Future of Business Intelligence
The Future of Business Intelligence GPS Capability,GPS Capabilities The Future of Business Intelligence... for every organization. However, the adoption of Business Intelligence system
 
Business Intelligence in Healthcare
Business Intelligence in Healthcare.... Business Intelligence (BI) is solely offers solution to data warehousing and data... treatment. Here, in case of hospital Business Intelligence information must
 
Eclipse Plunging/Team Development
. This integration has been available since January 2003, and on April 9th... review tool to help finding and sharing defects of any files (including Java
 
History of Business Intelligence
History of Business Intelligence GPS Capability,GPS Capabilities History of Business Intelligence  ... modern globalize world the application of Businesses Intelligence technology
 
Open Source Java Database
Open Source Java Database Open Source Java Database An Open Source Java Database One$DB is an Open Source version of Daffodil DB, our commercial Java Database. One$DB is a standards based (JDBC 3.0 and SQL
 
New to Java?
New to Java - New to java tutorial New to Java...;   If you are new to Java technology and you want to learn Java and make career in the Java technology then this page is for you. Here we have
 
New to Java?
New to Java - New to java tutorial New to Java...;   If you are new to Java technology and you want to learn Java and make career in the Java technology then this page is for you. Here we have
 
Other Java Resources
Java: Other Java Resources Java NotesOther Java Resources Online books, notes, and reviews Java Documentation - java.sun.com is where to go do download the Java development
 
Definition of Bioinformatics
; About Bioinformatics In February 2001, the human genome was finally... for Biotechnology Information (NCBI 2001) defines bioinformatics as: "
 
Use of Array in Java
Java Array,Java Arrays Example,Use of Array in Java,Java Array Program Use of Array in Java    ...;         This Java programming
 
Java Get Month
Java Get Month Java Get Month...; In the previous Java examples, we have discussed about date functions... the current month of the existing year. This Java get month example is simply
 
ClearBI
and a business intelligence engine that allows software developers as well as the end
 
JAVA JAZZ UP - Free online Java magazine
Free Java Magazine,Free Java Magazines,JAVA JAZZ UP Issue 1,Free Online Java Magazine JAVA JAZZ UP - Free online Java magazine...; Our this issue contains:  Java Jazz Up Issue 2 Index Java
 
Privacy and Security Issues in BI
; WITH THE GROWTH of Business Intelligence market, the privacy and security issues... with Business Intelligence environment should teach all employees about the privacy... and privacy policy. In present time companies are using various Web Intelligence
 
BI: Key for building profits in B2B
Intelligence can answer such questions effectively and this article throws light... to discuss some specific advantages that business intelligence tools and technology can... intelligence with operational data enables you to target profitable activities
 
Java Date Example
Java Date Examples Java Date Examples... February 19 - March 20 Pisces March 21 - April 19 Aries April 20 - May 20 Taurus May 21 - June 20 Gemini
 
Web 3.0
. But the concept of Web 3.0, first entered among the public in 2001, when a story..., the leveraging of artificial intelligence technologies, the Semantic web..., machine learning, recommendation agents that is known as Artificial Intelligence
 
Java: Strengths
Java: Strengths Java: Strengths Java is an excellent programming language. For most programming... The top reason Java has become popular is because
 
Java Tools
Java Tools Java Tools   ...;            Java Compiler To commence with Java programming, we must know the significance of Java
 
Java Interpreter
Java Interpreter Java Interpreter... can run Java on most platforms provided a platform must has a Java interpreter. That is why Java applications are platform independent. Java interpreter
 
Java Tools
Java Tools Java Tools   ...;            Java Compiler To commence with Java programming, we must know the significance of Java
 
Java Interpreter
Java Interpreter Java Interpreter... can run Java on most platforms provided a platform must has a Java interpreter. That is why Java applications are platform independent. Java interpreter
 
Java Compiler
Java Compiler,Java Compiler Example Java Compiler...;  To commence with Java programming, we must know the significance of Java Compiler. When we write any program in a text editor like Notepad, we use
 
SME Server 7.0 Pre 2 has been released now
, the e-smith server and gateway, in April 1999. By the end of the year, many... a solid, easy-to-use server for their small-business customers. In July 2001, e-smith
 
Java - Threads in Java
Java Thread Example Code - Threads in Java Java - Threads in Java         ... including Java. Threads allow the program to perform multiple tasks
 
Java Compiler
Java Compiler,Java Compiler Example Java Compiler...;  To commence with Java programming, we must know the significance of Java Compiler. When we write any program in a text editor like Notepad, we use
 
Java Compiler
Java Compiler,Java Compiler Example Java Compiler...;  To commence with Java programming, we must know the significance of Java Compiler. When we write any program in a text editor like Notepad, we use
 
Java: Java Tutorials
Java Free Tutorials ? Java Beginners Tutorials,Free Online Java Tutorials,Free Sun Java Tutorials Java: Java Tutorials... Java Java is perhaps the most important language of our time. Joe Grip's
 
Java review
Java Review Java review Organized by Java: How to Program chapter. About Java - history...-Oriented Programming Graphical User Interface Components I Typical Java
 
Java Debugger
Java Compiler,Java Compiler Example Java Debugger...;  Java debugger helps in finding and the fixing of bugs in Java language programs. The Java debugger is denoted as jdb. It works like a command-line
 
Java Help and Java Glossary
Java Help,Java Programming Help,Sun Java Help,Online Java Help Java Help and Java Glossary     ...;         We provide Java
 
Java Debugger
Java Debugger,Java Debuggers Java Debugger...; Java debugger helps in finding and the fixing of bugs in Java language programs. The Java debugger is denoted as jdb. It works like a command-line
 
JAVA JAZZ UP - Free online Java magazine
Free Java Magazine,Free Java Magazines,JAVA JAZZ UP Issue 1,Free Online Java Magazine JAVA JAZZ UP Issue 1,Free online Java magazine JAVA JAZZ UP - Free online Java magazine JAVA JAZZ UP - Free online Java
 
Java Debugger
Java Compiler,Java Compiler Example Java Debugger...;  Java debugger helps in finding and the fixing of bugs in Java language programs. The Java debugger is denoted as jdb. It works like a command
 
Java API
Java API, what is java api? Java API...;  Java API Java API is not but a set of classes and interfaces that comes with the JDK. Java API is actually a huge
 
Java: Weaknesses
Java: Weaknesses Java: Weaknesses Altho Java is arguably the best overall programming languages... Elliotte Rusty Harold, author of several good Java books
 
Java Virtual Machine
Java: Java Virtual Machine Java: Java Virtual Machine After you read this section, you should be able to understand how it's possible for a Java applet/application to run on many
 
Java 5.0
Java 5,JDK 5,Java 5 Tutorials,Java 5 Tutorial,Sun Java 5.0 Online Tutorials Java 5.0    ...;          Java 5.0 tutorials
 
Java Interpreter
We can run Java on most platforms provided a platform must has a Java interpreter Java Interpreter    ...;          We can run Java
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.